Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
steps:
- name: Add ready-to-merge label
uses: actions/github-script@v7
env:
GITHUB_ACTOR: ${{ github.actor }}
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down Expand Up @@ -56,7 +58,7 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼
body: `Hello, @${process.env.GITHUB_ACTOR}! 👋🏼
This PR is not up to date with the base branch and can't be merged.
Please update your branch manually with the latest version of the base branch.
PRO-TIP: To request an update from the upstream branch, simply comment \`/u\` or \`/update\` and our bot will handle the update operation promptly.
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/bounty-program-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
steps:
- name: ❌ @${{github.actor}} made an unauthorized attempt to use a Bounty Program's command
uses: actions/github-script@v7
env:
ACTOR: ${{ github.actor }}
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const commentText = `❌ @${{github.actor}} is not authorized to use the Bounty Program's commands.
const commentText = `❌ @${process.env.ACTOR} is not authorized to use the Bounty Program's commands.
These commands can only be used by members of the [Bounty Team](https://github.com/orgs/asyncapi/teams/bounty_team).`;

console.log(`❌ @${{github.actor}} made an unauthorized attempt to use a Bounty Program's command.`);
console.log(`❌ @${process.env.ACTOR} made an unauthorized attempt to use a Bounty Program's command.`);
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: Add comment to PR
uses: actions/github-script@v7
env:
ACTOR: ${{ github.actor }}
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand All @@ -25,7 +27,7 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼
body: `Hello, @${process.env.ACTOR}! 👋🏼

I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!

Expand All @@ -44,14 +46,16 @@ jobs:
steps:
- name: Add comment to Issue
uses: actions/github-script@v7
env:
ACTOR: ${{ github.actor }}
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼
body: `Hello, @${process.env.ACTOR}! 👋🏼

I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!

Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/if-nodejs-version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,23 @@ jobs:
# There is no need to substract "v" from the tag as version script handles it
# When adding "bump:version" script in package.json, make sure no tags are added by default (--no-git-tag-version) as they are already added by release workflow
# When adding "bump:version" script in package.json, make sure --allow-same-version is set in case someone forgot and updated package.json manually and we want to avoide this action to fail and raise confusion
run: VERSION=${{github.event.release.tag_name}} npm run bump:version
env:
VERSION: ${{github.event.release.tag_name}}
run: npm run bump:version
- if: steps.packagejson.outputs.exists == 'true'
name: Create Pull Request with updated asset files including package.json
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # use 4.2.4 https://github.com/peter-evans/create-pull-request/releases/tag/v4.2.4
env:
RELEASE_TAG: ${{github.event.release.tag_name}}
RELEASE_URL: ${{github.event.release.html_url}}
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore(release): ${{github.event.release.tag_name}}'
commit-message: 'chore(release): ${{ env.RELEASE_TAG }}'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore(release): ${{github.event.release.tag_name}}'
body: 'Version bump in package.json for release [${{github.event.release.tag_name}}](${{github.event.release.html_url}})'
branch: version-bump/${{github.event.release.tag_name}}
title: 'chore(release): ${{ env.RELEASE_TAG }}'
body: 'Version bump in package.json for release [${{ env.RELEASE_TAG }}](${{ env.RELEASE_URL }})'
branch: version-bump/${{ env.RELEASE_TAG }}
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 #using https://github.com/8398a7/action-slack/releases/tag/v3.16.2
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/issues-prs-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ jobs:
- name: Convert markdown to slack markdown for issue
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: issuemarkdown
env:
ISSUE_TITLE: ${{github.event.issue.title}}
ISSUE_URL: ${{github.event.issue.html_url}}
ISSUE_BODY: ${{github.event.issue.body}}
with:
markdown: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}"
markdown: "[${{ env.ISSUE_TITLE }}](${{ env.ISSUE_URL }}) \n ${{ env.ISSUE_BODY }}"
- name: Send info about issue
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
Expand All @@ -41,8 +45,12 @@ jobs:
- name: Convert markdown to slack markdown for pull request
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: prmarkdown
env:
PR_TITLE: ${{github.event.pull_request.title}}
PR_URL: ${{github.event.pull_request.html_url}}
PR_BODY: ${{github.event.pull_request.body}}
with:
markdown: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}"
markdown: "[${{ env.PR_TITLE }}](${{ env.PR_URL }}) \n ${{ env.PR_BODY }}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
Expand All @@ -59,8 +67,12 @@ jobs:
- name: Convert markdown to slack markdown for pull request
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: discussionmarkdown
env:
DISCUSSION_TITLE: ${{github.event.discussion.title}}
DISCUSSION_URL: ${{github.event.discussion.html_url}}
DISCUSSION_BODY: ${{github.event.discussion.body}}
with:
markdown: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
markdown: "[${{ env.DISCUSSION_TITLE }}](${{ env.DISCUSSION_URL }}) \n ${{ env.DISCUSSION_BODY }}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
env:
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/release-announcements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@ jobs:
- name: Convert markdown to slack markdown for issue
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: markdown
env:
RELEASE_TAG: ${{github.event.release.tag_name}}
RELEASE_URL: ${{github.event.release.html_url}}
RELEASE_BODY: ${{ github.event.release.body }}
with:
markdown: "[${{github.event.release.tag_name}}](${{github.event.release.html_url}}) \n ${{ github.event.release.body }}"
markdown: "[${{ env.RELEASE_TAG }}](${{ env.RELEASE_URL }}) \n ${{ env.RELEASE_BODY }}"
- name: Send info about release to Slack
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 😱💪🍾🎂
SLACK_TITLE: Release ${{ env.RELEASE_TAG }} for ${{ env.REPO_NAME }} is out in the wild 😱💪🍾🎂
SLACK_MESSAGE: ${{steps.markdown.outputs.text}}
MSG_MINIMAL: true
RELEASE_TAG: ${{github.event.release.tag_name}}
REPO_NAME: ${{github.repository}}

