Move unstale to the issue/pr manager Doesn't make sense to run the scheduled workflow and then skip most of it's jobs. And it looks weird in the PR boxy thingy
| @@ -1,8 +1,11 @@ | ||
| 1 | 1 | name: π― Issues Auto Manager |
| 2 | 2 | |
| 3 | 3 | on: |
| 4 | 4 | issues: |
| 5 | 5 | types: [opened, edited, labeled, unlabeled] |
| 6 | + # Re also listen to comments, to remove stale labels right away | |
| 7 | + issue_comment: | |
| 8 | + types: [created] | |
| 6 | 9 | |
| 7 | 10 | jobs: |
| 8 | 11 | label-on-content: |
| @@ -67,6 +70,23 @@ jobs: | ||
| 67 | 70 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 68 | 71 | labels: 'βοΈ Not Reproducible,βοΈ Not A Bug' |
| 69 | 72 | |
| 73 | + remove-stale-label: | |
| 74 | + name: Remove Stale Label on Comment | |
| 75 | + runs-on: ubuntu-latest | |
| 76 | + # Only run this on new comments, to automatically remove the stale label | |
| 77 | + if: github.event_name == 'issue_comment' && github.actor != 'github-actions[bot]' | |
| 78 | + | |
| 79 | + steps: | |
| 80 | + - name: Remove Stale Label | |
| 81 | + # π€ Issues Helper | |
| 82 | + # https://github.com/marketplace/actions/issues-helper | |
| 83 | + uses: actions-cool/issues-helper@v3 | |
| 84 | + with: | |
| 85 | + actions: 'remove-labels' | |
| 86 | + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | |
| 87 | + issue-number: ${{ github.event.issue.number }} | |
| 88 | + labels: 'β°οΈ Stale,πΈοΈ Inactive,π Awaiting User Response,π No Response' | |
| 89 | + | |
| 70 | 90 | write-auto-comments: |
| 71 | 91 | name: Post Issue Comments Based on Labels |
| 72 | 92 | needs: [label-on-content, label-on-labels] |
| @@ -5,20 +5,11 @@ on: | ||
| 5 | 5 | workflow_dispatch: |
| 6 | 6 | schedule: |
| 7 | 7 | - cron: '0 0 * * *' # Runs every day at midnight UTC |
| 8 | - # Re also listen to comment created events or new PR pushes, to remove stale labels right away | |
| 9 | - issue_comment: | |
| 10 | - types: [created] | |
| 11 | - pull_request_review_comment: | |
| 12 | - types: [created] | |
| 13 | - pull_request: | |
| 14 | - types: [synchronize] | |
| 15 | 8 | |
| 16 | 9 | jobs: |
| 17 | 10 | mark-inactivity: |
| 18 | 11 | name: Mark Issues/PRs without Activity |
| 19 | 12 | runs-on: ubuntu-latest |
| 20 | - # Only run this on the actual scheduled workflow | |
| 21 | - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| 22 | 13 | |
| 23 | 14 | steps: |
| 24 | 15 | - name: Mark Issues/PRs without Activity |
| @@ -53,8 +44,6 @@ jobs: | ||
| 53 | 44 | name: Mark Issues/PRs Awaiting User Response |
| 54 | 45 | runs-on: ubuntu-latest |
| 55 | 46 | needs: mark-inactivity |
| 56 | - # Only run this on the actual scheduled workflow | |
| 57 | - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| 58 | 47 | |
| 59 | 48 | steps: |
| 60 | 49 | - name: Mark Issues/PRs Awaiting User Response |
| @@ -82,8 +71,6 @@ jobs: | ||
| 82 | 71 | name: Mark Issues with Alternative Exists |
| 83 | 72 | runs-on: ubuntu-latest |
| 84 | 73 | needs: await-user-response |
| 85 | - # Only run this on the actual scheduled workflow | |
| 86 | - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| 87 | 74 | |
| 88 | 75 | steps: |
| 89 | 76 | - name: Mark Issues with Alternative Exists |
| @@ -106,20 +93,3 @@ jobs: | ||
| 106 | 93 | stale-issue-label: 'π Awaiting User Response' |
| 107 | 94 | close-issue-label: 'πΈοΈ Inactive' |
| 108 | 95 | exempt-issue-labels: 'π Keep Open' |
| 109 | - | |
| 110 | - remove-stale-label: | |
| 111 | - name: Remove Stale Label on Comment | |
| 112 | - runs-on: ubuntu-latest | |
| 113 | - # Only run this on new comments or PR commits, to automatically remove the stale label | |
| 114 | - if: (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request') && github.actor != 'github-actions[bot]' | |
| 115 | - | |
| 116 | - steps: | |
| 117 | - - name: Remove Stale Label | |
| 118 | - # π€ Issues Helper | |
| 119 | - # https://github.com/marketplace/actions/issues-helper | |
| 120 | - uses: actions-cool/issues-helper@v3 | |
| 121 | - with: | |
| 122 | - actions: 'remove-labels' | |
| 123 | - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | |
| 124 | - issue-number: ${{ github.event.issue.number || github.event.pull_request.number }} | |
| 125 | - labels: 'β°οΈ Stale,πΈοΈ Inactive,π Awaiting User Response,π No Response' | |
| @@ -1,8 +1,10 @@ | ||
| 1 | 1 | name: π― Pull Request Auto Manager |
| 2 | 2 | |
| 3 | 3 | on: |
| 4 | 4 | pull_request_target: |
| 5 | 5 | types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed] |
| 6 | + pull_request_review_comment: | |
| 7 | + types: [created] | |
| 6 | 8 | |
| 7 | 9 | jobs: |
| 8 | 10 | check-merge-conflicts: |
| @@ -78,9 +80,26 @@ jobs: | ||
| 78 | 80 | configuration-path: .github/pr-auto-labels-by-files.yml |
| 79 | 81 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 80 | 82 | |
| 83 | + remove-stale-label: | |
| 84 | + name: Remove Stale Label on Comment | |
| 85 | + runs-on: ubuntu-latest | |
| 86 | + # Only runs when this is not done by the github actions bot | |
| 87 | + if: github.actor != 'github-actions[bot]' | |
| 88 | + | |
| 89 | + steps: | |
| 90 | + - name: Remove Stale Label | |
| 91 | + # π€ Issues Helper | |
| 92 | + # https://github.com/marketplace/actions/issues-helper | |
| 93 | + uses: actions-cool/issues-helper@v3 | |
| 94 | + with: | |
| 95 | + actions: 'remove-labels' | |
| 96 | + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | |
| 97 | + issue-number: ${{ github.event.pull_request.number }} | |
| 98 | + labels: 'β°οΈ Stale' | |
| 99 | + | |
| 81 | 100 | check-merge-blocking-labels: |
| 82 | 101 | name: Check Merge Blocking Labels |
| 83 | 102 | needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files] |
| 84 | 103 | runs-on: ubuntu-latest |
| 85 | 104 | |
| 86 | 105 | steps: |
| @@ -123,7 +142,7 @@ jobs: | ||
| 123 | 142 | |
| 124 | 143 | write-auto-comments: |
| 125 | 144 | name: Post PR Comments Based on Labels |
| 126 | 145 | needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files, remove-stale-label] |
| 127 | 146 | runs-on: ubuntu-latest |
| 128 | 147 | |
| 129 | 148 | steps: |