diff --git a/.github/workflows/add-good-first-issue-labels.yml b/.github/workflows/add-good-first-issue-labels.yml index 2ae3a056..05d05caf 100644 --- a/.github/workflows/add-good-first-issue-labels.yml +++ b/.github/workflows/add-good-first-issue-labels.yml @@ -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: | diff --git a/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml b/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml index 02d71a79..aed756a8 100644 --- a/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml +++ b/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml @@ -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: | @@ -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: | @@ -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: | diff --git a/.github/workflows/automerge-for-humans-merging.yml b/.github/workflows/automerge-for-humans-merging.yml index 9ba0be90..482c83d7 100644 --- a/.github/workflows/automerge-for-humans-merging.yml +++ b/.github/workflows/automerge-for-humans-merging.yml @@ -18,30 +18,75 @@ on: jobs: automerge-for-humans: - if: github.event.pull_request.draft == false && (github.event.pull_request.user.login != 'asyncapi-bot' || github.event.pull_request.user.login != 'dependabot[bot]' || github.event.pull_request.user.login != 'dependabot-preview[bot]') #it runs only if PR actor is not a bot, at least not a bot that we know + # it runs only if PR actor is not a bot, at least not a bot that we know + if: | + github.event.pull_request.draft == false && + (github.event.pull_request.user.login != 'asyncapi-bot' || + github.event.pull_request.user.login != 'dependabot[bot]' || + github.event.pull_request.user.login != 'dependabot-preview[bot]') runs-on: ubuntu-latest steps: - - name: Get list of authors - uses: sergeysova/jq-action@v2 + - name: Get PR authors id: authors + uses: actions/github-script@v7 with: - # This cmd does following (line by line): - # 1. CURL querying the list of commits of the current PR via GH API. Why? Because the current event payload does not carry info about the commits. - # 2. Iterates over the previous returned payload, and creates an array with the filtered results (see below) so we can work wit it later. An example of payload can be found in https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#webhook-payload-example-34. - # 3. Grabs the data we need for adding the `Co-authored-by: ...` lines later and puts it into objects to be used later on. - # 4. Filters the results by excluding the current PR sender. We don't need to add it as co-author since is the PR creator and it will become by default the main author. - # 5. Removes repeated authors (authors can have more than one commit in the PR). - # 6. Builds the `Co-authored-by: ...` lines with actual info. - # 7. Transforms the array into plain text. Thanks to this, the actual stdout of this step can be used by the next Workflow step (wich is basically the automerge). - cmd: | - curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" "${{github.event.pull_request._links.commits.href}}?per_page=100" | - jq -r '[.[] - | {name: .commit.author.name, email: .commit.author.email, login: .author.login}] - | map(select(.login != "${{github.event.pull_request.user.login}}")) - | unique - | map("Co-authored-by: " + .name + " <" + .email + ">") - | join("\n")' - multiline: true + script: | + // Get paginated list of all commits in the PR + try { + const commitOpts = github.rest.pulls.listCommits.endpoint.merge({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }); + + const commits = await github.paginate(commitOpts); + + 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 []; + } + + - name: Create commit message + id: create-commit-message + uses: actions/github-script@v7 + with: + script: | + const authors = ${{ steps.authors.outputs.result }}; + + if (Object.keys(authors).length === 0) { + core.setFailed('No authors found in the PR'); + return ''; + } + + // Create a string of the form "Co-authored-by: Name " + // 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 => { + return `Co-authored-by: ${author.name} <${author.email}>`; + }).join('\n'); + + core.debug(coAuthors);; + + return coAuthors; + - name: Automerge PR uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 #v0.15.6 https://github.com/pascalgn/automerge-action/releases/tag/v0.15.6 env: @@ -50,6 +95,6 @@ jobs: MERGE_METHOD: "squash" # Using the output of the previous step (`Co-authored-by: ...` lines) as commit description. # 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 - MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n\n\n${{ steps.authors.outputs.value }}" + MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n\n\n${{ fromJSON(steps.create-commit-message.outputs.result) }}" MERGE_RETRIES: "20" MERGE_RETRY_SLEEP: "30000" diff --git a/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml b/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml index 00e7f993..d5a290dd 100644 --- a/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml +++ b/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml @@ -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: | diff --git a/.github/workflows/automerge-orphans.yml b/.github/workflows/automerge-orphans.yml index a1776853..74b485c3 100644 --- a/.github/workflows/automerge-orphans.yml +++ b/.github/workflows/automerge-orphans.yml @@ -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 }} @@ -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 🚨 diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 116b8065..9faa78b1 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -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: | diff --git a/.github/workflows/bounty-program-commands.yml b/.github/workflows/bounty-program-commands.yml index 645e0c90..b103a30a 100644 --- a/.github/workflows/bounty-program-commands.yml +++ b/.github/workflows/bounty-program-commands.yml @@ -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: | @@ -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: | @@ -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: | diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index 3f4dcbc4..07c64ff8 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -10,11 +10,11 @@ on: jobs: create_help_comment_pr: - if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} + if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} 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: | @@ -39,11 +39,11 @@ jobs: }) create_help_comment_issue: - if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} + if: ${{ !github.event.issue.pull_request && startsWith(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} 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: | @@ -58,5 +58,6 @@ jobs: At the moment the following comments are supported in issues: - \`/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\`. - example: \`/gfi js\` or \`/good-first-issue ci-cd\`` + example: \`/gfi js\` or \`/good-first-issue ci-cd\` + - \`/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\`.` }) \ No newline at end of file diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 66ea6552..462e6131 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -14,7 +14,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + # Using macos-13 instead of latest (macos-14) due to an issue with Puppeteer and such runner. + # See: https://github.com/puppeteer/puppeteer/issues/12327 and https://github.com/asyncapi/parser-js/issues/1001 + os: [ubuntu-latest, macos-13, windows-latest] steps: - if: > !github.event.pull_request.draft && !( diff --git a/.github/workflows/issues-prs-notifications.yml b/.github/workflows/issues-prs-notifications.yml index 78ebe960..9d40627f 100644 --- a/.github/workflows/issues-prs-notifications.yml +++ b/.github/workflows/issues-prs-notifications.yml @@ -20,15 +20,13 @@ jobs: name: Notify slack on every new issue runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 - name: Convert markdown to slack markdown for issue uses: asyncapi/.github/.github/actions/slackify-markdown@master id: issuemarkdown 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}} πŸ› @@ -40,15 +38,13 @@ jobs: name: Notify slack on every new pull request runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 - name: Convert markdown to slack markdown for pull request uses: asyncapi/.github/.github/actions/slackify-markdown@master id: prmarkdown 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}} πŸ’ͺ @@ -60,15 +56,13 @@ jobs: name: Notify slack on every new pull request runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 - name: Convert markdown to slack markdown for pull request uses: asyncapi/.github/.github/actions/slackify-markdown@master id: discussionmarkdown 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}} πŸ’¬ diff --git a/.github/workflows/notify-tsc-members-mention.yml b/.github/workflows/notify-tsc-members-mention.yml index d72fd85b..9acc8ef9 100644 --- a/.github/workflows/notify-tsc-members-mention.yml +++ b/.github/workflows/notify-tsc-members-mention.yml @@ -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' @@ -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 πŸ†˜ @@ -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 }} @@ -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' @@ -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 πŸ†˜ @@ -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 }} @@ -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' @@ -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 πŸ†˜ @@ -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 }} @@ -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' @@ -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 πŸ†˜ @@ -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 }} @@ -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' @@ -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 πŸ†˜ @@ -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 }} @@ -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' @@ -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 πŸ†˜ @@ -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 }} diff --git a/.github/workflows/please-take-a-look-command.yml b/.github/workflows/please-take-a-look-command.yml index b26cbc41..84b5a262 100644 --- a/.github/workflows/please-take-a-look-command.yml +++ b/.github/workflows/please-take-a-look-command.yml @@ -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: | diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml index 9587cace..3cb35593 100644 --- a/.github/workflows/release-announcements.yml +++ b/.github/workflows/release-announcements.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Convert markdown to slack markdown for issue uses: asyncapi/.github/.github/actions/slackify-markdown@master id: markdown with: markdown: "[${{github.event.release.tag_name}}](${{github.event.release.html_url}}) \n ${{ github.event.release.body }}" - name: Send info about release to Slack - uses: rtCamp/action-slack-notify@v2 + uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASES }} SLACK_TITLE: Release ${{github.event.release.tag_name}} for ${{github.repository}} is out in the wild 😱πŸ’ͺπŸΎπŸŽ‚ @@ -34,9 +34,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get version of last and previous release - uses: actions/github-script@v6 + uses: actions/github-script@v7 id: versions with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale-issues-prs.yml b/.github/workflows/stale-issues-prs.yml index ed1fcf19..25bee820 100644 --- a/.github/workflows/stale-issues-prs.yml +++ b/.github/workflows/stale-issues-prs.yml @@ -13,7 +13,7 @@ jobs: name: Mark issue or PR as stale runs-on: ubuntu-latest steps: - - uses: actions/stale@99b6c709598e2b0d0841cd037aaf1ba07a4410bd #v5.2.0 but pointing to commit for security reasons + - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 #v9.1.0 but pointing to commit for security reasons with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: | diff --git a/.github/workflows/transfer-issue.yml b/.github/workflows/transfer-issue.yml new file mode 100644 index 00000000..045a621b --- /dev/null +++ b/.github/workflows/transfer-issue.yml @@ -0,0 +1,61 @@ +# This action is centrally managed in https://github.com/asyncapi/.github/ +# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo + +name: Transfer Issues between repositories + +on: + issue_comment: + types: + - created + +permissions: + issues: write + +jobs: + transfer: + if: ${{(!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot') && (startsWith(github.event.comment.body, '/transfer-issue') || startsWith(github.event.comment.body, '/ti'))}} + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Extract Input + id: extract_step + env: + COMMENT: "${{ github.event.comment.body }}" + run: | + REPO=$(echo $COMMENT | awk '{print $2}') + echo repo=$REPO >> $GITHUB_OUTPUT + - name: Check Repo + uses: actions/github-script@v7 + with: + github-token: ${{secrets.GH_TOKEN}} + script: | + const r = "${{github.repository}}" + const [owner, repo] = r.split('/') + const repoToMove = process.env.REPO_TO_MOVE + const issue_number = context.issue.number + try { + const {data} = await github.rest.repos.get({ + owner, + repo: repoToMove + }) + }catch (e) { + const body = `${repoToMove} is not a repo under ${owner}. You can only transfer issue to repos that belong to the same organization.` + await github.rest.issues.createComment({ + owner, + repo, + issue_number, + body + }) + process.exit(1) + } + env: + REPO_TO_MOVE: ${{steps.extract_step.outputs.repo}} + - name: Transfer Issue + id: transferIssue + working-directory: ./ + run: | + gh issue transfer ${{github.event.issue.number}} asyncapi/${{steps.extract_step.outputs.repo}} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/update-maintainers-trigger.yaml b/.github/workflows/update-maintainers-trigger.yaml new file mode 100644 index 00000000..12fc4abe --- /dev/null +++ b/.github/workflows/update-maintainers-trigger.yaml @@ -0,0 +1,28 @@ +# This action is centrally managed in https://github.com/asyncapi/.github/ +# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo + +name: Trigger MAINTAINERS.yaml file update + +on: + push: + branches: [ master ] + paths: + # Check all valid CODEOWNERS locations: + # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location + - 'CODEOWNERS' + - '.github/CODEOWNERS' + - '.docs/CODEOWNERS' + +jobs: + trigger-maintainers-update: + name: Trigger updating MAINTAINERS.yaml because of CODEOWNERS change + runs-on: ubuntu-latest + + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # https://github.com/peter-evans/repository-dispatch/releases/tag/v3.0.0 + with: + # The PAT with the 'public_repo' scope is required + token: ${{ secrets.GH_TOKEN }} + repository: ${{ github.repository_owner }}/community + event-type: trigger-maintainers-update diff --git a/.github/workflows/welcome-first-time-contrib.yml b/.github/workflows/welcome-first-time-contrib.yml index cbc23ce7..2614d8de 100644 --- a/.github/workflows/welcome-first-time-contrib.yml +++ b/.github/workflows/welcome-first-time-contrib.yml @@ -17,7 +17,7 @@ jobs: if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor) }} runs-on: ubuntu-latest steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: |