diff --git a/.github/close-label.yml b/.github/close-label.yml deleted file mode 100644 index 5f2bfa5ee..000000000 --- a/.github/close-label.yml +++ /dev/null @@ -1,2 +0,0 @@ -🐛 Bug: ✅ Fixed -🦄 Feature Request: ✅ Implemented \ No newline at end of file diff --git a/.github/issue-auto-comments.yml b/.github/issues-auto-comments.yml similarity index 84% rename from .github/issue-auto-comments.yml rename to .github/issues-auto-comments.yml index 8947d4e1a..a8274e818 100644 --- a/.github/issue-auto-comments.yml +++ b/.github/issues-auto-comments.yml @@ -11,9 +11,6 @@ labels: Hello @{{ issue.user.login }} your ticket has been marked as invalid. Please ensure you follow the issue template, provide all requested info, and be sure to check the docs + previous issues prior to raising tickets. - pr: - body: Thank you @{{ pull_request.user.login }} for suggesting this. Please follow the pull request templates. - action: close - name: 👩‍💻 Good First Issue labeled: @@ -38,7 +35,6 @@ labels: body: > Hello @{{ issue.user.login }}! It looks like all or part of this issue has now been implemented. - - name: ‼️ High Priority labeled: issue: @@ -54,9 +50,4 @@ labels: lock_reason: spam body: > This issue has been identified as spam, and is now locked. - Users who repeatedly raise spam issues may be blocked or reported. - - - name: ⛔ Don't Merge - labeled: - pr: - body: This PR has been temporarily blocked from merging. \ No newline at end of file + Users who repeatedly diff --git a/.github/labeler.yml b/.github/issues-auto-labeler.yml similarity index 52% rename from .github/labeler.yml rename to .github/issues-auto-labeler.yml index 850096c9e..32f89d9d0 100644 --- a/.github/labeler.yml +++ b/.github/issues-auto-labeler.yml @@ -1,7 +1,3 @@ -# Add/remove 'critical' label if issue contains the words 'urgent' or 'critical' -#critical: -# - '(critical|urgent)' - 🪟 Windows: - '(🪟 Windows)' @@ -15,4 +11,4 @@ - '(📱 Termux)' 🐧 Linux: - - '(🐧 Linux)' \ No newline at end of file + - '(🐧 Linux)' diff --git a/.github/pr-auto-comments.yml b/.github/pr-auto-comments.yml new file mode 100644 index 000000000..0e4e9fe93 --- /dev/null +++ b/.github/pr-auto-comments.yml @@ -0,0 +1,15 @@ +comment: + footer: | + --- + > I am a bot, and this is an automated message 🤖 +labels: + - name: ✖️ Invalid + labeled: + pr: + body: Thank you @{{ pull_request.user.login }} for suggesting this. Please follow the pull request templates. + action: close + + - name: ⛔ Don't Merge + labeled: + pr: + body: This PR has been temporarily blocked from merging. diff --git a/.github/workflows/add-comment-from-tag.yml b/.github/workflows/add-comment-from-tag.yml deleted file mode 100644 index 548f83eac..000000000 --- a/.github/workflows/add-comment-from-tag.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Based on a label applied to an issue, the bot will add a comment with some additional info - -name: 🎯 Auto-Reply to Labeled Tickets -on: - issues: - types: - - labeled - - unlabeled - pull_request_target: - types: - - labeled - - unlabeled -permissions: - contents: read - issues: write - pull-requests: write - -jobs: - comment: - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Label Commenter - uses: peaceiris/actions-label-commenter@v1 - with: - config_file: .github/issue-auto-comments.yml - github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/check-merge-conflicts.yml b/.github/workflows/check-merge-conflicts.yml deleted file mode 100644 index f96152bef..000000000 --- a/.github/workflows/check-merge-conflicts.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Detect and label pull requests that have merge conflicts - -# Label Conflicting Pull Requests -# https://github.com/marketplace/actions/label-conflicting-pull-requests - -name: 🏗️ Check Merge Conflicts -on: - # So that PRs touching the same files as the push are updated - push: - # So that the `dirtyLabel` is removed if conflicts are resolve - # We recommend `pull_request_target` so that github secrets are available. - # In `pull_request` we wouldn't be able to change labels of fork PRs - pull_request_target: - types: [synchronize] - -jobs: - check-conflicts: - runs-on: ubuntu-latest - steps: - - name: Check Merge Conflicts - uses: eps1lon/actions-label-merge-conflict@v3 - with: - dirtyLabel: "🚫 Merge Conflicts" - repoToken: "${{ secrets.GITHUB_TOKEN }}" - commentOnDirty: "This pull request has conflicts. Please resolve them, otherwise it cannot be merged." diff --git a/.github/workflows/get-pr-size.yml b/.github/workflows/get-pr-size.yml deleted file mode 100644 index 4bc0a8f6c..000000000 --- a/.github/workflows/get-pr-size.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Adds labels to pull requests based on the size of the changes (changed lines) - -# 🏷 Pull Request Size Labeler -# https://github.com/marketplace/actions/pull-request-size-labeler - -name: 🌈 Label PR Size - -on: [pull_request] - -jobs: - labeler: - permissions: - pull-requests: write - contents: read - issues: write - runs-on: ubuntu-latest - name: Label the PR size - steps: - - uses: codelytv/pr-size-labeler@v1 - with: - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - xs_label: 'PR - Small' - xs_max_size: '1' - s_label: 'PR - Small' - s_max_size: '100' - m_label: 'PR - Medium' - m_max_size: '500' - l_label: 'PR - Large' - l_max_size: '1000' - xl_label: 'PR - XL' - fail_if_xl: 'false' - message_if_xl: > - This PR exceeds the recommended size of 1000 lines. - Please make sure you are not addressing multiple issues with one PR. - Note this PR might be rejected due to its size. - github_api_url: 'https://api.github.com' - files_to_ignore: | - "package-lock.json" - "public/lib/*" diff --git a/.github/workflows/issues-auto-manager.yml b/.github/workflows/issues-auto-manager.yml new file mode 100644 index 000000000..d9493f20e --- /dev/null +++ b/.github/workflows/issues-auto-manager.yml @@ -0,0 +1,33 @@ +name: 🎯 Issues Auto Manager + +on: + issues: + types: [opened, edited, labeled, unlabeled] + +jobs: + manage-issues: + name: Manage Issues + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + # Checkout + # https://github.com/marketplace/actions/checkout + uses: actions/checkout@v4 + + - name: Auto-Label Issues + # Issue Labeler + # https://github.com/marketplace/actions/regex-issue-labeler + uses: github/issue-labeler@v3 + with: + configuration-path: .github/issues-auto-labeler.yml + enable-versioned-regex: 0 + repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + + - name: Post Issue Comments Based on Labels + # Label Commenter + # https://github.com/marketplace/actions/label-commenter + uses: peaceiris/actions-label-commenter@v1 + with: + config_file: .github/issues-auto-comments.yml + github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/issues-close-handler.yml b/.github/workflows/issues-close-handler.yml new file mode 100644 index 000000000..04335582c --- /dev/null +++ b/.github/workflows/issues-close-handler.yml @@ -0,0 +1,20 @@ +name: 🎯 Issues Close Handler +on: + issues: + types: [closed] + pull_request_target: + types: [closed] +jobs: + remove-labels: + name: Remove Pending Labels on Close + runs-on: ubuntu-latest + steps: + - name: Remove Pending Labels on Close + # 🤖 Issues Helper + # https://github.com/marketplace/actions/issues-helper + uses: actions-cool/issues-helper@v3 + with: + actions: remove-labels + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: '🚏 Awaiting User Response,🧑‍💻 In Progress,📌 Keep Open,🚫 Merge Conflicts,🔬 Needs Testing,🔨 Needs Work,⚰️ Stale,⛔ Waiting For External/Upstream' diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/issues-close-stale.yml similarity index 87% rename from .github/workflows/close-stale-issues.yml rename to .github/workflows/issues-close-stale.yml index e137a7067..0409760ab 100644 --- a/.github/workflows/close-stale-issues.yml +++ b/.github/workflows/issues-close-stale.yml @@ -1,8 +1,3 @@ -# Auto-label and close any issues that no longer have user interaction - -# Close Stale Issues and PRs -# https://github.com/marketplace/actions/close-stale-issues - name: 🎯 Close Stale Issues on: @@ -11,12 +6,15 @@ on: - cron: '0 0 * * *' # Runs every day at midnight UTC jobs: - stale: + close-stale: + name: Close Stale Issues runs-on: ubuntu-latest steps: # Comment on, then close issues that haven't been updated for ages - - name: Close Stale Issues + - name: Mark Issues without Activity + # Close Stale Issues and PRs + # https://github.com/marketplace/actions/close-stale-issues uses: actions/stale@v9 with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} @@ -44,8 +42,10 @@ jobs: labels-to-add-when-unstale: '📌 Keep Open' # Comment on, then close issues that required a response from the user, but didn't get one - - name: Close Issues without Response - uses: actions/stale@v4 + - name: Mark Issues with Requested Response + # Close Stale Issues and PRs + # https://github.com/marketplace/actions/close-stale-issues + uses: actions/stale@v9 with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} days-before-stale: 7 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 554c588b8..000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Issue Labeler" -on: - issues: - types: [opened, edited] - -permissions: - issues: write - contents: read - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: github/issue-labeler@v3.4 - with: - configuration-path: .github/labeler.yml -# not-before: 2020-01-15T02:54:32Z # optional and will result in any issues prior to this timestamp to be ignored. - enable-versioned-regex: 0 - repo-token: ${{ github.token }} \ No newline at end of file diff --git a/.github/workflows/pr-auto-manager.yml b/.github/workflows/pr-auto-manager.yml new file mode 100644 index 000000000..53762a242 --- /dev/null +++ b/.github/workflows/pr-auto-manager.yml @@ -0,0 +1,69 @@ +name: 🎯 Pull Request Auto Manager + +on: + pull_request_target: + types: [opened, synchronize, reopened, edited, labeled, unlabeled] + +jobs: + check-merge-conflicts: + name: Check Merge Conflicts + runs-on: ubuntu-latest + + steps: + - name: Check Merge Conflicts + # Label Conflicting Pull Requests + # https://github.com/marketplace/actions/label-conflicting-pull-requests + uses: eps1lon/actions-label-merge-conflict@v3 + with: + dirtyLabel: '🚫 Merge Conflicts' + repoToken: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + commentOnDirty: "This pull request has conflicts. Please resolve them, otherwise it cannot be merged." + + pr-size-labeler: + name: Label PR Size + runs-on: ubuntu-latest + + steps: + - name: Label PR Size + # Pull Request Size Labeler + # https://github.com/marketplace/actions/pull-request-size-labeler + uses: codelytv/pr-size-labeler@v1 + with: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + xs_label: 'PR - Small' + xs_max_size: '1' + s_label: 'PR - Small' + s_max_size: '100' + m_label: 'PR - Medium' + m_max_size: '500' + l_label: 'PR - Large' + l_max_size: '1000' + xl_label: 'PR - XL' + fail_if_xl: 'false' + message_if_xl: > + This PR exceeds the recommended size of 1000 lines. + Please ensure you are not addressing multiple issues in one PR. + Note this PR might be rejected due to its size. + github_api_url: 'https://api.github.com' + files_to_ignore: | + "package-lock.json" + "public/lib/*" + + pr-auto-comments: + name: Post PR Comments Based on Labels + needs: [check-merge-conflicts, pr-size-labeler] + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + # Checkout + # https://github.com/marketplace/actions/checkout + uses: actions/checkout@v4 + + - name: Post PR Comments Based on Labels + # Label Commenter for PRs + # https://github.com/marketplace/actions/label-commenter + uses: peaceiris/actions-label-commenter@v1 + with: + config_file: .github/pr-auto-comments.yml + github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/remove-pending-labels-on-close.yml b/.github/workflows/remove-pending-labels-on-close.yml deleted file mode 100644 index f2de08c58..000000000 --- a/.github/workflows/remove-pending-labels-on-close.yml +++ /dev/null @@ -1,22 +0,0 @@ -# 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 - -# 🤖 Issues Helper -# https://github.com/marketplace/actions/issues-helper - -name: 🎯 Remove Pending Labels on Close -on: - issues: - types: [closed] - pull_request: - types: [closed] -jobs: - remove-labels: - runs-on: ubuntu-latest - steps: - - name: Remove Labels when Closed - uses: actions-cool/issues-helper@v3 - with: - actions: remove-labels - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - labels: '🚏 Awaiting User Response,🧑‍💻 In Progress,📌 Keep Open,🚫 Merge Conflicts,🔬 Needs Testing,🔨 Needs Work,⚰️ Stale,⛔ Waiting For External/Upstream'