Skip to content

Commit 4450ee3

Browse files
committed
Update manage-stale-issues-and-prs.yml
1 parent 220f77e commit 4450ee3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/manage-stale-issues-and-prs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
steps:
1111
- name: Manage stale issues and PRs
1212
uses: actions/stale@v9
13+
id: stale
1314
with:
1415
stale-issue-message: 'This issue will be closed in a few days if no response is received. Please provide an update with the requested information.'
1516
stale-pr-message: 'This pull request will be closed in a few days if no response is received. Please update or comment if you would like to continue working on it.'
@@ -33,3 +34,24 @@ jobs:
3334
ascending: false
3435
close-issue-reason: 'not_planned'
3536
exempt-all-milestones: false
37+
38+
- name: Process closed issues and PRs
39+
if: steps.stale.outputs.closed-issues-prs
40+
uses: actions/github-script@v7
41+
with:
42+
github-token: ${{secrets.GITHUB_TOKEN}}
43+
script: |
44+
const closedItemsStr = '${{ steps.stale.outputs.closed-issues-prs }}';
45+
const closedItems = closedItemsStr.split(',').map(Number);
46+
47+
for (const itemNumber of closedItems) {
48+
await github.rest.actions.createWorkflowDispatch({
49+
owner: context.repo.owner,
50+
repo: context.repo.repo,
51+
workflow_id: 'remove-labels-and-assignees-on-close.yml',
52+
ref: 'main',
53+
inputs: {
54+
issue_number: itemNumber.toString()
55+
}
56+
});
57+
}

0 commit comments

Comments
 (0)