8000 Replace trigger with schedule. This avoids the problem of needing the… · python/cpython-source-deps@f2fc35f · GitHub
[go: up one dir, main page]

Skip to content

Commit f2fc35f

Browse files
committed
Replace trigger with schedule. This avoids the problem of needing the workflow in every base branch in order to work.
1 parent c9f34ad commit f2fc35f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/autoclose.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ permissions:
44
pull-requests: write
55

66
on:
7-
pull_request_target:
8-
types: [opened, synchronize, reopened]
7+
schedule:
8+
- cron: '0 * * * *'
99

1010
jobs:
1111
run:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Close Pull
15-
run: gh pr close --comment "$COMMENT"
14+
- name: Close Pull Requests
15+
run: >
16+
gh pr list --json number --jq .[].number
17+
| xargs -L1 gh pr close --comment "$COMMENT"
1618
env:
1719
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1820
COMMENT: >

0 commit comments

Comments
 (0)
0