-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into react-rewrite-docs
- Loading branch information
Showing
11 changed files
with
269 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
# 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 workflow is designed to work with: | ||
# - autoapprove and automerge workflows for dependabot and asyncapibot. | ||
# - special release branches that we from time to time create in upstream repos. If we open up PRs for them from the very beginning of the release, the release branch will constantly update with new things from the destination branch they are opened against | ||
|
||
# It uses GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch. | ||
# Autoupdating to latest destination branch works only in the context of upstream repo and not forks | ||
|
||
name: autoupdate | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'version-bump/**' | ||
- 'dependabot/**' | ||
- 'bot/**' | ||
- 'all-contributors/**' | ||
|
||
jobs: | ||
autoupdate-for-bot: | ||
if: startsWith(github.repository, 'asyncapi/') | ||
name: Autoupdate autoapproved PR created in the upstream | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Autoupdating | ||
uses: docker://chinthakagodawita/autoupdate-action:v1 | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GH_TOKEN_BOT_EVE }}' | ||
PR_FILTER: "labelled" | ||
PR_LABELS: "autoupdate" | ||
PR_READY_STATE: "ready_for_review" | ||
MERGE_CONFLICT_ACTION: "ignore" | ||
# 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 workflow is designed to work with: | ||
# - autoapprove and automerge workflows for dependabot and asyncapibot. | ||
# - special release branches that we from time to time create in upstream repos. If we open up PRs for them from the very beginning of the release, the release branch will constantly update with new things from the destination branch they are opened against | ||
|
||
# It uses GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch. | ||
# Autoupdating to latest destination branch works only in the context of upstream repo and not forks | ||
|
||
name: autoupdate | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'version-bump/**' | ||
- 'dependabot/**' | ||
- 'bot/**' | ||
- 'all-contributors/**' | ||
|
||
jobs: | ||
autoupdate-for-bot: | ||
if: startsWith(github.repository, 'asyncapi/') | ||
name: Autoupdate autoapproved PR created in the upstream | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Autoupdating | ||
uses: docker://chinthakagodawita/autoupdate-action:v1 | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GH_TOKEN_BOT_EVE }}' | ||
PR_FILTER: "labelled" | ||
PR_LABELS: "autoupdate" | ||
PR_READY_STATE: "ready_for_review" | ||
MERGE_CONFLICT_ACTION: "ignore" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,10 @@ jobs: | |
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Bumping latest version of this package in other repositories | ||
uses: derberg/npm-dependency-manager-for-your-github-org@3df56be95bcaa5c76a9c9a4af863ab151545b649 # using v6.-.- https://github.com/derberg/npm-dependency-manager-for-your-github-org/releases/tag/v6 | ||
uses: derberg/npm-dependency-manager-for-your-github-org@1eafd3bf3974f21d395c1abac855cb04b295d570 # using v6.-.- https://github.com/derberg/npm-dependency-manager-for-your-github-org/releases/tag/v6 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
committer_username: asyncapi-bot | ||
committer_email: [email protected] | ||
repos_to_ignore: spec,bindings,saunter | ||
repos_to_ignore: spec,bindings,saunter,server-api | ||
custom_id: "dependency update from asyncapi bot" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,14 +33,16 @@ jobs: | |
id: should_run | ||
name: Should Run | ||
run: echo "shouldrun=true" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- if: steps.should_run.outputs.shouldrun == 'true' | ||
name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
shell: bash | ||
- if: steps.should_run.outputs.shouldrun == 'true' | ||
name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- if: steps.should_run.outputs.shouldrun == 'true' | ||
name: Check if Node.js project and has package.json | ||
id: packagejson | ||
|
@@ -52,27 +54,26 @@ jobs: | |
id: lockversion | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.lockversion.outputs.version }}" | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest' | ||
#npm cli 10 is buggy because of some cache issue | ||
name: Install npm cli 8 | ||
shell: bash | ||
run: npm install -g [email protected] | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
id: first-installation | ||
run: npm install --loglevel verbose | ||
continue-on-error: true | ||
- if: steps.first-installation.outputs.status == 'failure' && steps.packagejson.outputs.exists == 'true' | ||
name: Clear NPM cache and install deps again | ||
run: | | ||
npm cache clean --force | ||
npm install --loglevel verbose | ||
shell: bash | ||
run: npm ci | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Test | ||
run: npm test --if-present | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
- if: steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest' | ||
#linting should run just one and not on all possible operating systems | ||
name: Run linter | ||
run: npm run lint --if-present | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Run release assets generation to make sure PR does not break it | ||
shell: bash | ||
run: npm run generate:assets --if-present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,9 @@ jobs: | |
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
shell: bash | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT | ||
|
@@ -50,14 +51,18 @@ jobs: | |
id: lockversion | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.lockversion.outputs.version }}" | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest' | ||
name: Install npm cli 8 | ||
shell: bash | ||
#npm cli 10 is buggy because of some cache issues | ||
run: npm install -g [email protected] | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
run: npm install | ||
shell: bash | ||
run: npm ci | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Run test | ||
run: npm test --if-present | ||
|
@@ -81,24 +86,24 @@ jobs: | |
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Check package-lock version | ||
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master | ||
id: lockversion | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.lockversion.outputs.version }}" | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
run: npm install | ||
shell: bash | ||
run: npm ci | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Add plugin for conventional commits for semantic-release | ||
run: npm install --save-dev [email protected] | ||
|
@@ -123,4 +128,4 @@ jobs: | |
fields: repo,action,workflow | ||
text: 'Release workflow failed in release job' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 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 | ||
|
||
# It uses Github actions to listen for comments on issues and pull requests and | ||
# if the comment contains /please-take-a-look or /ptal it will add a comment pinging | ||
# the code-owners who are reviewers for PR | ||
|
||
name: Please take a Look | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
ping-for-attention: | ||
if: > | ||
github.event.issue.pull_request && | ||
github.event.issue.state != 'closed' && | ||
github.actor != 'asyncapi-bot' && | ||
( | ||
contains(github.event.comment.body, '/please-take-a-look') || | ||
contains(github.event.comment.body, '/ptal') || | ||
contains(github.event.comment.body, '/PTAL') | ||
) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for Please Take a Look Command | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
script: | | ||
const prDetailsUrl = context.payload.issue.pull_request.url; | ||
const { data: pull } = await github.request(prDetailsUrl); | ||
const reviewers = pull.requested_reviewers.map(reviewer => reviewer.login); | ||
const { data: reviews } = await github.rest.pulls.listReviews({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.issue.number | ||
}); | ||
const reviewersWhoHaveReviewed = reviews.map(review => review.user.login); | ||
const reviewersWhoHaveNotReviewed = reviewers.filter(reviewer => !reviewersWhoHaveReviewed.includes(reviewer)); | ||
if (reviewersWhoHaveNotReviewed.length > 0) { | ||
const comment = reviewersWhoHaveNotReviewed.filter(reviewer => reviewer !== 'asyncapi-bot-eve' ).map(reviewer => `@${reviewer}`).join(' '); | ||
await github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `${comment} Please take a look at this PR. Thanks! :wave:` | ||
}); | ||
} |
Oops, something went wrong.