-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Compile Winutil * winget fixes and checks * Compile Winutil * fix Parsec winget id (#1558) * Compile Winutil * fix winget issues * Compile Winutil * cleanup winget * Compile Winutil * Updated README.md (#1570) Fixed typos in readme file ("cusom" -> "custom", "twekas" -. "tweaks". Also added full stops. * Compile Winutil * Create close-old-issues.yml * Compile Winutil * update issues --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Saikrishnan K <53394202+K-Saikrishnan@users.noreply.github.com> Co-authored-by: Harry Perkin <68484588+HarryPerkin@users.noreply.github.com>
- Loading branch information
1 parent
b7a86de
commit d0aa396
Showing
8 changed files
with
192 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Close Inactive Issues | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Run daily | ||
|
||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Close inactive issues | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const octokit = context.octokit; | ||
// Get the repository owner and name | ||
const { owner, repo } = context.repo; | ||
// Define the inactivity period (14 days) | ||
const inactivityPeriod = new Date(); | ||
inactivityPeriod.setDate(inactivityPeriod.getDate() - 14); | ||
// Get all open issues | ||
const { data: issues } = await octokit.rest.issues.listForRepo({ | ||
owner, | ||
repo, | ||
state: 'open', | ||
}); | ||
// Close issues inactive for more than the inactivity period | ||
for (const issue of issues) { | ||
const lastCommentDate = issue.updated_at; | ||
if (new Date(lastCommentDate) < inactivityPeriod) { | ||
// Close the issue and add a comment | ||
await octokit.rest.issues.update({ | ||
owner, | ||
repo, | ||
issue_number: issue.number, | ||
state: 'closed', | ||
}); | ||
await octokit.rest.issues.createComment({ | ||
owner, | ||
repo, | ||
issue_number: issue.number, | ||
body: 'Closed due to inactivity', | ||
}); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -38,3 +38,4 @@ Microsoft.PowerShell.ConsoleHost.dll | |
.DS_Store | ||
microwin.log | ||
True | ||
test.ps1 |
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
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
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
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
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
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