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

[SAME VERSION] Workflow to mark inactive issues/PRs as stale and eventually close them #363

Merged
merged 6 commits into from
Aug 26, 2021
Merged
Changes from 5 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
24 changes: 24 additions & 0 deletions .github/workflows/stale-tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This is a workflow that runs periodically to mark issues/prs with no recent activity as stale, it also closes/removes label based on following activity

name: Mark and close stale issues/PRs
on:
schedule:
- cron: '0 0 * * *' # runs daily at 12:00 am UTC

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
stale-issue-label: stale
romoh marked this conversation as resolved.
Show resolved Hide resolved
stale-pr-label: stale
days-before-stale: 45
days-before-close: 45
romoh marked this conversation as resolved.
Show resolved Hide resolved
remove-stale-when-updated: true
stale-issue-message: >
Issue has been automatically marked as stale due to inactivity for 45 days. Update the issue to remove label, otherwise it will be automatically closed.
stale-pr-message: >
PR has been automatically marked as stale due to inactivity for 45 days. Update the PR to remove label, otherwise it will be automatically closed."
exempt-issue-labels: keep-alive
token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

just to double check ... does {secrets.GHTOKEN} have any issue with PRs from forks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't be a problem. The token should have enough permissions to add labels, add comments and close PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

my curiousity was more around whether a forked pr would have access to secrets. i think it is ok, but wanted to make sure we tried it.