Refactor workflows into more structured files
| @@ -1,2 +0,0 @@ | |||
| 1 | π Bug: β Fixed | ||
| 2 | π¦ Feature Request: β Implemented | ||
| 2 | \ No newline at end of file | \ No newline at end of file | |
| @@ -11,9 +11,6 @@ labels: | |||
| 11 | Hello @{{ issue.user.login }} your ticket has been marked as invalid. | 11 | Hello @{{ issue.user.login }} your ticket has been marked as invalid. |
| 12 | Please ensure you follow the issue template, provide all requested info, | 12 | Please ensure you follow the issue template, provide all requested info, |
| 13 | and be sure to check the docs + previous issues prior to raising tickets. | 13 | and be sure to check the docs + previous issues prior to raising tickets. |
| 14 | pr: | ||
| 15 | body: Thank you @{{ pull_request.user.login }} for suggesting this. Please follow the pull request templates. | ||
| 16 | action: close | ||
| 17 | 14 | ||
| 18 | - name: π©βπ» Good First Issue | 15 | - name: π©βπ» Good First Issue |
| 19 | labeled: | 16 | labeled: |
| @@ -38,7 +35,6 @@ labels: | |||
| 38 | body: > | 35 | body: > |
| 39 | Hello @{{ issue.user.login }}! It looks like all or part of this issue has now been implemented. | 36 | Hello @{{ issue.user.login }}! It looks like all or part of this issue has now been implemented. |
| 40 | 37 | ||
| 41 | |||
| 42 | - name: βΌοΈ High Priority | 38 | - name: βΌοΈ High Priority |
| 43 | labeled: | 39 | labeled: |
| 44 | issue: | 40 | issue: |
| @@ -54,9 +50,4 @@ labels: | |||
| 54 | lock_reason: spam | 50 | lock_reason: spam |
| 55 | body: > | 51 | body: > |
| 56 | This issue has been identified as spam, and is now locked. | 52 | This issue has been identified as spam, and is now locked. |
| 57 | Users who repeatedly raise spam issues may be blocked or reported. | ||
| 58 | |||
| 59 | - name: β Don't Merge | ||
| 60 | labeled: | ||
| 61 | pr: | ||
| 62 | body: This PR has been temporarily blocked from merging. | ||
| 62 | \ No newline at end of file | \ No newline at end of file | |
| 53 | Users who repeatedly | ||
| @@ -1,7 +1,3 @@ | |||
| 1 | # Add/remove 'critical' label if issue contains the words 'urgent' or 'critical' | ||
| 2 | #critical: | ||
| 3 | # - '(critical|urgent)' | ||
| 4 | |||
| 5 | πͺ Windows: | 1 | πͺ Windows: |
| 6 | - '(πͺ Windows)' | 2 | - '(πͺ Windows)' |
| 7 | 3 | ||
| @@ -0,0 +1,15 @@ | |||
| 1 | comment: | ||
| 2 | footer: | | ||
| 3 | --- | ||
| 4 | > I am a bot, and this is an automated message π€ | ||
| 5 | labels: | ||
| 6 | - name: βοΈ Invalid | ||
| 7 | labeled: | ||
| 8 | pr: | ||
| 9 | body: Thank you @{{ pull_request.user.login }} for suggesting this. Please follow the pull request templates. | ||
| 10 | action: close | ||
| 11 | |||
| 12 | - name: β Don't Merge | ||
| 13 | labeled: | ||
| 14 | pr: | ||
| 15 | body: This PR has been temporarily blocked from merging. | ||
| @@ -1,28 +0,0 @@ | |||
| 1 | # Based on a label applied to an issue, the bot will add a comment with some additional info | ||
| 2 | |||
| 3 | name: π― Auto-Reply to Labeled Tickets | ||
| 4 | on: | ||
| 5 | issues: | ||
| 6 | types: | ||
| 7 | - labeled | ||
| 8 | - unlabeled | ||
| 9 | pull_request_target: | ||
| 10 | types: | ||
| 11 | - labeled | ||
| 12 | - unlabeled | ||
| 13 | permissions: | ||
| 14 | contents: read | ||
| 15 | issues: write | ||
| 16 | pull-requests: write | ||
| 17 | |||
| 18 | jobs: | ||
| 19 | comment: | ||
| 20 | runs-on: ubuntu-20.04 | ||
| 21 | steps: | ||
| 22 | - name: Checkout | ||
| 23 | uses: actions/checkout@v2 | ||
| 24 | - name: Label Commenter | ||
| 25 | uses: peaceiris/actions-label-commenter@v1 | ||
| 26 | with: | ||
| 27 | config_file: .github/issue-auto-comments.yml | ||
| 28 | github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 28 | \ No newline at end of file | \ No newline at end of file | |
| @@ -1,25 +0,0 @@ | |||
| 1 | # Detect and label pull requests that have merge conflicts | ||
| 2 | |||
| 3 | # Label Conflicting Pull Requests | ||
| 4 | # https://github.com/marketplace/actions/label-conflicting-pull-requests | ||
| 5 | |||
| 6 | name: ποΈ Check Merge Conflicts | ||
| 7 | on: | ||
| 8 | # So that PRs touching the same files as the push are updated | ||
| 9 | push: | ||
| 10 | # So that the `dirtyLabel` is removed if conflicts are resolve | ||
| 11 | # We recommend `pull_request_target` so that github secrets are available. | ||
| 12 | # In `pull_request` we wouldn't be able to change labels of fork PRs | ||
| 13 | pull_request_target: | ||
| 14 | types: [synchronize] | ||
| 15 | |||
| 16 | jobs: | ||
| 17 | check-conflicts: | ||
| 18 | runs-on: ubuntu-latest | ||
| 19 | steps: | ||
| 20 | - name: Check Merge Conflicts | ||
| 21 | uses: eps1lon/actions-label-merge-conflict@v3 | ||
| 22 | with: | ||
| 23 | dirtyLabel: "π« Merge Conflicts" | ||
| 24 | repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
| 25 | commentOnDirty: "This pull request has conflicts. Please resolve them, otherwise it cannot be merged." | ||
| @@ -1,39 +0,0 @@ | |||
| 1 | # Adds labels to pull requests based on the size of the changes (changed lines) | ||
| 2 | |||
| 3 | # π· Pull Request Size Labeler | ||
| 4 | # https://github.com/marketplace/actions/pull-request-size-labeler | ||
| 5 | |||
| 6 | name: π Label PR Size | ||
| 7 | |||
| 8 | on: [pull_request] | ||
| 9 | |||
| 10 | jobs: | ||
| 11 | labeler: | ||
| 12 | permissions: | ||
| 13 | pull-requests: write | ||
| 14 | contents: read | ||
| 15 | issues: write | ||
| 16 | runs-on: ubuntu-latest | ||
| 17 | name: Label the PR size | ||
| 18 | steps: | ||
| 19 | - uses: codelytv/pr-size-labeler@v1 | ||
| 20 | with: | ||
| 21 | GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 22 | xs_label: 'PR - Small' | ||
| 23 | xs_max_size: '1' | ||
| 24 | s_label: 'PR - Small' | ||
| 25 | s_max_size: '100' | ||
| 26 | m_label: 'PR - Medium' | ||
| 27 | m_max_size: '500' | ||
| 28 | l_label: 'PR - Large' | ||
| 29 | l_max_size: '1000' | ||
| 30 | xl_label: 'PR - XL' | ||
| 31 | fail_if_xl: 'false' | ||
| 32 | message_if_xl: > | ||
| 33 | This PR exceeds the recommended size of 1000 lines. | ||
| 34 | Please make sure you are not addressing multiple issues with one PR. | ||
| 35 | Note this PR might be rejected due to its size. | ||
| 36 | github_api_url: 'https://api.github.com' | ||
| 37 | files_to_ignore: | | ||
| 38 | "package-lock.json" | ||
| 39 | "public/lib/*" | ||
| @@ -0,0 +1,33 @@ | |||
| 1 | name: π― Issues Auto Manager | ||
| 2 | |||
| 3 | on: | ||
| 4 | issues: | ||
| 5 | types: [opened, edited, labeled, unlabeled] | ||
| 6 | |||
| 7 | jobs: | ||
| 8 | manage-issues: | ||
| 9 | name: Manage Issues | ||
| 10 | runs-on: ubuntu-latest | ||
| 11 | |||
| 12 | steps: | ||
| 13 | - name: Checkout Repository | ||
| 14 | # Checkout | ||
| 15 | # https://github.com/marketplace/actions/checkout | ||
| 16 | uses: actions/checkout@v4 | ||
| 17 | |||
| 18 | - name: Auto-Label Issues | ||
| 19 | # Issue Labeler | ||
| 20 | # https://github.com/marketplace/actions/regex-issue-labeler | ||
| 21 | uses: github/issue-labeler@v3 | ||
| 22 | with: | ||
| 23 | configuration-path: .github/issues-auto-labeler.yml | ||
| 24 | enable-versioned-regex: 0 | ||
| 25 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 26 | |||
| 27 | - name: Post Issue Comments Based on Labels | ||
| 28 | # Label Commenter | ||
| 29 | # https://github.com/marketplace/actions/label-commenter | ||
| 30 | uses: peaceiris/actions-label-commenter@v1 | ||
| 31 | with: | ||
| 32 | config_file: .github/issues-auto-comments.yml | ||
| 33 | github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| @@ -1,19 +1,17 @@ | |||
| 1 | # When a new comment is added to an issue, if it had the Stale or Awaiting User Response labels, then those labels will be removed | 1 | name: π― Issues Close Handler |
| 2 | |||
| 3 | # π€ Issues Helper | ||
| 4 | # https://github.com/marketplace/actions/issues-helper | ||
| 5 | |||
| 6 | name: π― Remove Pending Labels on Close | ||
| 7 | on: | 2 | on: |
| 8 | issues: | 3 | issues: |
| 9 | types: [closed] | 4 | types: [closed] |
| 10 | pull_request: | 5 | pull_request_target: |
| 11 | types: [closed] | 6 | types: [closed] |
| 12 | jobs: | 7 | jobs: |
| 13 | remove-labels: | 8 | remove-labels: |
| 9 | name: Remove Pending Labels on Close | ||
| 14 | runs-on: ubuntu-latest | 10 | runs-on: ubuntu-latest |
| 15 | steps: | 11 | steps: |
| 16 | - name: Remove Labels when Closed | 12 | - name: Remove Pending Labels on Close |
| 13 | # π€ Issues Helper | ||
| 14 | # https://github.com/marketplace/actions/issues-helper | ||
| 17 | uses: actions-cool/issues-helper@v3 | 15 | uses: actions-cool/issues-helper@v3 |
| 18 | with: | 16 | with: |
| 19 | actions: remove-labels | 17 | actions: remove-labels |
| @@ -1,8 +1,3 @@ | |||
| 1 | # Auto-label and close any issues that no longer have user interaction | ||
| 2 | |||
| 3 | # Close Stale Issues and PRs | ||
| 4 | # https://github.com/marketplace/actions/close-stale-issues | ||
| 5 | |||
| 6 | name: π― Close Stale Issues | 1 | name: π― Close Stale Issues |
| 7 | 2 | ||
| 8 | on: | 3 | on: |
| @@ -11,12 +6,15 @@ on: | |||
| 11 | - cron: '0 0 * * *' # Runs every day at midnight UTC | 6 | - cron: '0 0 * * *' # Runs every day at midnight UTC |
| 12 | 7 | ||
| 13 | jobs: | 8 | jobs: |
| 14 | stale: | 9 | close-stale: |
| 10 | name: Close Stale Issues | ||
| 15 | runs-on: ubuntu-latest | 11 | runs-on: ubuntu-latest |
| 16 | 12 | ||
| 17 | steps: | 13 | steps: |
| 18 | # Comment on, then close issues that haven't been updated for ages | 14 | # Comment on, then close issues that haven't been updated for ages |
| 19 | - name: Close Stale Issues | 15 | - name: Mark Issues without Activity |
| 16 | # Close Stale Issues and PRs | ||
| 17 | # https://github.com/marketplace/actions/close-stale-issues | ||
| 20 | uses: actions/stale@v9 | 18 | uses: actions/stale@v9 |
| 21 | with: | 19 | with: |
| 22 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | 20 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| @@ -44,8 +42,10 @@ jobs: | |||
| 44 | labels-to-add-when-unstale: 'π Keep Open' | 42 | labels-to-add-when-unstale: 'π Keep Open' |
| 45 | 43 | ||
| 46 | # Comment on, then close issues that required a response from the user, but didn't get one | 44 | # Comment on, then close issues that required a response from the user, but didn't get one |
| 47 | - name: Close Issues without Response | 45 | - name: Mark Issues with Requested Response |
| 48 | uses: actions/stale@v4 | 46 | # Close Stale Issues and PRs |
| 47 | # https://github.com/marketplace/actions/close-stale-issues | ||
| 48 | uses: actions/stale@v9 | ||
| 49 | with: | 49 | with: |
| 50 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | 50 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 51 | days-before-stale: 7 | 51 | days-before-stale: 7 |
| @@ -1,19 +0,0 @@ | |||
| 1 | name: "Issue Labeler" | ||
| 2 | on: | ||
| 3 | issues: | ||
| 4 | types: [opened, edited] | ||
| 5 | |||
| 6 | permissions: | ||
| 7 | issues: write | ||
| 8 | contents: read | ||
| 9 | |||
| 10 | jobs: | ||
| 11 | triage: | ||
| 12 | runs-on: ubuntu-latest | ||
| 13 | steps: | ||
| 14 | - uses: github/issue-labeler@v3.4 | ||
| 15 | with: | ||
| 16 | configuration-path: .github/labeler.yml | ||
| 17 | # not-before: 2020-01-15T02:54:32Z # optional and will result in any issues prior to this timestamp to be ignored. | ||
| 18 | enable-versioned-regex: 0 | ||
| 19 | repo-token: ${{ github.token }} | ||
| 19 | \ No newline at end of file | \ No newline at end of file | |
| @@ -0,0 +1,69 @@ | |||
| 1 | name: π― Pull Request Auto Manager | ||
| 2 | |||
| 3 | on: | ||
| 4 | pull_request_target: | ||
| 5 | types: [opened, synchronize, reopened, edited, labeled, unlabeled] | ||
| 6 | |||
| 7 | jobs: | ||
| 8 | check-merge-conflicts: | ||
| 9 | name: Check Merge Conflicts | ||
| 10 | runs-on: ubuntu-latest | ||
| 11 | |||
| 12 | steps: | ||
| 13 | - name: Check Merge Conflicts | ||
| 14 | # Label Conflicting Pull Requests | ||
| 15 | # https://github.com/marketplace/actions/label-conflicting-pull-requests | ||
| 16 | uses: eps1lon/actions-label-merge-conflict@v3 | ||
| 17 | with: | ||
| 18 | dirtyLabel: 'π« Merge Conflicts' | ||
| 19 | repoToken: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 20 | commentOnDirty: "This pull request has conflicts. Please resolve them, otherwise it cannot be merged." | ||
| 21 | |||
| 22 | pr-size-labeler: | ||
| 23 | name: Label PR Size | ||
| 24 | runs-on: ubuntu-latest | ||
| 25 | |||
| 26 | steps: | ||
| 27 | - name: Label PR Size | ||
| 28 | # Pull Request Size Labeler | ||
| 29 | # https://github.com/marketplace/actions/pull-request-size-labeler | ||
| 30 | uses: codelytv/pr-size-labeler@v1 | ||
| 31 | with: | ||
| 32 | GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 33 | xs_label: 'PR - Small' | ||
| 34 | xs_max_size: '1' | ||
| 35 | s_label: 'PR - Small' | ||
| 36 | s_max_size: '100' | ||
| 37 | m_label: 'PR - Medium' | ||
| 38 | m_max_size: '500' | ||
| 39 | l_label: 'PR - Large' | ||
| 40 | l_max_size: '1000' | ||
| 41 | xl_label: 'PR - XL' | ||
| 42 | fail_if_xl: 'false' | ||
| 43 | message_if_xl: > | ||
| 44 | This PR exceeds the recommended size of 1000 lines. | ||
| 45 | Please ensure you are not addressing multiple issues in one PR. | ||
| 46 | Note this PR might be rejected due to its size. | ||
| 47 | github_api_url: 'https://api.github.com' | ||
| 48 | files_to_ignore: | | ||
| 49 | "package-lock.json" | ||
| 50 | "public/lib/*" | ||
| 51 | |||
| 52 | pr-auto-comments: | ||
| 53 | name: Post PR Comments Based on Labels | ||
| 54 | needs: [check-merge-conflicts, pr-size-labeler] | ||
| 55 | runs-on: ubuntu-latest | ||
| 56 | |||
| 57 | steps: | ||
| 58 | - name: Checkout Repository | ||
| 59 | # Checkout | ||
| 60 | # https://github.com/marketplace/actions/checkout | ||
| 61 | uses: actions/checkout@v4 | ||
| 62 | |||
| 63 | - name: Post PR Comments Based on Labels | ||
| 64 | # Label Commenter for PRs | ||
| 65 | # https://github.com/marketplace/actions/label-commenter | ||
| 66 | uses: peaceiris/actions-label-commenter@v1 | ||
| 67 | with: | ||
| 68 | config_file: .github/pr-auto-comments.yml | ||
| 69 | github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||