diff --git a/.github/workflows/changelog.config b/.github/workflows/changelog.config index cd34ee75..e47bccdc 100644 --- a/.github/workflows/changelog.config +++ b/.github/workflows/changelog.config @@ -1,7 +1,7 @@ usernames-as-github-logins=true issues_wo_labels=true pr_wo_labels=true -exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info,docs +exclude-labels=bydesign,dependencies,duplicate,discussion,question,invalid,wontfix,need info,docs enhancement-label=:sparkles: Implemented enhancements: bugs-label=:bug: Fixed bugs: issues-label=:hammer: Other: diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 00000000..56ff299a --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,103 @@ +name: 'triage' +on: + schedule: + - cron: '42 0 * * *' + + workflow_dispatch: + # Manual triggering through the GitHub UI, API, or CLI + inputs: + daysBeforeClose: + description: "Days before closing stale or need info issues" + required: true + default: "30" + daysBeforeStale: + description: "Days before labeling stale" + required: true + default: "180" + daysSinceClose: + description: "Days since close to lock" + required: true + default: "30" + daysSinceUpdate: + description: "Days since update to lock" + required: true + default: "30" + +permissions: + actions: write # For managing the operation state cache + issues: write + contents: read + +jobs: + stale: + # Do not run on forks + if: github.repository_owner == 'devlooped' + runs-on: ubuntu-latest + steps: + - name: ⌛ rate + shell: pwsh + if: github.event_name != 'workflow_dispatch' + env: + GH_TOKEN: ${{ secrets.DEVLOOPED_TOKEN }} + run: | + # add random sleep since we run on fixed schedule + $wait = get-random -max 180 + echo "Waiting random $wait seconds to start" + sleep $wait + # get currently authenticated user rate limit info + $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate + # if we don't have at least 100 requests left, wait until reset + if ($rate.remaining -lt 100) { + $wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s)) + echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset" + sleep $wait + $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate + echo "Rate limit has reset to $($rate.remaining) requests" + } + + - name: ✏️ stale labeler + # pending merge: https://github.com/actions/stale/pull/1176 + uses: kzu/stale@c8450312ba97b204bf37545cb249742144d6ca69 + with: + ascending: true # Process the oldest issues first + stale-issue-label: 'stale' + stale-issue-message: | + Due to lack of recent activity, this issue has been labeled as 'stale'. + It will be closed if no further activity occurs within ${{ fromJson(inputs.daysBeforeClose || 30 ) }} more days. + Any new comment will remove the label. + close-issue-message: | + This issue will now be closed since it has been labeled 'stale' without activity for ${{ fromJson(inputs.daysBeforeClose || 30 ) }} days. + days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 180) }} + days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }} + days-before-pr-close: -1 # Do not close PRs labeled as 'stale' + exempt-all-milestones: true + exempt-all-assignees: true + exempt-issue-labels: priority,sponsor,backed + exempt-authors: kzu + + - name: 🤘 checkout actions + uses: actions/checkout@v4 + with: + repository: 'microsoft/vscode-github-triage-actions' + ref: v42 + + - name: ⚙ install actions + run: npm install --production + + - name: 🔒 issues locker + uses: ./locker + with: + token: ${{ secrets.DEVLOOPED_TOKEN }} + ignoredLabel: priority + daysSinceClose: ${{ fromJson(inputs.daysSinceClose || 30) }} + daysSinceUpdate: ${{ fromJson(inputs.daysSinceUpdate || 30) }} + + - name: 🔒 need info closer + uses: ./needs-more-info-closer + with: + token: ${{ secrets.DEVLOOPED_TOKEN }} + label: 'need info' + closeDays: ${{ fromJson(inputs.daysBeforeClose || 30) }} + closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity.\n\nHappy Coding!" + pingDays: 80 + pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information." \ No newline at end of file diff --git a/.netconfig b/.netconfig index ed1d7516..1932ea67 100644 --- a/.netconfig +++ b/.netconfig @@ -94,8 +94,8 @@ weak [file ".github/workflows/changelog.config"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config - sha = 055a8b7c94b74ae139cce919d60b83976d2a9942 - etag = ddb17acb5872e9e69a76f9dec0ca590f25382caa2ccf750df058dcabb674db2b + sha = 08d83cb510732f861416760d37702f9f55bd7f9e + etag = 556a28914eeeae78ca924b1105726cdaa211af365671831887aec81f5f4301b4 weak [file ".github/release.yml"] url = https://github.com/devlooped/oss/blob/main/.github/release.yml @@ -112,3 +112,8 @@ sha = 8cfabc25a6e5d58aedf59364d1d8c26e64024dd2 etag = 2067e8993f995b6627a93438e0d97f8a6daa59bc2b3a2b0216899525c9c43edd weak +[file ".github/workflows/triage.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml + sha = 33000c0c4ab4eb4e0e142fa54515b811a189d55c + etag = 013a47739e348f06891f37c45164478cca149854e6cd5c5158e6f073f852b61a + weak diff --git a/monolyth.md b/monolyth.md index 422f5aed..9c236fe0 100644 --- a/monolyth.md +++ b/monolyth.md @@ -580,6 +580,8 @@ packing on CI, since at that point all that's run are the P2P protocol involving [![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png "Vezel")](https://github.com/vezel-dev) [![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream) [![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC) +[![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png "Vincent Limo")](https://github.com/v-limo) +[![Brooke Hamilton](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/brooke-hamilton.png "Brooke Hamilton")](https://github.com/brooke-hamilton) diff --git a/readme.md b/readme.md index 0dbd969d..342b124a 100644 --- a/readme.md +++ b/readme.md @@ -614,6 +614,8 @@ You can turn this off by setting the following property at the project level: [![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png "Vezel")](https://github.com/vezel-dev) [![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream) [![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC) +[![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png "Vincent Limo")](https://github.com/v-limo) +[![Brooke Hamilton](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/brooke-hamilton.png "Brooke Hamilton")](https://github.com/brooke-hamilton)