Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: add workflow to auto close stale pr based on label #6732

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/close-stale-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Close stale PR
on:
pull_request:
types: labeled
jobs:
close-pr:
if: github.event.label.name == 'stale-pr'
permissions:
pull-requests: write
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i hope this is enough perms for gh actions bot to action on PRs with other repos as origin. will test that after this PR is merged

runs-on: ubuntu-latest
steps:
- run: gh pr close "$NUMBER" --comment "$COMMENT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
COMMENT: >
Closing this PR due to staleness! If there are new updates, please reopen the PR.
Loading