twitter-announce:
name: Twitter - notify on minor and major releases
Expand Down Expand Up @@ -62,17 +68,27 @@ jobs:
- name: Identify release type
id: releasetype
# if previousver is not provided then this steps just logs information about missing version, no errors
run: echo "type=$(npx -q -p semver-diff-cli semver-diff ${{steps.versions.outputs.previousver}} ${{steps.versions.outputs.lastver}})" >> $GITHUB_OUTPUT
env:
PREV_VERSION: ${{steps.versions.outputs.previousver}}
LAST_VERSION: ${{steps.versions.outputs.lastver}}
run: echo "type=$(npx -q -p semver-diff-cli semver-diff "$PREV_VERSION" "$LAST_VERSION")" >> $GITHUB_OUTPUT
- name: Get name of the person that is behind the newly released version
id: author
run: echo "name=$(git log -1 --pretty=format:'%an')" >> $GITHUB_OUTPUT
run: |
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
printf 'name=%s\n' "$AUTHOR_NAME" >> $GITHUB_OUTPUT
- name: Publish information about the release to Twitter # tweet only if detected version change is not a patch
# tweet goes out even if the type is not major or minor but "You need provide version number to compare."
# it is ok, it just means we did not identify previous version as we are tweeting out information about the release for the first time
if: steps.releasetype.outputs.type != 'null' && steps.releasetype.outputs.type != 'patch' # null means that versions are the same
uses: m1ner79/Github-Twittction@d1e508b6c2170145127138f93c49b7c46c6ff3a7 # using 2.0.0 https://github.com/m1ner79/Github-Twittction/releases/tag/v2.0.0
env:
RELEASE_TAG: ${{github.event.release.tag_name}}
REPO_NAME: ${{github.repository}}
AUTHOR_NAME: ${{ steps.author.outputs.name }}
RELEASE_URL: ${{github.event.release.html_url}}
with:
twitter_status: "Release ${{github.event.release.tag_name}} for ${{github.repository}} is out in the wild 😱💪🍾🎂\n\nThank you for the contribution ${{ steps.author.outputs.name }} ${{github.event.release.html_url}}"
twitter_status: "Release ${{ env.RELEASE_TAG }} for ${{ env.REPO_NAME }} is out in the wild 😱💪🍾🎂\n\nThank you for the contribution ${{ env.AUTHOR_NAME }} ${{ env.RELEASE_URL }}"
twitter_consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
twitter_consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
twitter_access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/transfer-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
env:
COMMENT: "${{ github.event.comment.body }}"
run: |
REPO=$(echo $COMMENT | awk '{print $2}')
echo repo=$REPO >> $GITHUB_OUTPUT
REPO=$(echo "$COMMENT" | awk '{print $2}')
echo "repo=$REPO" >> $GITHUB_OUTPUT
- name: Check Repo
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -55,7 +55,8 @@ jobs:
id: transferIssue
working-directory: ./
run: |
gh issue transfer ${{github.event.issue.number}} asyncapi/${{steps.extract_step.outputs.repo}}
gh issue transfer "$ISSUE_NUMBER" "asyncapi/$REPO_NAME"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

ISSUE_NUMBER: ${{ github.event.issue.number }}
REPO_NAME: ${{ steps.extract_step.outputs.repo }}
Loading