mirror of
https://github.com/linuxserver/github-workflows.git
synced 2026-03-02 00:02:48 +08:00
Bumps [actions/stale](https://github.com/actions/stale) from 10.1.0 to 10.1.1. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v10.1.0...v10.1.1) --- updated-dependencies: - dependency-name: actions/stale dependency-version: 10.1.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
79 lines
3.3 KiB
YAML
79 lines
3.3 KiB
YAML
name: Mark stale issues and pull requests
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
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
|
|
|
|
steps:
|
|
- uses: actions/stale@v10.1.1
|
|
with:
|
|
close-issue-label: closed-issue-activity
|
|
close-pr-label: closed-pr-activity
|
|
stale-issue-label: no-issue-activity
|
|
stale-issue-message: This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
|
|
stale-pr-label: no-pr-activity
|
|
stale-pr-message: This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
|
|
days-before-stale: 30
|
|
days-before-close: 60
|
|
exempt-issue-labels: awaiting-approval,work-in-progress
|
|
exempt-pr-labels: awaiting-approval,work-in-progress
|
|
repo-token: ${{ secrets.CR_PAT }}
|
|
operations-per-run: 400
|
|
|
|
- name: sleep for ratelimit
|
|
run: sleep 380
|
|
|
|
lock:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
needs:
|
|
- stale
|
|
|
|
steps:
|
|
- uses: dessant/lock-threads@v5.0.1
|
|
with:
|
|
issue-inactive-days: "30"
|
|
include-any-issue-labels: no-issue-activity
|
|
issue-comment: This issue is locked due to inactivity
|
|
exclude-any-issue-labels: awaiting-approval,work-in-progress
|
|
pr-inactive-days: "30"
|
|
include-any-pr-labels: no-pr-activity
|
|
pr-comment: This pull request is locked due to inactivity
|
|
exclude-any-pr-labels: awaiting-approval,work-in-progress
|
|
github-token: ${{ secrets.CR_PAT }}
|