Skip to content

Commit

Permalink
Improve triage actions on issues
Browse files Browse the repository at this point in the history
Renames stale > triage to make it more representative.

Adds old issues locker and need info closer.
  • Loading branch information
kzu authored Sep 2, 2024
1 parent 03b7d53 commit 33000c0
Showing 1 changed file with 41 additions and 7 deletions.
48 changes: 41 additions & 7 deletions .github/workflows/stale.yml → .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
name: 'stale'
name: 'triage'
on:
schedule:
- cron: '42 0 * * *'

workflow_dispatch:
# Manual triggering through the GitHub UI, API, or CLI
inputs:
daysBeforeClose:
description: "Days before closing stale or need info issues"
required: true
default: "30"
daysBeforeStale:
description: "Days before labeling stale"
required: true
default: "180"
daysBeforeClose:
daysSinceClose:
description: "Days since close to lock"
required: true
default: "30"
operationsPerRun:
daysSinceUpdate:
description: "Days since update to lock"
required: true
default: "4000"
default: "30"

permissions:
actions: write # For managing the operation state cache
issues: write
contents: read

jobs:
stale:
Expand All @@ -30,7 +38,7 @@ jobs:
shell: pwsh
if: github.event_name != 'workflow_dispatch'
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.DEVLOOPED_TOKEN }}
run: |
# add random sleep since we run on fixed schedule
$wait = get-random -max 180
Expand All @@ -47,7 +55,7 @@ jobs:
echo "Rate limit has reset to $($rate.remaining) requests"
}
- name: ✏️ label
- name: ✏️ stale labeler
# pending merge: https://github.com/actions/stale/pull/1176
uses: kzu/stale@c8450312ba97b204bf37545cb249742144d6ca69
with:
Expand All @@ -62,8 +70,34 @@ jobs:
days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 180) }}
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }}
days-before-pr-close: -1 # Do not close PRs labeled as 'stale'
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 4000 )}}
exempt-all-milestones: true
exempt-all-assignees: true
exempt-issue-labels: priority,sponsor,backed
exempt-authors: kzu

- name: 🤘 checkout actions
uses: actions/checkout@v4
with:
repository: 'microsoft/vscode-github-triage-actions'
ref: v42

- name: ⚙ install actions
run: npm install --production

- name: 🔒 issues locker
uses: ./locker
with:
token: ${{ secrets.DEVLOOPED_TOKEN }}
ignoredLabel: priority
daysSinceClose: ${{ fromJson(inputs.daysSinceClose || 30) }}
daysSinceUpdate: ${{ fromJson(inputs.daysSinceUpdate || 30) }}

- name: 🔒 need info closer
uses: ./needs-more-info-closer
with:
token: ${{ secrets.DEVLOOPED_TOKEN }}
label: 'need info'
closeDays: ${{ fromJson(inputs.daysBeforeClose || 30) }}
closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity.\n\nHappy Coding!"
pingDays: 80
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."

0 comments on commit 33000c0

Please sign in to comment.