From 0ce2dd6af30d875a8a357b5fb835670e8b665fba Mon Sep 17 00:00:00 2001 From: Carlos Tasada Date: Sun, 31 Mar 2024 18:52:38 +0200 Subject: [PATCH 1/4] fix: kafka bindings not using latest version (#508) Co-authored-by: carlos.tasada --- definitions/3.0.0/operationBindingsObject.json | 2 +- definitions/3.0.0/serverBindingsObject.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 26555d2d..dd1744d6 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -131,7 +131,7 @@ "kafka": { "properties": { "bindingVersion": { - "enum": ["0.4.0", "0.3.0"] + "enum": ["0.5.0", "0.4.0", "0.3.0"] } }, "allOf": [ diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 2e65a2a0..91f8b90a 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -50,7 +50,7 @@ "kafka": { "properties": { "bindingVersion": { - "enum": ["0.4.0", "0.3.0"] + "enum": ["0.5.0", "0.4.0", "0.3.0"] } }, "allOf": [ From a0dfbd8c3f8ac01869d61078dee7b30b186df9f8 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Sun, 31 Mar 2024 18:55:24 +0200 Subject: [PATCH 2/4] chore(release): v6.5.4 (#509) --- package-lock.json | 4 ++-- package.json | 2 +- schemas/3.0.0-without-$id.json | 2 ++ schemas/3.0.0.json | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e17dbf3..d3cf2c9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.5.3", + "version": "6.5.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.5.3", + "version": "6.5.4", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index 3aecff62..5785de52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.5.3", + "version": "6.5.4", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 398d434a..34f23ee4 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -1211,6 +1211,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] @@ -6902,6 +6903,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 9fb59b7e..32d55118 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -1244,6 +1244,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] @@ -6990,6 +6991,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] From 4a522abe683b4ea1d057812083245c3880c65a8e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 2 Apr 2024 20:43:20 +0200 Subject: [PATCH 3/4] ci: update of files from global .github repo (#510) --- .github/workflows/if-nodejs-pr-testing.yml | 7 ++++--- .github/workflows/if-nodejs-release.yml | 10 +++++++++- .github/workflows/if-nodejs-version-bump.yml | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 691f8350..75eaaac7 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -33,6 +33,7 @@ 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: | @@ -60,13 +61,13 @@ jobs: - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies id: first-installation - run: npm install --loglevel verbose + run: npm ci 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 + npm ci - if: steps.packagejson.outputs.exists == 'true' name: Test run: npm test --if-present @@ -75,4 +76,4 @@ jobs: 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 - run: npm run generate:assets --if-present \ No newline at end of file + run: npm run generate:assets --if-present diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 4938a37d..fbad21df 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -85,6 +85,7 @@ jobs: - 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 @@ -98,7 +99,14 @@ jobs: cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies - run: npm install + id: first-installation + run: npm ci + 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 ci - if: steps.packagejson.outputs.exists == 'true' name: Add plugin for conventional commits for semantic-release run: npm install --save-dev conventional-changelog-conventionalcommits@5.0.0 diff --git a/.github/workflows/if-nodejs-version-bump.yml b/.github/workflows/if-nodejs-version-bump.yml index 7e27f90b..36847d80 100644 --- a/.github/workflows/if-nodejs-version-bump.yml +++ b/.github/workflows/if-nodejs-version-bump.yml @@ -37,7 +37,7 @@ jobs: cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies - run: npm install + run: npm ci - if: steps.packagejson.outputs.exists == 'true' name: Assets generation run: npm run generate:assets --if-present From a4ae97a6af421592a42306f22b095f960c65fb3a Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 2 Apr 2024 21:50:07 +0200 Subject: [PATCH 4/4] ci: update of files from global .github repo (#511) --- .github/workflows/help-command.yml | 1 + .../workflows/please-take-a-look-command.yml | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/please-take-a-look-command.yml diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index d4ba4a44..ada81682 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -31,6 +31,7 @@ jobs: At the moment the following comments are supported in pull requests: + - \`/please-take-a-look` or \`/ptal\` - This comment will add a comment to the PR asking for attention from the reviewrs who have not reviewed the PR yet. - \`/ready-to-merge\` or \`/rtm\` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added - \`/do-not-merge\` or \`/dnm\` - This comment will block automerging even if all conditions are met and ready-to-merge label is added - \`/autoupdate\` or \`/au\` - This comment will add \`autoupdate\` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.` diff --git a/.github/workflows/please-take-a-look-command.yml b/.github/workflows/please-take-a-look-command.yml new file mode 100644 index 00000000..216055ca --- /dev/null +++ b/.github/workflows/please-take-a-look-command.yml @@ -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 /ping-for-attention or /pfa it will add a comment pinging +# the code-owners who have not yet reviewed the pull request + +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.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:` + }); + }