File tree Expand file tree Collapse file tree
skills/stale-issue-cleanup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ The members of the `microsoft/azure-storage-explorer` GitHub team can be
2525fetched with:
2626
2727```
28- gh api /orgs/microsoft/teams/azure-storage-explorer/members --jq '.[].login'
28+ gh api --paginate /orgs/microsoft/teams/azure-storage-explorer/members --jq '.[].login'
2929```
3030
3131Always fetch fresh membership at the start of a task — do not hardcode logins.
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ An issue is stale when ALL of the following are true:
3131Run this command to get the list of Storage Explorer team member logins:
3232
3333```
34- gh api /orgs/microsoft/teams/azure-storage-explorer/members --jq '.[].login'
34+ gh api --paginate /orgs/microsoft/teams/azure-storage-explorer/members --jq '.[].login'
3535```
3636
3737Store these logins for comparison throughout the process.
@@ -50,7 +50,7 @@ gh api graphql -f query='
5050 title
5151 updatedAt
5252 issueType { name }
53- labels(first: 10 ) {
53+ labels(first: 50 ) {
5454 nodes { name }
5555 }
5656 comments(last: 1) {
Original file line number Diff line number Diff line change 11name : Stale Issue Cleanup
22
33# Authentication:
4- # This workflow requires a token with issues:write and read:org scopes.
4+ # This workflow requires a token with the following scopes:
5+ # - issues:write (to comment on and close issues)
6+ # - read:org (to read team membership)
7+ # - read:project and project (to update the Resolution project field)
58# For experimentation, use a PAT stored as STALE_ISSUES_TOKEN repo secret.
69# For production, replace with a GitHub App token to avoid manual renewal:
710# - Register one "Storage Explorer Automation" GitHub App in the microsoft org
8- # - Grant it issues:write and members:read permissions
11+ # - Grant it issues:write, members:read, and projects:write permissions
912# - Install it on this repo (and any other repos your agents need)
1013# - Use actions/create-github-app-token to generate tokens at runtime
1114# - One app can serve all agent workflows
1215
1316on :
1417 schedule :
15- # Every other Monday at 9:00 AM UTC (biweekly)
16- - cron : ' 0 9 1,15 * *'
18+ - cron : " 0 9 1,15 * *" # Twice monthly
1719 workflow_dispatch : # Allow manual triggers
1820
1921permissions :
3941 agency copilot \
4042 --agent issue-manager \
4143 --prompt "Find and close stale bug issues." \
42- --allow-all-tools \
4344 --share stale-cleanup-log.md
4445
4546 - name : Upload session log
You can’t perform that action at this time.
0 commit comments