Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Aug 8, 2024
1 parent eca834b commit 439f5ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/reopen-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ jobs:
per_page: 100
});
return { issue_numbers: issues.map(issue => issue.number) };
return { issue_numbers: issues.map(issue => issue.number).join(',') };
result-encoding: string

- name: Reopen and Remove Label
uses: actions/[email protected]
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
const issueNumbers = process.env.ISSUE_NUMBERS.split(',');
for (const issue_number of issueNumbers) {
// Reopen the issue
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number,
issue_number: parseInt(issue_number, 10),
state: 'open'
});
console.log(`Reopened issue #${issue_number}`);
Expand All @@ -51,10 +51,10 @@ jobs:
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number,
issue_number: parseInt(issue_number, 10),
name: 'lifecycle/stale'
});
console.log(`Removed label 'lifecycle/stale' from issue #${issue_number}`);
}
env:
ISSUE_NUMBERS: ${{ steps.fetch_issues.outputs.result.issue_numbers }}
ISSUE_NUMBERS: ${{ steps.fetch_issues.outputs.result }}

0 comments on commit 439f5ff

Please sign in to comment.