Skip to content

Commit 195b9d8

Browse files
authored
chore(workflows): update deprecated action and remove duplicate workflow message (@nadalaba) (monkeytypegame#6344)
### Description 1. remove duplicate correct examples in semantic-pr-title error message, and make the examples more diverse (show how to credit multiple contributors). ![patternMessage](https://github.com/user-attachments/assets/cb6afe48-ed67-4894-ab4a-76894dd50e3b) 2. make the scope (quotes, languages, ...) consistently plural across the repo docs (A subjective change I know, but in the changelog, the scope looks better when it is plural i.e. **quotes:** add various quotes). 3. update deprecated action `upload-artifact` from v3 to v4, because it was making the `ci-failure-comment` workflow fail. > Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3`. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/ 4. use the same official action to download and upload artifacts across the repo's workflows. 5. add 'waiting for update' and remove 'waiting for review' labels when the Monkey CI workflow fails. 6. fix actions' major version only, to allow minor updates and patches.
1 parent 932d0e1 commit 195b9d8

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

.github/workflows/ci-failure-comment.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ jobs:
1313
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
1414
steps:
1515
- name: Download workflow artifact
16-
uses: dawidd6/action-download-artifact@v6
16+
uses: actions/download-artifact@v4
1717
with:
1818
github_token: ${{ secrets.GITHUB_TOKEN }}
19-
workflow: peek_icons.yml
2019
run_id: ${{ github.event.workflow_run.id }}
2120

2221
- name: Read the pr_num file
2322
id: pr_num_reader
24-
uses: juliangruber/read-file-action@v1.0.0
23+
uses: juliangruber/read-file-action@v1
2524
with:
2625
path: ./pr_num/pr_num.txt
2726

@@ -31,3 +30,10 @@ jobs:
3130
issue-number: ${{ steps.pr_num_reader.outputs.content }}
3231
body: |
3332
Continuous integration check(s) failed. Please review the [failing check\'s logs](${{ github.event.workflow_run.html_url }}) and make the necessary changes.
33+
34+
- name: Apply label changes
35+
uses: PauMAVA/add-remove-label-action@v1
36+
with:
37+
issue_number: ${{ steps.pr_num_reader.outputs.content }}
38+
add: "waiting for update"
39+
remove: "waiting for review"

.github/workflows/monkey-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ jobs:
353353
run: echo $PR_NUM > pr_num.txt
354354

355355
- name: Upload the PR number
356-
uses: actions/upload-artifact@v3
356+
uses: actions/upload-artifact@v4
357357
with:
358358
name: pr_num
359359
path: ./pr_num.txt

.github/workflows/semantic-pr-title.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@ jobs:
4242
Title "{title}"
4343
didn't match the configured pattern. Please ensure that the title
4444
contains your name so that you can be credited in our changelog.
45-
A correct version would look something like:
46-
47-
feat: add new feature (@github-username)
48-
impr(quotes): add english quotes (@github-username)
49-
fix: resolve bug (@github-username)
50-
45+
5146
- uses: marocchino/sticky-pull-request-comment@v2
5247
# When the previous steps fails, the workflow would stop. By adding this
5348
# condition you can continue the execution with the populated error message.
@@ -66,9 +61,9 @@ jobs:
6661
```
6762
A correct version would look something like:
6863
69-
feat: add new feature (@github-username)
70-
impr(quotes): add english quotes (@github-username)
71-
fix: resolve bug (@github-username)
64+
feat: add new feature (@github_username)
65+
impr(quotes): add english quotes (@username)
66+
fix(leaderboard): show user rank correctly (@user1, @user2, @user3)
7267
7368
# Delete a previous comment when the issue has been resolved
7469
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}

.github/workflows/write-labels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Read json file
2525
id: json_reader
26-
uses: juliangruber/read-file-action@v1.1.7
26+
uses: juliangruber/read-file-action@v1
2727
with:
2828
path: ./labels/write-labels.json
2929

@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Apply label changes
4747
if: env.ADD_LABELS || env.REMOVE_LABELS
48-
uses: PauMAVA/add-remove-label-action@v1.0.3
48+
uses: PauMAVA/add-remove-label-action@v1
4949
with:
5050
issue_number: ${{ fromJSON(steps.json_reader.outputs.content).pr_num }}
5151
add: ${{ env.ADD_LABELS }}

packages/release/src/buildChangelog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ async function main() {
352352
log.push({
353353
hashes: quoteAddCommits.map((item) => item.hashes).flat(),
354354
type: "impr",
355-
scope: "quote",
355+
scope: "quotes",
356356
message: "add quotes in various languages",
357357
usernames: quoteAddCommits.map((item) => item.usernames).flat(),
358358
prs: quoteAddCommits.map((item) => item.prs).flat(),
@@ -364,7 +364,7 @@ async function main() {
364364
log.push({
365365
hashes: quoteReportCommits.map((item) => item.hashes).flat(),
366366
type: "fix",
367-
scope: "quote",
367+
scope: "quotes",
368368
message: "update or remove quotes reported by users",
369369
usernames: quoteReportCommits.map((item) => item.usernames).flat(),
370370
prs: quoteReportCommits.map((item) => item.prs).flat(),

0 commit comments

Comments
 (0)