Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/add-good-first-issue-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add ready-to-merge label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add do-not-merge label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand All @@ -100,7 +100,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add autoupdate label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
40 changes: 23 additions & 17 deletions .github/workflows/automerge-for-humans-merging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,26 @@ jobs:
});

const commits = await github.paginate(commitOpts);
return commits;

if (commits.length === 0) {
core.setFailed('No commits found in the PR');
return '';
}

// Get unique authors from the commits list
const authors = commits.reduce((acc, commit) => {
const username = commit.author?.login || commit.commit.author?.name;
if (username && !acc[username]) {
acc[username] = {
name: commit.commit.author?.name,
email: commit.commit.author?.email,
}
}

return acc;
}, {});

return authors;
} catch (error) {
core.setFailed(error.message);
return [];
Expand All @@ -51,26 +70,13 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const commits = ${{ steps.authors.outputs.result }};
const authors = ${{ steps.authors.outputs.result }};

if (commits.length === 0) {
core.setFailed('No commits found in the PR');
if (Object.keys(authors).length === 0) {
core.setFailed('No authors found in the PR');
return '';
}

// Get unique authors from the commits list
const authors = commits.reduce((acc, commit) => {
const username = commit.author?.login || commit.commit.author?.name;
if (username && !acc[username]) {
acc[username] = {
name: commit.commit.author?.name,
email: commit.commit.author?.email,
}
}

return acc;
}, {});

// Create a string of the form "Co-authored-by: Name <email>"
// ref: https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors
const coAuthors = Object.values(authors).map(author => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Remove label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/automerge-orphans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get list of orphans
uses: actions/github-script@v6
uses: actions/github-script@v7
id: orphans
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
markdown: "-> [${{steps.orphans.outputs.title}}](${{steps.orphans.outputs.url}})"
- if: steps.orphans.outputs.found == 'true'
name: Send info about orphan to slack
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_CI_FAIL_NOTIFY}}
SLACK_TITLE: 🚨 Not merged PR that should be automerged 🚨
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
github-token: "${{ secrets.GH_TOKEN_BOT_EVE }}"

- name: Label autoapproved
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/bounty-program-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:

steps:
- name: ❌ @${{github.actor}} made an unauthorized attempt to use a Bounty Program's command
uses: actions/github-script@v6

uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand All @@ -59,8 +58,7 @@ jobs:

steps:
- name: Add label `bounty`
uses: actions/github-script@v6

uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down Expand Up @@ -101,8 +99,7 @@ jobs:

steps:
- name: Remove label `bounty`
uses: actions/github-script@v6

uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add comment to PR
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add comment to Issue
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issues-prs-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
markdown: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}"
- name: Send info about issue
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
SLACK_TITLE: 🐛 New Issue in ${{github.repository}} 🐛
Expand All @@ -44,7 +44,7 @@ jobs:
with:
markdown: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
SLACK_TITLE: 💪 New Pull Request in ${{github.repository}} 💪
Expand All @@ -62,7 +62,7 @@ jobs:
with:
markdown: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
SLACK_TITLE: 💬 New Discussion in ${{github.repository}} 💬
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/notify-tsc-members-mention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -48,7 +48,7 @@ jobs:
with:
markdown: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}"
- name: Send info about issue
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: 🆘 New issue that requires TSC Members attention 🆘
Expand All @@ -61,7 +61,7 @@ jobs:
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
Expand All @@ -77,9 +77,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -93,7 +93,7 @@ jobs:
with:
markdown: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: 🆘 New PR that requires TSC Members attention 🆘
Expand All @@ -106,7 +106,7 @@ jobs:
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
Expand All @@ -122,9 +122,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -138,7 +138,7 @@ jobs:
with:
markdown: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: 🆘 New discussion that requires TSC Members attention 🆘
Expand All @@ -151,7 +151,7 @@ jobs:
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
Expand All @@ -167,9 +167,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -183,7 +183,7 @@ jobs:
with:
markdown: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
- name: Send info about issue comment
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: 🆘 New comment under existing issue that requires TSC Members attention 🆘
Expand All @@ -196,7 +196,7 @@ jobs:
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
Expand All @@ -212,9 +212,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -228,7 +228,7 @@ jobs:
with:
markdown: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
- name: Send info about PR comment
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: 🆘 New comment under existing PR that requires TSC Members attention 🆘
Expand All @@ -241,7 +241,7 @@ jobs:
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
Expand All @@ -257,9 +257,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand All @@ -273,7 +273,7 @@ jobs:
with:
markdown: "[${{github.event.discussion.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
- name: Send info about discussion comment
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: 🆘 New comment under existing discussion that requires TSC Members attention 🆘
Expand All @@ -286,7 +286,7 @@ jobs:
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/please-take-a-look-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check for Please Take a Look Command
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
Loading