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 | name: π― Issues Auto Manager | 1 | name: π― Issues Manager |
| 2 | 2 | ||
| 3 | on: | 3 | on: |
| 4 | issues: | 4 | issues: |
| 5 | types: [opened, edited, labeled, unlabeled] | 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 | jobs: | 10 | jobs: |
| 8 | label-on-content: | 11 | label-on-content: |
| @@ -67,6 +70,23 @@ jobs: | |||
| 67 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | 70 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 68 | labels: 'βοΈ Not Reproducible,βοΈ Not A Bug' | 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 | write-auto-comments: | 90 | write-auto-comments: |
| 71 | name: Post Issue Comments Based on Labels | 91 | name: Post Issue Comments Based on Labels |
| 72 | needs: [label-on-content, label-on-labels] | 92 | needs: [label-on-content, label-on-labels] |
| @@ -5,20 +5,11 @@ on: | |||
| 5 | workflow_dispatch: | 5 | workflow_dispatch: |
| 6 | schedule: | 6 | schedule: |
| 7 | - cron: '0 0 * * *' # Runs every day at midnight UTC | 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 | jobs: | 9 | jobs: |
| 17 | mark-inactivity: | 10 | mark-inactivity: |
| 18 | name: Mark Issues/PRs without Activity | 11 | name: Mark Issues/PRs without Activity |
| 19 | runs-on: ubuntu-latest | 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 | steps: | 14 | steps: |
| 24 | - name: Mark Issues/PRs without Activity | 15 | - name: Mark Issues/PRs without Activity |
| @@ -53,8 +44,6 @@ jobs: | |||
| 53 | name: Mark Issues/PRs Awaiting User Response | 44 | name: Mark Issues/PRs Awaiting User Response |
| 54 | runs-on: ubuntu-latest | 45 | runs-on: ubuntu-latest |
| 55 | needs: mark-inactivity | 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 | steps: | 48 | steps: |
| 60 | - name: Mark Issues/PRs Awaiting User Response | 49 | - name: Mark Issues/PRs Awaiting User Response |
| @@ -82,8 +71,6 @@ jobs: | |||
| 82 | name: Mark Issues with Alternative Exists | 71 | name: Mark Issues with Alternative Exists |
| 83 | runs-on: ubuntu-latest | 72 | runs-on: ubuntu-latest |
| 84 | needs: await-user-response | 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 | steps: | 75 | steps: |
| 89 | - name: Mark Issues with Alternative Exists | 76 | - name: Mark Issues with Alternative Exists |
| @@ -106,20 +93,3 @@ jobs: | |||
| 106 | stale-issue-label: 'π Awaiting User Response' | 93 | stale-issue-label: 'π Awaiting User Response' |
| 107 | close-issue-label: 'πΈοΈ Inactive' | 94 | close-issue-label: 'πΈοΈ Inactive' |
| 108 | exempt-issue-labels: 'π Keep Open' | 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 | name: π― Pull Request Auto Manager | 1 | name: π― Pull Request Manager |
| 2 | 2 | ||
| 3 | on: | 3 | on: |
| 4 | pull_request_target: | 4 | pull_request_target: |
| 5 | types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed] | 5 | types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed] |
| 6 | pull_request_review_comment: | ||
| 7 | types: [created] | ||
| 6 | 8 | ||
| 7 | jobs: | 9 | jobs: |
| 8 | check-merge-conflicts: | 10 | check-merge-conflicts: |
| @@ -78,9 +80,26 @@ jobs: | |||
| 78 | configuration-path: .github/pr-auto-labels-by-files.yml | 80 | configuration-path: .github/pr-auto-labels-by-files.yml |
| 79 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | 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 | check-merge-blocking-labels: | 100 | check-merge-blocking-labels: |
| 82 | name: Check Merge Blocking Labels | 101 | name: Check Merge Blocking Labels |
| 83 | needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files] | 102 | needs: [check-merge-conflicts, label-by-branches] |
| 84 | runs-on: ubuntu-latest | 103 | runs-on: ubuntu-latest |
| 85 | 104 | ||
| 86 | steps: | 105 | steps: |
| @@ -123,7 +142,7 @@ jobs: | |||
| 123 | 142 | ||
| 124 | write-auto-comments: | 143 | write-auto-comments: |
| 125 | name: Post PR Comments Based on Labels | 144 | name: Post PR Comments Based on Labels |
| 126 | needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files] | 145 | needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files, remove-stale-label] |
| 127 | runs-on: ubuntu-latest | 146 | runs-on: ubuntu-latest |
| 128 | 147 | ||
| 129 | steps: | 148 | steps: |