Skip to content

Commit 0791e6c

Browse files
authored
Merge branch 'master' into tools-generator-templates
2 parents 405c911 + 483cd82 commit 0791e6c

35 files changed

+1062
-375
lines changed

.github/workflows/add-good-first-issue-labels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Add label
18-
uses: actions/github-script@v6
18+
uses: actions/github-script@v7
1919
with:
2020
github-token: ${{ secrets.GH_TOKEN }}
2121
script: |

.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Add ready-to-merge label
29-
uses: actions/github-script@v6
29+
uses: actions/github-script@v7
3030
with:
3131
github-token: ${{ secrets.GH_TOKEN }}
3232
script: |
@@ -78,7 +78,7 @@ jobs:
7878
runs-on: ubuntu-latest
7979
steps:
8080
- name: Add do-not-merge label
81-
uses: actions/github-script@v6
81+
uses: actions/github-script@v7
8282
with:
8383
github-token: ${{ secrets.GH_TOKEN }}
8484
script: |
@@ -100,7 +100,7 @@ jobs:
100100
runs-on: ubuntu-latest
101101
steps:
102102
- name: Add autoupdate label
103-
uses: actions/github-script@v6
103+
uses: actions/github-script@v7
104104
with:
105105
github-token: ${{ secrets.GH_TOKEN }}
106106
script: |

.github/workflows/automerge-for-humans-merging.yml

