Skip to content

Commit

Permalink
⬆️ Bump files with dotnet-file sync
Browse files Browse the repository at this point in the history
# devlooped/oss

- Create stale.yml to label/close stale issues/PRs devlooped/oss@695ccee
- Skip discussion issues when generating changelog devlooped/oss@08d83cb
  • Loading branch information
devlooped-bot authored and kzu committed Aug 24, 2024
1 parent bc532e9 commit 45f2307
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.config
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'stale'
on:
schedule:
- cron: '42 0 * * *'

workflow_dispatch:
# Manual triggering through the GitHub UI, API, or CLI
inputs:
daysBeforeStale:
required: true
default: "180"
daysBeforeClose:
required: true
default: "30"
operationsPerRun:
required: true
default: "4000"

permissions:
actions: write # For managing the operation state cache
issues: write

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'
run: |
# add random sleep since we run on fixed schedule
sleep (get-random -max 60)
# 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: ✏️ label
uses: actions/stale@v9
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'
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 4000 )}}
exempt-all-milestones: true
exempt-all-assignees: true
exempt-issue-labels: priority,sponsor,backed
9 changes: 7 additions & 2 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,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
Expand Down Expand Up @@ -364,3 +364,8 @@
sha = ca82a9d6298a933192c5dfd2c5881ebadb85d0fe
etag = eeaafb2886bfb0d66e6e5aa751a60f3691433ac30fdd4bf5c14138dac7174ba9
weak
[file ".github/workflows/stale.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/stale.yml
sha = 695ccee03855bd584a1d7e2f6a59d05e0f919ce1
etag = fac9da58349366f7031314cd05c8b554a262945c6e4d6bd3897906854b68153e
weak

0 comments on commit 45f2307

Please sign in to comment.