Skip to content

Commit a245f58

Browse files
committed
ci: update workflow
1 parent 949cfd0 commit a245f58

File tree

4 files changed

+680
-16
lines changed

4 files changed

+680
-16
lines changed

.github/workflows/issues-accept.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# ---------------------------------------------------------------------------------------
2+
# @parent : github workflow
3+
# @desc : adds a label and assignee when specified user types /accept in
4+
# PR comment.
5+
# @author : Aetherinox
6+
# @url : https://github.com/Aetherinox
7+
# ---------------------------------------------------------------------------------------
8+
9+
name: "🎫 Issue › Accept"
10+
run-name: "🎫 Issue › Accept"
11+
12+
# ---------------------------------------------------------------------------------------
13+
# triggers
14+
# ---------------------------------------------------------------------------------------
15+
16+
on:
17+
issue_comment:
18+
types: [created]
19+
20+
# ---------------------------------------------------------------------------------------
21+
# environment variables
22+
# ---------------------------------------------------------------------------------------
23+
24+
env:
25+
LABEL_ACCEPT: "Status 𐄂 Accepted"
26+
27+
ASSIGN_USER: Aetherinox
28+
BOT_NAME_1: AdminServ
29+
BOT_NAME_2: AdminServX
30+
BOT_NAME_3: EuropaServ
31+
BOT_NAME_DEPENDABOT: dependabot[bot]
32+
33+
# ---------------------------------------------------------------------------------------
34+
# jobs
35+
#
36+
# env not available for job.if
37+
# ---------------------------------------------------------------------------------------
38+
39+
jobs:
40+
deploy:
41+
runs-on: ubuntu-latest
42+
if: github.event.issue.pull_request && contains(github.event.comment.body, '/accept') && github.event.comment.user.login == 'Aetherinox'
43+
steps:
44+
45+
# ---------------------------------------------------------------------------------------
46+
# Add Label to accepted PR
47+
# ---------------------------------------------------------------------------------------
48+
49+
- name: "🏷️ Assign Label › ${{ env.LABEL_ACCEPT }}"
50+
run: gh issue edit "$NUMBER" --add-label "$LABELS"
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
GH_REPO: ${{ github.repository }}
54+
NUMBER: ${{ github.event.issue.number }}
55+
LABELS: ${{ env.LABEL_ACCEPT }}
56+
57+
# ---------------------------------------------------------------------------------------
58+
# Add assignee to accepted PR
59+
# ---------------------------------------------------------------------------------------
60+
61+
- name: "🏷️ Assign Assignee › ${{ env.ASSIGN_USER }}"
62+
run: gh issue edit "$NUMBER" --add-assignee "$ASSIGNEE"
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
GH_REPO: ${{ github.repository }}
66+
NUMBER: ${{ github.event.issue.number }}
67+
ASSIGNEE: ${{ env.ASSIGN_USER }}

.github/workflows/issues-new-assign.yml renamed to .github/workflows/issues-new.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# - roadmap
1212
# ---------------------------------------------------------------------------------------
1313

14-
name: "🎫 Issue › New › Assignment"
15-
run-name: "🎫 Issue › New › Assignment - ${{ github.event.issue.number }}: ${{ github.event.issue.title }}"
14+
name: "🎫 Issue › New"
15+
run-name: "🎫 Issue › New › ${{ github.event.issue.number }}: ${{ github.event.issue.title }}"
1616

1717
# ---------------------------------------------------------------------------------------
1818
# triggers
@@ -50,6 +50,7 @@ env:
5050
ASSIGN_USER: Aetherinox
5151
BOT_NAME_1: AdminServ
5252
BOT_NAME_2: AdminServX
53+
BOT_NAME_3: EuropaServ
5354
BOT_NAME_DEPENDABOT: dependabot[bot]
5455

5556
LABELS_JSON: |
@@ -78,7 +79,7 @@ jobs:
7879
steps:
7980

8081
- name: "✅ Start"
81-
run: |
82+
run: |
8283
echo "Assigning labels and assignees"
8384
8485
- name: "☑️ Checkout"
@@ -89,7 +90,7 @@ jobs:
8990
# ---------------------------------------------------------------------------------------
9091
# Check if repo has labels currently added to issues
9192
# ---------------------------------------------------------------------------------------
92-
93+
9394
- name: 🏷️ Verify Existing Labels
9495
uses: actions/github-script@v7
9596
with:
@@ -157,7 +158,7 @@ jobs:
157158
core.info( `Setting env issue title: ${ iss_title }` )
158159
159160
console.log( "\n\n" )
160-
161+
161162
162163
# ---------------------------------------------------------------------------------------
163164
# Label > Bug
@@ -239,7 +240,7 @@ jobs:
239240
240241
/*
241242
- Check if issue title matches the issue label "Bug:"
242-
- Check if title contains word in words
243+
- Check if title contains word in words
243244
*/
244245
245246
if ( iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
@@ -252,7 +253,7 @@ jobs:
252253
console.log( "Already starts with " + road_tag + " ..... " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
253254
254255
add_labels.push( `${ bug_lbl }` );
255-
256+
256257
console.log( `Adding Tag ....................... ${ bug_lbl }` )
257258
console.log( "\n" )
258259
@@ -285,7 +286,7 @@ jobs:
285286
286287
core.setOutput( 'issue_title', iss_title )
287288
console.log( "\n\n" )
288-
289+
289290
# ---------------------------------------------------------------------------------------
290291
# Label > FEATURE
291292
# ---------------------------------------------------------------------------------------
@@ -365,7 +366,7 @@ jobs:
365366
366367
/*
367368
- Check if issue title matches the issue label "Feature:"
368-
- Check if title contains word in words
369+
- Check if title contains word in words
369370
*/
370371
371372
// change TAG per category
@@ -494,7 +495,7 @@ jobs:
494495
495496
/*
496497
- Check if issue title matches the issue label "Urgent:"
497-
- Check if title contains word in words
498+
- Check if title contains word in words
498499
*/
499500
500501
// change TAG per category
@@ -625,7 +626,7 @@ jobs:
625626
626627
/*
627628
- Check if issue title matches the issue label "Roadmap:"
628-
- Check if title contains word in words
629+
- Check if title contains word in words
629630
*/
630631
631632
// change TAG per category
@@ -691,7 +692,7 @@ jobs:
691692
environment:
692693
name: Orion
693694
steps:
694-
695+
695696
# ---------------------------------------------------------------------------------------
696697
# checkout
697698
# ---------------------------------------------------------------------------------------
@@ -778,7 +779,7 @@ jobs:
778779
message.push ( HE_message );
779780
bHasMessage = true;
780781
}
781-
782+
782783
/*
783784
Bot has message to send
784785
*/
@@ -835,4 +836,3 @@ jobs:
835836
core.setFailed( error.message );
836837
}
837838
}
838-

.github/workflows/pr-autoscan.yml renamed to .github/workflows/issues-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# @url : https://github.com/Aetherinox
66
# ---------------------------------------------------------------------------------------
77

8-
name: "⚡ PRAutoscan"
9-
run-name: "⚡ PRAutoscan"
8+
name: "🎫 IssuesScan"
9+
run-name: "🎫 IssuesScan"
1010

1111
# ---------------------------------------------------------------------------------------
1212
# triggers

0 commit comments

Comments
 (0)