Skip to content

Commit 65ec6f7

Browse files
zwarezooba
andcommitted
Add PR closing workflow
Co-Authored-By: Steve Dower <steve.dower@python.org>
1 parent f62dd32 commit 65ec6f7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/autoclose.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Close Pull Requests
2+
3+
permissions:
4+
pull-requests: write
5+
6+
on:
7+
schedule:
8+
- cron: '0 * * * *'
9+
workflow_dispatch:
10+
11+
jobs:
12+
run:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Close Pull Requests
16+
run: >
17+
for pr in $(gh pr list --repo $REPO_NAME --json number --jq .[].number); do
18+
gh pr close --repo $REPO_NAME --comment "$COMMENT" $pr;
19+
done
20+
env:
21+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
REPO_NAME: python/cpython-bin-deps
23+
COMMENT: >
24+
We do not accept PRs on this repository. Please file an issue at
25+
https://github.com/python/cpython requesting an update to the
26+
binary packages in this repository.

0 commit comments

Comments
 (0)