Refactor workflows into more structured files

d6dcededc9a910fd0e8b2c01b15d5f7ce9077aeb

Wolfsblvt <wolfsblvt@gmail.com>

12 files changed, +133 -144Showing whitespace changes
.github/close-label.yml+0 -2
@@ -1,2 +0,0 @@
1πŸ› Bug: βœ… Fixed
2πŸ¦„ Feature Request: βœ… Implemented
2 \ No newline at end of file \ No newline at end of file
.github/issue-auto-comments.yml β†’ .github/issues-auto-comments.yml+1 -10
@@ -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
1714
18 - name: πŸ‘©β€πŸ’» Good First Issue15 - 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.
4037
41
42 - name: ‼️ High Priority38 - name: ‼️ High Priority
43 labeled:39 labeled:
44 issue:40 issue:
@@ -54,9 +50,4 @@ labels:
54 lock_reason: spam50 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
.github/labeler.yml β†’ .github/issues-auto-labeler.yml+0 -4
@@ -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)'
73
.github/pr-auto-comments.yml+15 -0
@@ -0,0 +1,15 @@
1comment:
2 footer: |
3 ---
4 > I am a bot, and this is an automated message πŸ€–
5labels:
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.
.github/workflows/add-comment-from-tag.yml+0 -28
@@ -1,28 +0,0 @@
1# Based on a label applied to an issue, the bot will add a comment with some additional info
2
3name: 🎯 Auto-Reply to Labeled Tickets
4on:
5 issues:
6 types:
7 - labeled
8 - unlabeled
9 pull_request_target:
10 types:
11 - labeled
12 - unlabeled
13permissions:
14 contents: read
15 issues: write
16 pull-requests: write
17
18jobs:
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
.github/workflows/check-merge-conflicts.yml+0 -25
@@ -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
6name: πŸ—οΈ Check Merge Conflicts
7on:
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
16jobs:
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."
.github/workflows/get-pr-size.yml+0 -39
@@ -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
6name: 🌈 Label PR Size
7
8on: [pull_request]
9
10jobs:
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/*"
.github/workflows/issues-auto-manager.yml+33 -0
@@ -0,0 +1,33 @@
1name: 🎯 Issues Auto Manager
2
3on:
4 issues:
5 types: [opened, edited, labeled, unlabeled]
6
7jobs:
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 }}
.github/workflows/remove-pending-labels-on-close.yml β†’ .github/workflows/issues-close-handler.yml+6 -8
@@ -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 removed1name: 🎯 Issues Close Handler
2
3# πŸ€– Issues Helper
4# https://github.com/marketplace/actions/issues-helper
5
6name: 🎯 Remove Pending Labels on Close
7on:2on:
8 issues:3 issues:
9 types: [closed]4 types: [closed]
10 pull_request:5 pull_request_target:
11 types: [closed]6 types: [closed]
12jobs:7jobs:
13 remove-labels:8 remove-labels:
9 name: Remove Pending Labels on Close
14 runs-on: ubuntu-latest10 runs-on: ubuntu-latest
15 steps:11 steps:
16 - name: Remove Labels when Closed12 - name: Remove Pending Labels on Close
13 # πŸ€– Issues Helper
14 # https://github.com/marketplace/actions/issues-helper
17 uses: actions-cool/issues-helper@v315 uses: actions-cool/issues-helper@v3
18 with:16 with:
19 actions: remove-labels17 actions: remove-labels
.github/workflows/close-stale-issues.yml β†’ .github/workflows/issues-close-stale.yml+9 -9
@@ -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
6name: 🎯 Close Stale Issues1name: 🎯 Close Stale Issues
72
8on:3on:
@@ -11,12 +6,15 @@ on:
11 - cron: '0 0 * * *' # Runs every day at midnight UTC6 - cron: '0 0 * * *' # Runs every day at midnight UTC
127
13jobs:8jobs:
14 stale:9 close-stale:
10 name: Close Stale Issues
15 runs-on: ubuntu-latest11 runs-on: ubuntu-latest
1612
17 steps:13 steps:
18 # Comment on, then close issues that haven't been updated for ages14 # Comment on, then close issues that haven't been updated for ages
19 - name: Close Stale Issues15 - name: Mark Issues without Activity
16 # Close Stale Issues and PRs
17 # https://github.com/marketplace/actions/close-stale-issues
20 uses: actions/stale@v918 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'
4543
46 # Comment on, then close issues that required a response from the user, but didn't get one44 # Comment on, then close issues that required a response from the user, but didn't get one
47 - name: Close Issues without Response45 - name: Mark Issues with Requested Response
48 uses: actions/stale@v446 # 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: 751 days-before-stale: 7
.github/workflows/labeler.yml+0 -19
@@ -1,19 +0,0 @@
1name: "Issue Labeler"
2on:
3 issues:
4 types: [opened, edited]
5
6permissions:
7 issues: write
8 contents: read
9
10jobs:
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
.github/workflows/pr-auto-manager.yml+69 -0
@@ -0,0 +1,69 @@
1name: 🎯 Pull Request Auto Manager
2
3on:
4 pull_request_target:
5 types: [opened, synchronize, reopened, edited, labeled, unlabeled]
6
7jobs:
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 }}