File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 types : [opened, synchronize, reopened]
66 schedule :
77 - cron : " 17 */6 * * *"
8+ workflow_run :
9+ workflows : ["CI", "Lint", "Docker"]
10+ types : [completed]
811 workflow_dispatch :
912
1013permissions :
3134 let pullRequests;
3235 if (context.payload.pull_request) {
3336 pullRequests = [context.payload.pull_request];
37+ } else if (context.payload.workflow_run?.pull_requests?.length) {
38+ pullRequests = await Promise.all(
39+ context.payload.workflow_run.pull_requests.map(async (pullRequest) => {
40+ const response = await github.rest.pulls.get({
41+ owner: context.repo.owner,
42+ repo: context.repo.repo,
43+ pull_number: pullRequest.number
44+ });
45+ return response.data;
46+ })
47+ );
3448 } else {
3549 pullRequests = await github.paginate(
3650 github.rest.pulls.list,
@@ -153,4 +167,3 @@ jobs:
153167 });
154168 }
155169 }
156-
You can’t perform that action at this time.
0 commit comments