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

Add Stale Issue / PR GitHub Action #1617

Merged
merged 1 commit into from
Jul 30, 2021
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
26 changes: 26 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Stale issue handler'
on:
workflow_dispatch:
schedule:
- cron: '0 7 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4.0.0
id: stale
with:
stale-issue-message: 'This Issue will be closed in 30 days. Please remove the "Stale" label or comment to avoid closure with no action.'
stale-pr-message: 'This PR will be closed in 30 days. Please remove the "Stale" label or comment to avoid closure with no action.'
days-before-stale: 300
days-before-close: 30
stale-issue-label: 'stale'
stale-pr-label: 'stale'
close-issue-label: 'closed'
Copy link

Choose a reason for hiding this comment

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

I don't think closed issues/prs need a label.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added this so that we can track (at least initially) the set of issues / PR's that get closed automatically vs all of the others that we have and will close manually (which won't have these labels). According to the documentation the action will also remove this if it gets re-opened.

So eventually (once we are in a much better sate) I agree this will not be needed but as we currently have 117 open (most of which I expect will eventually get closed by this) and 622 Closed I want an easier way to identify these auto-closed items.

close-pr-label: 'closed'
Copy link

Choose a reason for hiding this comment

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

I would add a message instead on automatic close. See OpenTelemetry

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already have a message for when it goes stale, which when closed would be the last message. So I don't think that it's necessary...

I think that by using the label it's a bit more concise and also more searchable without getting false positive matches.

exempt-issue-labels: 'bug,enhancement,documentation,waiting,keep'
exempt-all-milestones: true
exempt-all-assignees: true
- name: Print outputs
run: echo ${{ join(steps.stale.outputs.*, ',') }}