From b9f1cb834ed605113d514a17baf82861200d50bc Mon Sep 17 00:00:00 2001 From: nayounsang Date: Sat, 5 Apr 2025 21:10:27 +0900 Subject: [PATCH 1/2] chore: add stale label on stale issue --- .github/workflows/stale-issue.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/stale-issue.yml diff --git a/.github/workflows/stale-issue.yml b/.github/workflows/stale-issue.yml new file mode 100644 index 000000000..19f660577 --- /dev/null +++ b/.github/workflows/stale-issue.yml @@ -0,0 +1,29 @@ +name: 'Stale Issue' +on: + schedule: + - cron: '0 1 * * *' + workflow_dispatch: + +permissions: + issues: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 30 + days-before-close: -1 + + stale-issue-message: '30일 동안 작업이 없어 할당을 해제합니다.' + stale-issue-label: 'stale' + exempt-issue-labels: 'DO NOT CLOSE OR MERGE,discussion,term,TIP' + + days-before-pr-stale: -1 + + labels-to-remove-when-unstale: 'stale' + + include-only-assigned: true + From 0bc2227dfbe561edc2042b8b528c7c72dad68f28 Mon Sep 17 00:00:00 2001 From: nayounsang Date: Sat, 5 Apr 2025 21:10:55 +0900 Subject: [PATCH 2/2] chore: remove assignees for stale issue --- .github/workflows/remove-assignees.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/remove-assignees.yml diff --git a/.github/workflows/remove-assignees.yml b/.github/workflows/remove-assignees.yml new file mode 100644 index 000000000..4a9c83347 --- /dev/null +++ b/.github/workflows/remove-assignees.yml @@ -0,0 +1,20 @@ +name: 'Remove Assignees for stale issue' +on: + issues: + types: [labeled] + +permissions: + issues: write + +jobs: + remove-assignees: + if: github.event.label.name == 'stale' + runs-on: ubuntu-latest + steps: + - name: 이슈 할당 해제 + run: | + curl -X PATCH \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}" \ + -d '{"assignees":[]}'