-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
194e330
commit 4520419
Showing
2 changed files
with
24 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,32 @@ | ||
name: Close All Open Issues | ||
name: Close All Issues | ||
|
||
on: | ||
workflow_dispatch: # Allows manual triggering of this workflow | ||
|
||
permissions: | ||
issues: write # Grants write permission to manage issues | ||
workflow_dispatch: | ||
|
||
jobs: | ||
close_issues: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Close all open issues | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Close open issues | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const issues = await github.paginate(github.rest.issues.listForRepo, { | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
state: 'open', // Fetch only open issues | ||
const { owner, repo } = context.repo; | ||
const issues = await github.rest.issues.listForRepo({ | ||
owner, | ||
repo, | ||
state: 'open' | ||
}); | ||
|
||
if (issues.length === 0) { | ||
console.log("No open issues found."); | ||
} else { | ||
console.log(`Found ${issues.length} open issues.`); | ||
for (const issue of issues) { | ||
if (!issue.pull_request) { // Skip pull requests | ||
await github.rest.issues.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issue.number, | ||
state: 'closed', | ||
}); | ||
console.log(`Closed issue #${issue.number}: ${issue.title}`); | ||
} else { | ||
console.log(`Skipped pull request #${issue.number}`); | ||
} | ||
} | ||
} | ||
for (const issue of issues.data) { | ||
await github.rest.issues.update({ | ||
owner, | ||
repo, | ||
issue_number: issue.number, | ||
state: 'closed' | ||
}); | ||
console.log(`Issue #${issue.number} closed.`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"liveServer.settings.port": 5504 | ||
"liveServer.settings.port": 5504, | ||
"IDX.aI.enableInlineCompletion": true, | ||
"IDX.aI.enableCodebaseIndexing": true | ||
} |