mirror of
https://github.com/linuxserver/github-workflows.git
synced 2026-03-02 00:02:48 +08:00
Merge pull request #36 from linuxserver/stale-exempt
Add stale exempt labels to the repository
This commit is contained in:
commit
787ee6b167
25
.github/workflows/issues-cron.yml
vendored
25
.github/workflows/issues-cron.yml
vendored
@ -11,6 +11,31 @@ concurrency:
|
||||
group: lock
|
||||
|
||||
jobs:
|
||||
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Add stale exempt labels to the repository
|
||||
run: |
|
||||
# awaiting-approval
|
||||
if curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/labels/awaiting-approval | grep -q 'awaiting-approval'; then
|
||||
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X POST https://api.github.com/repos/${{ github.repository }}/labels/awaiting-approval \
|
||||
-d '{"description":"Stale exempt"}'
|
||||
else
|
||||
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X POST https://api.github.com/repos/${{ github.repository }}/labels \
|
||||
-d '{"name":"awaiting-approval","description":"Stale exempt"}'
|
||||
fi
|
||||
|
||||
# work-in-progress
|
||||
if curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/labels/work-in-progress | grep -q 'work-in-progress'; then
|
||||
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X POST https://api.github.com/repos/${{ github.repository }}/labels/work-in-progress \
|
||||
-d '{"description":"Stale exempt"}'
|
||||
else
|
||||
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X POST https://api.github.com/repos/${{ github.repository }}/labels \
|
||||
-d '{"name":"work-in-progress","description":"Stale exempt"}'
|
||||
fi
|
||||
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user