Skip to content

Commit

Permalink
Merge master into next-major-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncapi-bot-eve authored and jonaslagoni committed Nov 6, 2022
2 parents a82c4f1 + 77c40b5 commit 57f7d7c
Show file tree
Hide file tree
Showing 66 changed files with 5,347 additions and 379 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/add-good-first-issue-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ jobs:
break;
case 'js':
values[1] = 'javascript';
break;
case 'markdown':
values[1] = 'docs';
break;
}
if(values.length != 2 || !areas.includes(values[1])){
const message = `Hey @${context.payload.sender.login}, your message doesn't follow the requirements, you can try \`/help\`.`
Expand Down
42 changes: 34 additions & 8 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,49 @@
#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
# 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: Lint PR title

on:
pull_request_target:
types: [opened, reopened, synchronize, edited, ready_for_review]

jobs:
lint-pr-title:
name: Lint PR title
runs-on: ubuntu-latest
steps:
name: Lint PR title
runs-on: ubuntu-latest
steps:
# Since this workflow is REQUIRED for a PR to be mergable, we have to have this 'if' statement in step level instead of job level.
- if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor) }}
uses: amannn/[email protected]
uses: amannn/action-semantic-pull-request@505e44b4f33b4c801f063838b3f053990ee46ea7 #version 4.6.0
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
with:
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}" should start with a lowercase character.
# Comments the error message from the above lint_pr_title action
- if: ${{ always() && steps.lint_pr_title.outputs.error_message != null && !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor)}}
name: Comment on PR
uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 #version 2.2
with:
header: pr-title-lint-error
GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
message: |
We require all PRs to follow [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
More details 👇🏼
```
${{ steps.lint_pr_title.outputs.error_message}}
```
# deletes the error comment if the title is correct
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
name: delete the comment
uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 #version 2.2
with:
header: pr-title-lint-error
delete: true
GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
166 changes: 164 additions & 2 deletions .github/workflows/notify-tsc-members-mention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 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

# This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository
name: Notify slack whenever TSC members are mentioned in GitHub
name: Notify slack and email subscribers whenever TSC members are mentioned in GitHub

on:
issue_comment:
Expand Down Expand Up @@ -38,6 +38,9 @@ jobs:
name: TSC notification on every new issue
runs-on: ubuntu-latest
steps:
#########
# Handling Slack notifications
#########
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: issuemarkdown
Expand All @@ -50,12 +53,39 @@ jobs:
SLACK_TITLE: 🆘 New issue that requires TSC Members attention 🆘
SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
MSG_MINIMAL: true
#########
# Handling Mailchimp notifications
#########
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install deps
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v4
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
with:
script: |
const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js');
sendEmail('${{github.event.issue.html_url}}');
pull_request:
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.body, '@asyncapi/tsc_members')
name: TSC notification on every new pull request
runs-on: ubuntu-latest
steps:
#########
# Handling Slack notifications
#########
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: prmarkdown
Expand All @@ -68,12 +98,39 @@ jobs:
SLACK_TITLE: 🆘 New PR that requires TSC Members attention 🆘
SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}}
MSG_MINIMAL: true
#########
# Handling Mailchimp notifications
#########
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install deps
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v4
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
with:
script: |
const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js');
sendEmail('${{github.event.pull_request.html_url}}');
discussion:
if: github.event_name == 'discussion' && contains(github.event.discussion.body, '@asyncapi/tsc_members')
name: TSC notification on every new discussion
runs-on: ubuntu-latest
steps:
#########
# Handling Slack notifications
#########
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: discussionmarkdown
Expand All @@ -86,12 +143,39 @@ jobs:
SLACK_TITLE: 🆘 New discussion that requires TSC Members attention 🆘
SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}}
MSG_MINIMAL: true
#########
# Handling Mailchimp notifications
#########
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install deps
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v4
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
with:
script: |
const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js');
sendEmail('${{github.event.discussion.html_url}}');
issue_comment:
if: ${{ github.event_name == 'issue_comment' && !github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members') }}
name: TSC notification on every new comment in issue
runs-on: ubuntu-latest
steps:
#########
# Handling Slack notifications
#########
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: issuemarkdown
Expand All @@ -104,12 +188,39 @@ jobs:
SLACK_TITLE: 🆘 New comment under existing issue that requires TSC Members attention 🆘
SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
MSG_MINIMAL: true
#########
# Handling Mailchimp notifications
#########
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install deps
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v4
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
with:
script: |
const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js');
sendEmail('${{github.event.comment.html_url}}');
pr_comment:
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members')
name: TSC notification on every new comment in pr
runs-on: ubuntu-latest
steps:
#########
# Handling Slack notifications
#########
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: prmarkdown
Expand All @@ -122,12 +233,39 @@ jobs:
SLACK_TITLE: 🆘 New comment under existing PR that requires TSC Members attention 🆘
SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}}
MSG_MINIMAL: true
#########
# Handling Mailchimp notifications
#########
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install deps
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v4
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
with:
script: |
const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js');
sendEmail('${{github.event.comment.html_url}}');
discussion_comment:
if: github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@asyncapi/tsc_members')
name: TSC notification on every new comment in discussion
runs-on: ubuntu-latest
steps:
#########
# Handling Slack notifications
#########
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: discussionmarkdown
Expand All @@ -139,4 +277,28 @@ jobs:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: 🆘 New comment under existing discussion that requires TSC Members attention 🆘
SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}}
MSG_MINIMAL: true
MSG_MINIMAL: true
#########
# Handling Mailchimp notifications
#########
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install deps
run: npm install
working-directory: ./.github/workflows/scripts/mailchimp
- name: Send email with MailChimp
uses: actions/github-script@v4
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
with:
script: |
const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js');
sendEmail('${{github.event.comment.html_url}}');
1 change: 1 addition & 0 deletions .github/workflows/scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The entire `scripts` directory is centrally managed in [.github](https://github.com/asyncapi/.github/) repository. Any changes in this folder should be done in central repository.
Loading

0 comments on commit 57f7d7c

Please sign in to comment.