+24-18
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,26 @@ jobs:
4040
});
4141
4242
const commits = await github.paginate(commitOpts);
43-
return commits;
43+
44+
if (commits.length === 0) {
45+
core.setFailed('No commits found in the PR');
46+
return '';
47+
}
48+
49+
// Get unique authors from the commits list
50+
const authors = commits.reduce((acc, commit) => {
51+
const username = commit.author?.login || commit.commit.author?.name;
52+
if (username && !acc[username]) {
53+
acc[username] = {
54+
name: commit.commit.author?.name,
55+
email: commit.commit.author?.email,
56+
}
57+
}
58+
59+
return acc;
60+
}, {});
61+
62+
return authors;
4463
} catch (error) {
4564
core.setFailed(error.message);
4665
return [];
@@ -51,26 +70,13 @@ jobs:
5170
uses: actions/github-script@v7
5271
with:
5372
script: |
54-
const commits = ${{ steps.authors.outputs.result }};
73+
const authors = ${{ steps.authors.outputs.result }};
5574
56-
if (commits.length === 0) {
57-
core.setFailed('No commits found in the PR');
75+
if (Object.keys(authors).length === 0) {
76+
core.setFailed('No authors found in the PR');
5877
return '';
5978
}
6079
61-
// Get unique authors from the commits list
62-
const authors = commits.reduce((acc, commit) => {
63-
const username = commit.author?.login || commit.commit.author?.name;
64-
if (username && !acc[username]) {
65-
acc[username] = {
66-
name: commit.commit.author?.name,
67-
email: commit.commit.author?.email,
68-
}
69-
}
70-
71-
return acc;
72-
}, {});
73-
7480
// Create a string of the form "Co-authored-by: Name <email>"
7581
// ref: https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors
7682
const coAuthors = Object.values(authors).map(author => {
@@ -89,6 +95,6 @@ jobs:
8995
MERGE_METHOD: "squash"
9096
# Using the output of the previous step (`Co-authored-by: ...` lines) as commit description.
9197
# Important to keep 2 empty lines as https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors#creating-co-authored-commits-on-the-command-line mentions
92-
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n\n\n${{ steps.create-commit-message.outputs.result }}"
98+
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n\n\n${{ fromJSON(steps.create-commit-message.outputs.result) }}"
9399
MERGE_RETRIES: "20"
94100
MERGE_RETRY_SLEEP: "30000"

.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Remove label
19-
uses: actions/github-script@v6
19+
uses: actions/github-script@v7
2020
with:
2121
github-token: ${{ secrets.GH_TOKEN }}
2222
script: |

.github/workflows/automerge-orphans.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
- name: Get list of orphans
19-
uses: actions/github-script@v6
19+
uses: actions/github-script@v7
2020
id: orphans
2121
with:
2222
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -58,7 +58,7 @@ jobs:
5858
markdown: "-> [${{steps.orphans.outputs.title}}](${{steps.orphans.outputs.url}})"
5959
- if: steps.orphans.outputs.found == 'true'
6060
name: Send info about orphan to slack
61-
uses: rtCamp/action-slack-notify@v2
61+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
6262
env:
6363
SLACK_WEBHOOK: ${{secrets.SLACK_CI_FAIL_NOTIFY}}
6464
SLACK_TITLE: 🚨 Not merged PR that should be automerged 🚨

.github/workflows/automerge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
github-token: "${{ secrets.GH_TOKEN_BOT_EVE }}"
2525

2626
- name: Label autoapproved
27-
uses: actions/github-script@v6
27+
uses: actions/github-script@v7
2828
with:
2929
github-token: ${{ secrets.GH_TOKEN }}
3030
script: |

.github/workflows/bounty-program-commands.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: ❌ @${{github.actor}} made an unauthorized attempt to use a Bounty Program's command
35-
uses: actions/github-script@v6
36-
35+
uses: actions/github-script@v7
3736
with:
3837
github-token: ${{ secrets.GH_TOKEN }}
3938
script: |
@@ -59,8 +58,7 @@ jobs:
5958

6059
steps:
6160
- name: Add label `bounty`
62-
uses: actions/github-script@v6
63-
61+
uses: actions/github-script@v7
6462
with:
6563
github-token: ${{ secrets.GH_TOKEN }}
6664
script: |
@@ -101,8 +99,7 @@ jobs:
10199

102100
steps:
103101
- name: Remove label `bounty`
104-
uses: actions/github-script@v6
105-
102+
uses: actions/github-script@v7
106103
with:
107104
github-token: ${{ secrets.GH_TOKEN }}
108105
script: |

.github/workflows/help-command.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Add comment to PR
17-
uses: actions/github-script@v6
17+
uses: actions/github-script@v7
1818
with:
1919
github-token: ${{ secrets.GH_TOKEN }}
2020
script: |
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
steps:
4545
- name: Add comment to Issue
46-
uses: actions/github-script@v6
46+
uses: actions/github-script@v7
4747
with:
4848
github-token: ${{ secrets.GH_TOKEN }}
4949
script: |
@@ -58,5 +58,6 @@ jobs:
5858
At the moment the following comments are supported in issues:
5959

6060
- \`/good-first-issue {js | ts | java | go | docs | design | ci-cd}\` or \`/gfi {js | ts | java | go | docs | design | ci-cd}\` - label an issue as a \`good first issue\`.
61-
example: \`/gfi js\` or \`/good-first-issue ci-cd\``
61+
example: \`/gfi js\` or \`/good-first-issue ci-cd\`
62+
- \`/transfer-issue {repo-name}\` or \`/ti {repo-name}\` - transfer issue from the source repository to the other repository passed by the user. example: \`/ti cli\` or \`/transfer-issue cli\`.`
6263
})

.github/workflows/issues-prs-notifications.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
markdown: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}"
2828
- name: Send info about issue
29-
uses: rtCamp/action-slack-notify@v2
29+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
3030
env:
3131
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
3232
SLACK_TITLE: 🐛 New Issue in ${{github.repository}} 🐛
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
markdown: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}"
4646
- name: Send info about pull request
47-
uses: rtCamp/action-slack-notify@v2
47+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
4848
env:
4949
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
5050
SLACK_TITLE: 💪 New Pull Request in ${{github.repository}} 💪
@@ -62,7 +62,7 @@ jobs:
6262
with:
6363
markdown: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
6464
- name: Send info about pull request
65-
uses: rtCamp/action-slack-notify@v2
65+
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
6666
env:
6767
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
6868
SLACK_TITLE: 💬 New Discussion in ${{github.repository}} 💬

0 commit comments

Comments
 (0)