Add a job to the janitor GHA to annotate any issues/PRs that have been inactive for the past 90 days with the `inactive` label (which has been added to github). The job will then close an issue if it has been marked inactive for 14 days.

Most of this is taken from https://github.com/carbon-language/carbon-lang/blob/trunk/.github/workflows/stale.yaml with a few adjustments, most importantly allowing the bot to auto-close issues.

PiperOrigin-RevId: 578906074
pull/14584/head
Deanna Garcia 1 year ago committed by Copybara-Service
parent f78f9c51fa
commit 76305620a1
  1. 44
      .github/workflows/janitor.yml

@ -28,3 +28,47 @@ jobs:
echo "Closing #$pr..." echo "Closing #$pr..."
gh pr close --comment "Auto-closing Copybara pull request" --delete-branch "$pr" gh pr close --comment "Auto-closing Copybara pull request" --delete-branch "$pr"
done done
stale-others:
name: Close stale non-copybara PRs and issues
runs-on: ubuntu-latest
steps:
- uses: actions/stale@b69b346013879cedbf50c69f572cd85439a41936
with:
stale-issue-message: >
We triage inactive PRs and issues in order to make it easier to find
active work. If this issue should remain active or becomes active
again, please add a comment.
This issue is labeled `inactive` because the last activity was over
90 days ago.
close-pr-message: >
We triage inactive PRs and issues in order to make it easier to find
active work. If this issue should remain active or becomes active
again, please reopen it.
This issue was closed and archived because there has been no new
activity in the 14 days since the `inactive` label was added.
stale-pr-message: >
We triage inactive PRs and issues in order to make it easier to find
active work. If this PR should remain active, please add a comment.
This PR is labeled `inactive` because the last activity was over 90
days ago. This PR will be closed and archived after 14 additional
days without activity.
close-pr-message: >
We triage inactive PRs and issues in order to make it easier to find
active work. If this PR should remain active or becomes active
again, please reopen it.
This PR was closed and archived because there has been no new
activity in the 14 days since the `inactive` label was added.
stale-issue-label: 'inactive'
stale-pr-label: 'inactive'
days-before-stale: 90
days-before-close: 14
operations-per-run: 100

Loading…
Cancel
Save