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 70319df commit 32226ea
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/reopen-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- name: Fetch Closed Issues with lifecycle/stale Label
id: fetch_issues
uses: actions/github-script@v7.0.1
uses: actions/github-script@v7
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
Expand All @@ -27,17 +27,21 @@ jobs:
per_page: 100
});
const issueNumbers = issues.map(issue => issue.number).join(',');
const issueNumbers = issues.map(issue => issue.number);
console.log(`Fetched issues: ${issueNumbers}`);
return { issue_numbers: issueNumbers };
return issueNumbers;
- name: Set issue numbers
id: set_issue_numbers
run: echo "ISSUE_NUMBERS=${{ steps.fetch_issues.outputs.result }}" >> $GITHUB_ENV

- name: Reopen and Remove Label
uses: actions/github-script@v7.0.1
uses: actions/github-script@v7
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const issueNumbers = "${{ steps.fetch_issues.outputs.issue_numbers }}".split(',');
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
for (const issue_number of issueNumbers) {
// Reopen the issue
await github.rest.issues.update({
Expand Down

0 comments on commit 32226ea

Please sign in to comment.