diff --git a/.all-contributorsrc b/.all-contributorsrc index 4d7e8ca0c9b..6d6f30a8602 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -372,9 +372,157 @@ "contributions": [ "code" ] + }, + { + "login": "Amzani", + "name": "samz", + "avatar_url": "https://avatars.githubusercontent.com/u/554438?v=4", + "profile": "https://github.com/Amzani", + "contributions": [ + "code" + ] + }, + { + "login": "BhaswatiRoy", + "name": "Bhaswati Roy ", + "avatar_url": "https://avatars.githubusercontent.com/u/78029145?v=4", + "profile": "https://bhaswatiroy.github.io/Bhaswati-Roy-Portfolio/", + "contributions": [ + "doc" + ] + }, + { + "login": "Mayaleeeee", + "name": "AISHAT MUIBUDEEN", + "avatar_url": "https://avatars.githubusercontent.com/u/105395613?v=4", + "profile": "https://www.behance.net/muibudeenaisha", + "contributions": [ + "design" + ] + }, + { + "login": "nawed2611", + "name": "Nawed Ali", + "avatar_url": "https://avatars.githubusercontent.com/u/83456083?v=4", + "profile": "https://nawedali.tech", + "contributions": [ + "code" + ] + }, + { + "login": "Olaleye-Blessing", + "name": "Olaleye Blessing", + "avatar_url": "https://avatars.githubusercontent.com/u/70102539?v=4", + "profile": "https://www.blessingolaleye.xyz/", + "contributions": [ + "code", + "a11y" + ] + }, + { + "login": "niranjan-kurhade", + "name": "niranjan-kurhade", + "avatar_url": "https://avatars.githubusercontent.com/u/97905637?v=4", + "profile": "https://github.com/niranjan-kurhade", + "contributions": [ + "code" + ] + }, + { + "login": "rukundob451", + "name": "Benjamin Rukundo", + "avatar_url": "https://avatars.githubusercontent.com/u/67878128?v=4", + "profile": "https://linkfree.eddiehub.io/rukundob451", + "contributions": [ + "code" + ] + }, + { + "login": "tthijm", + "name": "tthijm", + "avatar_url": "https://avatars.githubusercontent.com/u/59415467?v=4", + "profile": "https://github.com/tthijm", + "contributions": [ + "infra" + ] + }, + { + "login": "CynthiaPeter", + "name": "Cynthia Peter", + "avatar_url": "https://avatars.githubusercontent.com/u/33583060?v=4", + "profile": "http://cynthiapeter.com", + "contributions": [ + "doc" + ] + }, + { + "login": "Florence-Njeri", + "name": "Florence Njeri", + "avatar_url": "https://avatars.githubusercontent.com/u/40742916?v=4", + "profile": "https://florence-njeri.github.io/NjeriPortfolio", + "contributions": [ + "code" + ] + }, + { + "login": "anshgoyalevil", + "name": "Ansh Goyal", + "avatar_url": "https://avatars.githubusercontent.com/u/94157520?v=4", + "profile": "https://ansh.live", + "contributions": [ + "code", + "review" + ] + }, + { + "login": "SumantxD", + "name": "Sumant.xD", + "avatar_url": "https://avatars.githubusercontent.com/u/65810424?v=4", + "profile": "https://github.com/SumantxD", + "contributions": [ + "infra" + ] + }, + { + "login": "Shriansh2002", + "name": "Shriansh Agarwal", + "avatar_url": "https://avatars.githubusercontent.com/u/41548480?v=4", + "profile": "http://shrianshagarwal.in", + "contributions": [ + "code" + ] + }, + { + "login": "reachaadrika", + "name": "Aadrika Bhargava", + "avatar_url": "https://avatars.githubusercontent.com/u/64789514?v=4", + "profile": "https://github.com/reachaadrika", + "contributions": [ + "code" + ] + }, + { + "login": "vishvamsinh28", + "name": "Vishvamsinh Vaghela", + "avatar_url": "https://avatars.githubusercontent.com/u/90895835?v=4", + "profile": "https://github.com/vishvamsinh28", + "contributions": [ + "code" + ] + }, + { + "login": "AnimeshKumar923", + "name": "Animesh Kumar", + "avatar_url": "https://avatars.githubusercontent.com/u/99868037?v=4", + "profile": "https://github.com/AnimeshKumar923", + "contributions": [ + "doc", + "review" + ] } ], "contributorsPerLine": 7, "skipCi": false, - "commitConvention": "angular" + "commitConvention": "angular", + "commitType": "docs" } diff --git a/.env b/.env deleted file mode 100644 index f1cf7ad8bb8..00000000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -DEPLOY_URL=http://localhost:3000 \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index cae26a89055..7f3e3988821 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,7 +3,7 @@ module.exports = { "browser": true, "es6": true, }, - "extends": ["eslint:recommended", "plugin:react/recommended"], + "extends": ["eslint:recommended", "plugin:react/recommended" , "plugin:cypress/recommended"], "globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly", diff --git a/.github/workflows/add-good-first-issue-labels.yml b/.github/workflows/add-good-first-issue-labels.yml index e70a7001710..2ae3a056ae1 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@v5 + uses: actions/github-script@v6 with: github-token: ${{ secrets.GH_TOKEN }} script: | @@ -52,7 +52,7 @@ jobs: repo: context.repo.repo, })).data.map(label => label.name); - const shouldBeRemoved = currentLabels.filter(label => (label.startsWith('area/') && !label.endsWith(area)); + const shouldBeRemoved = currentLabels.filter(label => (label.startsWith('area/') && !label.endsWith(area))); shouldBeRemoved.forEach(label => { github.rest.issues.deleteLabel({ owner: context.repo.owner, 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 79c8079ecf2..66606fc17aa 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@v5 + uses: actions/github-script@v6 with: github-token: ${{ secrets.GH_TOKEN }} script: | @@ -76,7 +76,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Add do-not-merge label - uses: actions/github-script@v5 + uses: actions/github-script@v6 with: github-token: ${{ secrets.GH_TOKEN }} script: | @@ -98,7 +98,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Add autoupdate label - uses: actions/github-script@v5 + uses: actions/github-script@v6 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 4bce61da233..9ba0be90bd7 100644 --- a/.github/workflows/automerge-for-humans-merging.yml +++ b/.github/workflows/automerge-for-humans-merging.yml @@ -43,7 +43,7 @@ jobs: | join("\n")' multiline: true - name: Automerge PR - uses: pascalgn/automerge-action@v0.14.3 + uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 #v0.15.6 https://github.com/pascalgn/automerge-action/releases/tag/v0.15.6 env: GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}" MERGE_LABELS: "!do-not-merge,ready-to-merge" 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 b8fc9904d9c..00e7f99356d 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@v5 + uses: actions/github-script@v6 with: github-token: ${{ secrets.GH_TOKEN }} script: | diff --git a/.github/workflows/automerge-orphans.yml b/.github/workflows/automerge-orphans.yml index 20322ecb706..a177685357b 100644 --- a/.github/workflows/automerge-orphans.yml +++ b/.github/workflows/automerge-orphans.yml @@ -13,8 +13,10 @@ jobs: name: Find orphans and notify runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 - name: Get list of orphans - uses: actions/github-script@v3 + uses: actions/github-script@v6 id: orphans with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -50,10 +52,10 @@ jobs: } - if: steps.orphans.outputs.found == 'true' name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: issuemarkdown with: - text: "-> [${{steps.orphans.outputs.title}}](${{steps.orphans.outputs.url}})" + 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 diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 052a19c32f2..9253675cd66 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,7 +1,7 @@ # 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: Automerge release bump PR +name: Automerge PRs from bots on: pull_request_target: @@ -19,12 +19,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Autoapproving - uses: hmarr/auto-approve-action@v2 + uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4 # v3.2.1 is used https://github.com/hmarr/auto-approve-action/releases/tag/v3.2.1 with: github-token: "${{ secrets.GH_TOKEN_BOT_EVE }}" - name: Label autoapproved - uses: actions/github-script@v5 + uses: actions/github-script@v6 with: github-token: ${{ secrets.GH_TOKEN }} script: | @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Automerging - uses: pascalgn/automerge-action@v0.13.0 + uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 #v0.15.6 https://github.com/pascalgn/automerge-action/releases/tag/v0.15.6 env: GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}" GITHUB_LOGIN: asyncapi-bot diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index 03f891eba3f..d4ba4a44c40 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -13,32 +13,48 @@ jobs: if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} runs-on: ubuntu-latest steps: - - uses: actions-ecosystem/action-create-comment@v1 + - name: Add comment to PR + uses: actions/github-script@v6 with: - github_token: ${{ secrets.GH_TOKEN }} - body: | - Hello, @${{ github.actor }}! πŸ‘‹πŸΌ + github-token: ${{ secrets.GH_TOKEN }} + script: | + //Yes to add comment to PR the same endpoint is use that we use to create a comment in issue + //For more details http://developer.github.com/v3/issues/comments/ + //Also proved by this action https://github.com/actions-ecosystem/action-create-comment/blob/main/src/main.ts + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `Hello, @${{ github.actor }}! πŸ‘‹πŸΌ + + I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand! + + At the moment the following comments are supported in pull requests: + + - \`/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.` + }) - I'm Genie from the magic lamp. Looks like somebody needs a hand! πŸ†˜ - - At the moment the following comments are supported in pull requests: - - - `/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. create_help_comment_issue: if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} runs-on: ubuntu-latest steps: - - uses: actions-ecosystem/action-create-comment@v1 + - name: Add comment to Issue + uses: actions/github-script@v6 with: - github_token: ${{ secrets.GH_TOKEN }} - body: | - Hello, @${{ github.actor }}! πŸ‘‹πŸΌ - - I'm Genie from the magic lamp. Looks like somebody needs a hand! πŸ†˜ - - 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` + 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 }}! πŸ‘‹πŸΌ + + I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand! + + 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\`` + }) \ No newline at end of file diff --git a/.github/workflows/issues-prs-notifications.yml b/.github/workflows/issues-prs-notifications.yml index ca665404bfe..78ebe960113 100644 --- a/.github/workflows/issues-prs-notifications.yml +++ b/.github/workflows/issues-prs-notifications.yml @@ -20,11 +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: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: issuemarkdown with: - text: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}" + 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 env: @@ -38,11 +40,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: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: prmarkdown with: - text: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}" + 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 env: @@ -56,11 +60,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: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: discussionmarkdown with: - text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}" + 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 env: diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index 65d5b45fbc4..f8cc63d308d 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -10,19 +10,43 @@ jobs: lighthouse-ci: name: Lighthouse CI runs-on: ubuntu-latest - if: "github.repository == 'asyncapi/website' && github.event.pull_request.draft == false &&!((github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'ci: update global workflows')) || (github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'chore(release):')) || (github.actor == 'allcontributors' && startsWith(github.event.pull_request.title, 'docs: add')))" steps: - - uses: actions/checkout@v3 + - if: > + !github.event.pull_request.draft && !( + (github.actor == 'asyncapi-bot' && ( + startsWith(github.event.pull_request.title, 'ci: update global workflows') || + startsWith(github.event.pull_request.title, 'chore: update code of conduct') || + startsWith(github.event.pull_request.title, 'ci: update global contribution guide') || + startsWith(github.event.pull_request.title, 'ci: update workflows for go projects') || + startsWith(github.event.pull_request.title, 'ci: update workflows for nodejs projects') || + startsWith(github.event.pull_request.title, 'ci: update release-related workflows for nodejs projects') || + startsWith(github.event.pull_request.title, 'ci: update semantic release config file') || + startsWith(github.event.pull_request.title, 'ci: update generic workflows') || + startsWith(github.event.pull_request.title, 'ci: update workflows for docker-based projects') || + startsWith(github.event.pull_request.title, 'chore(release):') + )) || + (github.actor == 'allcontributors[bot]' && + startsWith(github.event.pull_request.title, 'docs: add') + ) + ) + id: should_run + name: Should Run + run: echo "shouldrun=true" >> $GITHUB_OUTPUT + + - if: steps.should_run.outputs.shouldrun == 'true' + uses: actions/checkout@v3 - - name: Await Netlify Preview + - if: steps.should_run.outputs.shouldrun == 'true' + name: Await Netlify Preview uses: jakepartusch/wait-for-netlify-action@v1 id: netlify with: site_name: asyncapi-website max_timeout: 600 - - name: Lighthouse Audit + - if: steps.should_run.outputs.shouldrun == 'true' + name: Lighthouse Audit id: lighthouse_audit uses: treosh/lighthouse-ci-action@9.3.0 with: @@ -34,7 +58,8 @@ jobs: env: PR_NUMBER: ${{ github.event.pull_request.number}} - - name: Lighthouse Score Report + - if: steps.should_run.outputs.shouldrun == 'true' + name: Lighthouse Score Report id: lighthouse_score_report uses: actions/github-script@v6 with: @@ -59,7 +84,8 @@ jobs: ].join('\n') core.setOutput("comment", comment); - - name: LightHouse Statistic Comment + - if: steps.should_run.outputs.shouldrun == 'true' + name: LightHouse Statistic Comment id: lighthouse_statistic_comment uses: marocchino/sticky-pull-request-comment@v2.2.0 with: diff --git a/.github/workflows/lighthouserc.json b/.github/workflows/lighthouserc.json index fe53683665f..b1a3b6642d9 100644 --- a/.github/workflows/lighthouserc.json +++ b/.github/workflows/lighthouserc.json @@ -2,7 +2,9 @@ "ci": { "assert": { "assertions": { - "categories:accessibility": ["error", {"minScore": 0.70}] + "categories:accessibility": ["error", {"minScore": 0.98}], + "categories:best-practices": ["error", {"minScore": 1.00}], + "categories:seo": ["error", {"minScore": 1.00}] } }, "collect": { diff --git a/.github/workflows/link-check-cron.yml b/.github/workflows/link-check-cron.yml deleted file mode 100644 index 873d4297f00..00000000000 --- a/.github/workflows/link-check-cron.yml +++ /dev/null @@ -1,37 +0,0 @@ -# This workflow 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: Check Markdown links (Weekly) - -on: - workflow_dispatch: - schedule: - # At 00:00 UTC on every Monday - - cron: '0 0 * * 0' - -jobs: - External-link-validation-weekly: - if: startsWith(github.repository, 'asyncapi/') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - # Checks the status of hyperlinks in .md files - - name: Check links - uses: gaurav-nelson/github-action-markdown-link-check@0a51127e9955b855a9bbfa1ff5577f1d1338c9a5 #1.0.14 but pointing to commit for security reasons - with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - - # A configuration file can be included, indicating the properties of the link check action - # More information can be found here: https://github.com/tcort/markdown-link-check#config-file-format - # Create mlc_config.json file in the root of the directory - - - name: Report workflow run status to Slack - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,action,workflow - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel diff --git a/.github/workflows/link-check-pr.yml b/.github/workflows/link-check-pr.yml deleted file mode 100644 index 51f6cf7806f..00000000000 --- a/.github/workflows/link-check-pr.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow 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: Check Markdown links - -on: - pull_request_target: - types: [synchronize, ready_for_review, opened, reopened] - paths: - - '**.md' - -jobs: - External-link-validation-on-PR: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Check links - uses: gaurav-nelson/github-action-markdown-link-check@0a51127e9955b855a9bbfa1ff5577f1d1338c9a5 #1.0.14 but pointing to commit for security reasons - with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - check-modified-files-only: 'yes' # Only modified files are checked on PRs - - - # A configuration file can be included, indicating the properties of the link check action - # More information can be found here: https://github.com/tcort/markdown-link-check#config-file-format - # Create mlc_config.json file in the root of the directory diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml index c4a942a9114..77aa1c6e4d6 100644 --- a/.github/workflows/lint-pr-title.yml +++ b/.github/workflows/lint-pr-title.yml @@ -13,8 +13,8 @@ jobs: 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/action-semantic-pull-request@505e44b4f33b4c801f063838b3f053990ee46ea7 #version 4.6.0 + - if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor) }} + uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54 #version 5.2.0 https://github.com/amannn/action-semantic-pull-request/releases/tag/v5.2.0 id: lint_pr_title env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} @@ -24,9 +24,9 @@ jobs: 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)}} + - if: ${{ always() && steps.lint_pr_title.outputs.error_message != null && !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor)}} name: Comment on PR - uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 #version 2.2 + uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd #use 2.5.0 https://github.com/marocchino/sticky-pull-request-comment/releases/tag/v2.5.0 with: header: pr-title-lint-error GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} @@ -40,7 +40,7 @@ jobs: # 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 + uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd #use 2.5.0 https://github.com/marocchino/sticky-pull-request-comment/releases/tag/v2.5.0 with: header: pr-title-lint-error delete: true diff --git a/.github/workflows/notify-tsc-members-mention.yml b/.github/workflows/notify-tsc-members-mention.yml index e681c18a069..d72fd85bdbe 100644 --- a/.github/workflows/notify-tsc-members-mention.yml +++ b/.github/workflows/notify-tsc-members-mention.yml @@ -31,14 +31,22 @@ jobs: name: TSC notification on every new issue runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' ######### # Handling Slack notifications ######### - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: issuemarkdown with: - text: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}" + 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 env: @@ -49,19 +57,11 @@ jobs: ######### # 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 + uses: actions/github-script@v6 env: CALENDAR_ID: ${{ secrets.CALENDAR_ID }} CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} @@ -76,14 +76,22 @@ jobs: name: TSC notification on every new pull request runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' ######### # Handling Slack notifications ######### - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: prmarkdown with: - text: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}" + 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 env: @@ -94,19 +102,11 @@ jobs: ######### # 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 + uses: actions/github-script@v6 env: CALENDAR_ID: ${{ secrets.CALENDAR_ID }} CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} @@ -121,14 +121,22 @@ jobs: name: TSC notification on every new discussion runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' ######### # Handling Slack notifications ######### - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: discussionmarkdown with: - text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}" + 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 env: @@ -139,19 +147,11 @@ jobs: ######### # 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 + uses: actions/github-script@v6 env: CALENDAR_ID: ${{ secrets.CALENDAR_ID }} CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} @@ -166,14 +166,22 @@ jobs: name: TSC notification on every new comment in issue runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' ######### # Handling Slack notifications ######### - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: issuemarkdown with: - text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" + 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 env: @@ -184,19 +192,11 @@ jobs: ######### # 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 + uses: actions/github-script@v6 env: CALENDAR_ID: ${{ secrets.CALENDAR_ID }} CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} @@ -211,14 +211,22 @@ jobs: name: TSC notification on every new comment in pr runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' ######### # Handling Slack notifications ######### - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: prmarkdown with: - text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" + 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 env: @@ -229,19 +237,11 @@ jobs: ######### # 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 + uses: actions/github-script@v6 env: CALENDAR_ID: ${{ secrets.CALENDAR_ID }} CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} @@ -256,14 +256,22 @@ jobs: name: TSC notification on every new comment in discussion runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' ######### # Handling Slack notifications ######### - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: discussionmarkdown with: - text: "[${{github.event.discussion.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" + 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 env: @@ -274,19 +282,11 @@ jobs: ######### # 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 + uses: actions/github-script@v6 env: CALENDAR_ID: ${{ secrets.CALENDAR_ID }} CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml index b2f3ba76dda..9587caceeb4 100644 --- a/.github/workflows/release-announcements.yml +++ b/.github/workflows/release-announcements.yml @@ -14,11 +14,13 @@ jobs: name: Slack - notify on every release runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 - name: Convert markdown to slack markdown for issue - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + uses: asyncapi/.github/.github/actions/slackify-markdown@master id: markdown with: - text: "[${{github.event.release.tag_name}}](${{github.event.release.html_url}}) \n ${{ github.event.release.body }}" + 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 env: @@ -32,9 +34,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get version of last and previous release - uses: actions/github-script@v3 + uses: actions/github-script@v6 id: versions with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -60,15 +62,15 @@ 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 "::set-output name=type::$(npx -q -p semver-diff-cli semver-diff ${{steps.versions.outputs.previousver}} ${{steps.versions.outputs.lastver}})" + run: echo "type=$(npx -q -p semver-diff-cli semver-diff ${{steps.versions.outputs.previousver}} ${{steps.versions.outputs.lastver}})" >> $GITHUB_OUTPUT - name: Get name of the person that is behind the newly released version id: author - run: echo "::set-output name=name::$(git log -1 --pretty=format:'%an')" + run: echo "name=$(git log -1 --pretty=format:'%an')" >> $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@v1.0.1 + uses: m1ner79/Github-Twittction@d1e508b6c2170145127138f93c49b7c46c6ff3a7 # using 2.0.0 https://github.com/m1ner79/Github-Twittction/releases/tag/v2.0.0 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_consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }} diff --git a/.github/workflows/scripts/mailchimp/package-lock.json b/.github/workflows/scripts/mailchimp/package-lock.json index 089364fa826..7ee7d84f86f 100644 --- a/.github/workflows/scripts/mailchimp/package-lock.json +++ b/.github/workflows/scripts/mailchimp/package-lock.json @@ -7,25 +7,24 @@ "name": "schedule-email", "license": "Apache 2.0", "dependencies": { - "@actions/core": "1.9.1", + "@actions/core": "1.6.0", "@mailchimp/mailchimp_marketing": "3.0.74" } }, "node_modules/@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz", + "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==", "dependencies": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" + "@actions/http-client": "^1.0.11" } }, "node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", + "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", "dependencies": { - "tunnel": "^0.0.6" + "tunnel": "0.0.6" } }, "node_modules/@mailchimp/mailchimp_marketing": { @@ -74,9 +73,9 @@ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" }, "node_modules/cookiejar": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", - "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", + "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==" }, "node_modules/core-util-is": { "version": "1.0.3", @@ -332,32 +331,23 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } } }, "dependencies": { "@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz", + "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==", "requires": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" + "@actions/http-client": "^1.0.11" } }, "@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", + "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", "requires": { - "tunnel": "^0.0.6" + "tunnel": "0.0.6" } }, "@mailchimp/mailchimp_marketing": { @@ -397,9 +387,9 @@ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" }, "cookiejar": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", - "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", + "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==" }, "core-util-is": { "version": "1.0.3", @@ -602,11 +592,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" } } -} +} \ No newline at end of file diff --git a/.github/workflows/scripts/mailchimp/package.json b/.github/workflows/scripts/mailchimp/package.json index 28b447ff7ce..cc50e43e029 100644 --- a/.github/workflows/scripts/mailchimp/package.json +++ b/.github/workflows/scripts/mailchimp/package.json @@ -3,7 +3,7 @@ "description": "This code is responsible for scheduling an email campaign. This file is centrally managed in https://github.com/asyncapi/.github/", "license": "Apache 2.0", "dependencies": { - "@actions/core": "1.9.1", + "@actions/core": "1.6.0", "@mailchimp/mailchimp_marketing": "3.0.74" } } \ No newline at end of file diff --git a/.github/workflows/sentiment-analysis.yml b/.github/workflows/sentiment-analysis.yml deleted file mode 100644 index cd8ab05f79c..00000000000 --- a/.github/workflows/sentiment-analysis.yml +++ /dev/null @@ -1,45 +0,0 @@ -# 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: 'Sentiment Analysis' - -on: - issue_comment: - types: - - created - - edited - issues: - types: - - opened - - edited - pull_request: - types: - - opened - - edited - pull_request_review: - types: - - submitted - - edited - pull_request_review_comment: - types: - - created - - edited -jobs: - sentiments: - if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor) }} - name: Checking sentiments - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Check sentiment - uses: derberg/code-of-conduct-sentiment-analysis-github-action@v1 - id: sentiments - with: - gcp_key: ${{ secrets.GCP_KEY_SENTIMENT }} - - uses: someimportantcompany/github-actions-slack-message@v1 - # this step runs only if sentiment is a negative number - if: steps.sentiments.outputs.sentiment < -0.6 - with: - webhook-url: ${{ secrets.SLACK_SENTIMENTS }} - text: Here ${{steps.sentiments.outputs.source}} you can find a potential negative text that requires your attention as the sentiment analysis score is ${{steps.sentiments.outputs.sentiment}} - color: orange \ No newline at end of file diff --git a/.github/workflows/validate-case-studies-structures.yaml b/.github/workflows/validate-case-studies-structures.yaml new file mode 100644 index 00000000000..3b73be6a753 --- /dev/null +++ b/.github/workflows/validate-case-studies-structures.yaml @@ -0,0 +1,58 @@ +name: Validate case studies structures + +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + paths: + - 'config/casestudies/*.yml' + +jobs: + validate: + if: github.event.pull_request.draft == false + name: Validate + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v35 + with: + files: config/casestudies/*.yml + - name: Install ajv and yaml + run: npm install ajv@8.12.0 ajv-formats@2.1.1 yaml@2.2.1 + - name: Run validation script + uses: actions/github-script@v6 + with: + script: | + const { readFile } = require("fs/promises"); + const Ajv = require("ajv"); + const addFormats = require("ajv-formats"); + const YAML = require("yaml"); + + const ajv = new Ajv({ + allErrors: true, + }); + + addFormats(ajv); + + try { + const schema = await readFile("scripts/casestudies/schema.json", "utf-8"); + const fileNames = `${{steps.changed-files.outputs.all_changed_files}}`.trim().split(" "); + + const validate = ajv.compile(JSON.parse(schema)); + + for (const fileName of fileNames) { + const study = await readFile(fileName, "utf-8"); + const valid = validate(YAML.parse(study)); + + if (valid === true) { + core.info(`${fileName} is valid`); + } else { + core.setFailed(`${fileName} is invalid:`); + core.setFailed(validate.errors); + } + } + } catch (error) { + core.setFailed(error); + } diff --git a/.github/workflows/welcome-first-time-contrib.yml b/.github/workflows/welcome-first-time-contrib.yml index e72fecef88b..cbc23ce7c2f 100644 --- a/.github/workflows/welcome-first-time-contrib.yml +++ b/.github/workflows/welcome-first-time-contrib.yml @@ -14,14 +14,14 @@ on: jobs: welcome: name: Post welcome message - if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor) }} + if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor) }} runs-on: ubuntu-latest steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const issueMessage = `Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our [contributors guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and the instructions about a [basic recommended setup](https://github.com/asyncapi/.github/blob/master/git-workflow.md) useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).`; + const issueMessage = `Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our [contributors guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and the instructions about a [basic recommended setup](https://github.com/asyncapi/community/blob/master/git-workflow.md) useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).`; const prMessage = `Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our [contributors guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).`; if (!issueMessage && !prMessage) { throw new Error('Action must have at least one of issue-message or pr-message set'); @@ -65,7 +65,7 @@ jobs: if (isIssue) { const issueNumber = context.payload.issue.number; console.log(`Adding message: ${message} to issue #${issueNumber}`); - await github.issues.createComment({ + await github.rest.issues.createComment({ owner: context.payload.repository.owner.login, repo: context.payload.repository.name, issue_number: issueNumber, @@ -75,7 +75,7 @@ jobs: else { const pullNumber = context.payload.pull_request.number; console.log(`Adding message: ${message} to pull request #${pullNumber}`); - await github.pulls.createReview({ + await github.rest.pulls.createReview({ owner: context.payload.repository.owner.login, repo: context.payload.repository.name, pull_number: pullNumber, diff --git a/.gitignore b/.gitignore index b6bde4627c3..ed771f133ca 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,10 @@ node_modules .swc out config/posts.json +config/case-studies.json public/rss.xml .env.local yarn.lock meetings.json +.netlify +.env diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..fa29cdfff91 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +** \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index a135a295596..db47e3d311e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,9 +5,12 @@ # For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/. # The default owners are automatically added as reviewers when you open a pull request unless different owners are specified in the file. -* @fmvilas @derberg @mcturco @akshatnema @magicmatatjahu @asyncapi-bot-eve +* @derberg @akshatnema @magicmatatjahu @mayaleeeee @asyncapi-bot-eve # All .md files *.md @alequetzalli @asyncapi-bot-eve -README.md @alequetzalli @fmvilas @derberg @mcturco @akshatnema @magicmatatjahu @asyncapi-bot-eve \ No newline at end of file +pages/blog/*.md @thulieblack @alequetzalli +pages/community/*.md @thulieblack @alequetzalli + +README.md @alequetzalli @derberg @akshatnema @magicmatatjahu @mayaleeeee @asyncapi-bot-eve diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45c7fac426b..1334921c281 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ The following is a summary of the ideal contribution flow. Please, note that Pul AsyncAPI has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](./CODE_OF_CONDUCT.md) so that you can understand what sort of behaviour is expected. ## Our Development Process -We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. +We use Github to host code, to track issues and feature requests, as well as accept pull requests. ## Issues [Open an issue](https://github.com/asyncapi/asyncapi/issues/new) **only** if you want to report a bug or a feature. Don't open issues for questions or support, instead join our [Slack workspace](https://www.asyncapi.com/slack-invite) and ask there. Don't forget to follow our [Slack Etiquette](https://github.com/asyncapi/community/blob/master/slack-etiquette.md) while interacting with community members! It's more likely you'll get help, and much faster! diff --git a/README.md b/README.md index 9accc35b1a6..9b65b8f373a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ --- -[![All Contributors](https://img.shields.io/badge/all_contributors-36-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-52-orange.svg?style=flat-square)](#contributors-) [![Netlify Status](https://api.netlify.com/api/v1/badges/b2137407-b765-46c4-95b5-a72d9b1592ab/deploy-status)](https://app.netlify.com/sites/asyncapi-website/deploys) @@ -23,32 +23,47 @@ Use the following tools to set up the project: - [Node.js](https://nodejs.org/) v16.0.0+ - [npm](https://www.npmjs.com/) v7.10.0+ -## Usage -### Install dependencies +## Run locally -To install all dependencies, run this command: +1. Fork the repository by clicking on `Fork` option on top right of the main repository. + +2. Open Command Prompt on your local computer. + +3. Clone the forked repository by adding your own GitHub username in place of ``. + For multiple contributions it is recommended to have [proper configuration of forked repo](https://github.com/asyncapi/community/blob/master/git-workflow.md). ```bash -npm install + git clone https://github.com//website/ ``` -### Develop +4. Navigate to the website directory. + +```bash + cd website +``` -Launch the development server with the hot reloading functionality that allows any change in files to be immediately visible in the browser. Use this command: +5. Install all website dependencies. ```bash -npm run dev + npm install ``` -You can access the live development server at [localhost:3000](http://localhost:3000). +6. Run the website locally. + +```bash + npm run dev +``` + +7. Access the live development server at [localhost:3000](http://localhost:3000). -#### Compose a new blog post + +## Compose new blog post To bootstrap a new post, run this command: ```bash -npm run write:blog + npm run write:blog ``` Follow the interactive prompt to generate a post with pre-filled front matter. @@ -69,6 +84,27 @@ npm run build Generated files of the website go to the `.next` folder. +## Case studies + +### Overview + +A case study is a special document that any end-user company can provide. An end-user company is a company that uses AsyncAPI to solve technical challenges. A case study is not a document where a vendor company can describe how they build their commercial AsyncAPI-based product. On the other hand, it is completely fine if a case study of some end-user mentions some commercial tools that helped them to work with AsyncAPI or event-driven architecture. An example of such a case can be a case study from an end-user where at some point, Confluent Schema Registry is mentioned in an explanation about schemas and runtime message validation. + +### How to add a case study + +A case study is documented in the form of a YAML file. Anyone can open a pull request with a new case study. + +- YAML file must be located in `config/casestudies`. +- To make it easier for you to create such a YAML file you can use: + - [Template YAML with comments explaining every section](scripts/casestudies/casestudy_template.yml) + - [JSON Schema that describes all YAML fields](scripts/casestudies/schema.json) +- All additional files for the case study, like complete AsyncAPI document examples, should be located in the `public/resources/casestudies` directory. +- Company logo and other images that will be rendered in the website should be located in `public/img/casestudies`. + +Once you collect all information and create a case study, open a pull request. It must be authored or at least approved by a representative of the given company. Such a representative is probably already a contact person mentioned in the case study. + +A case study becomes publicly available right after merging and rebuilding the website. + ## JSON Schema definitions All AsyncAPI JSON Schema definition files are being served within the `/definitions/` path. The content is being served from GH, in particular from https://github.com/asyncapi/spec-json-schemas/tree/master/schemas. @@ -93,7 +129,8 @@ This repository has the following structure: β”œβ”€β”€ pages # Website's pages source. It includes raw markdown files and React page templates. β”‚ β”œβ”€β”€ about # Raw blog for /about page β”‚ β”œβ”€β”€ blog # Blog posts - β”‚ └── docs # Blog for /docs/* pages + β”‚ β”œβ”€β”€ docs # Blog for /docs/* pages + β”‚ └── tools # Various pages to describe tools β”œβ”€β”€ public # Data for site metadata and static blog such as images β”œβ”€β”€ scripts # Scripts used in the build and dev processes β”œβ”€β”€ next.config.js # Next.js configuration file @@ -103,7 +140,7 @@ This repository has the following structure: └── tailwind.config.js # TailwindCSS configuration file ``` -## Contributors ✨ +## Contributors Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): @@ -159,6 +196,26 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Ankit Chaudhary
Ankit Chaudhary

πŸ’» + samz
samz

πŸ’» + Bhaswati Roy
Bhaswati Roy

πŸ“– + AISHAT MUIBUDEEN
AISHAT MUIBUDEEN

🎨 + Nawed Ali
Nawed Ali

πŸ’» + Olaleye Blessing
Olaleye Blessing

πŸ’» ️️️️♿️ + niranjan-kurhade
niranjan-kurhade

πŸ’» + + + Benjamin Rukundo
Benjamin Rukundo

πŸ’» + tthijm
tthijm

πŸš‡ + Cynthia Peter
Cynthia Peter

πŸ“– + Florence Njeri
Florence Njeri

πŸ’» + Ansh Goyal
Ansh Goyal

πŸ’» πŸ‘€ + Sumant.xD
Sumant.xD

πŸš‡ + Shriansh Agarwal
Shriansh Agarwal

πŸ’» + + + Aadrika Bhargava
Aadrika Bhargava

πŸ’» + Vishvamsinh Vaghela
Vishvamsinh Vaghela

πŸ’» + Animesh Kumar
Animesh Kumar

πŸ“– πŸ‘€ diff --git a/assets/docs/fragments/cli-installation.md b/assets/docs/fragments/cli-installation.md index 67a0796c852..ea6f57b9cca 100644 --- a/assets/docs/fragments/cli-installation.md +++ b/assets/docs/fragments/cli-installation.md @@ -29,6 +29,16 @@ You can install in Linux via `dpkg`, a debian package manager: 1. `curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.deb` 2. `sudo dpkg -i asyncapi.deb` + + +
+Windows + +For Windows, install the appropriate installer and follow the default installation steps to complete the installation process. + +Download [asyncapi.x64.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x64.exe) for 64-bit Windows and [asyncapi.x86.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x86.exe) for 32-bit Windows. + +
diff --git a/assets/docs/fragments/how-to-contribute.md b/assets/docs/fragments/how-to-contribute.md new file mode 100644 index 00000000000..932347021a1 --- /dev/null +++ b/assets/docs/fragments/how-to-contribute.md @@ -0,0 +1,23 @@ +## How to contribute to AsyncAPI Docs + +Did you know that you can contribute Docs to AsyncAPI as well? Code isn't the only way to contribute to OSS; Dev Docs are a **huge** help that benefit the entire OSS ecosystem. At AsyncAPI, we value Doc contributions as much as every other type of contribution. ❀️ + +To get started as a Docs contributor: + +1. Familiarize yourself with our [project's Contribution Guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and our [Code of Conduct](https://github.com/asyncapi/.github/blob/master/CODE_OF_CONDUCT.md). + +2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12). + +3. Pick an issue you would like to contribute to and leave a comment introducing yourself. This is also the perfect place to leave any questions you may have on how to get started. + +4. If there is no work done in that Docs issue yet, feel free to open a PR and get started! + +### Tag me in your AsyncAPI Doc PRs + +Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear! + +Tag me in your AsyncAPI Doc PRs or [GitHub Discussions](https://github.com/asyncapi/community/discussions/categories/docs) via my GitHub handle, [`/alequetzalli`](https://github.com/alequetzalli) πŸ™. + +### Talk to me + +I want and need to listen πŸ‘‚πŸ½ to all of your perspectives and ideas. Please don't be shy to express to me what you think needs to be documented first or what is missing. πŸ“ There's a lot of good work ahead, but **you** determine _our content roadmap_ because the OSS community needs should always come first.✨ \ No newline at end of file diff --git a/components/AlgoliaSearch.js b/components/AlgoliaSearch.js index c71aea80bae..96a98dcc273 100644 --- a/components/AlgoliaSearch.js +++ b/components/AlgoliaSearch.js @@ -11,7 +11,7 @@ export const DOCS_INDEX_NAME = 'asyncapi-docs'; const APP_ID = 'Z621OGRI9Y'; const API_KEY = '5a4122ae46ce865146d23d3530595d38'; -const SearchContext = createContext() +const SearchContext = createContext({}); export default function AlgoliaSearch({ children }) { const [isOpen, setIsOpen] = useState(false); @@ -47,14 +47,7 @@ export default function AlgoliaSearch({ children }) { - + {children} {isOpen && } @@ -169,6 +162,7 @@ export function SearchButton({ children, indexName = INDEX_NAME, ...props }) { onOpen(indexName); }} {...props} + data-testid="Search-Button" > {typeof children === 'function' ? children({ actionKey }) : children} diff --git a/components/AuthorAvatars.js b/components/AuthorAvatars.js index c3e740ff212..0ce49ba1fc4 100644 --- a/components/AuthorAvatars.js +++ b/components/AuthorAvatars.js @@ -1,15 +1,25 @@ +import React from 'react' export default function AuthorAvatars({ authors = [] }) { return ( authors.map((author, index) => { - let avatar = 0 ? `absolute left-${index * 7} top-0` : `relative mr-${(authors.length - 1) * 7}`} z-${(authors.length - 1 - index) * 10} h-10 w-10 border-2 border-white rounded-full object-cover hover:z-50`} - src={author.photo} - loading="lazy" - /> + let avatar = ( + 0 ? `absolute left-${index * 7} top-0` : `relative mr-${(authors.length - 1) * 7}`} z-${(authors.length - 1 - index) * 10} h-10 w-10 border-2 border-white rounded-full object-cover hover:z-50`} + src={author.photo} + loading="lazy" + data-testid="AuthorAvatars-img" + /> + ); - return author.link ? {avatar} : {avatar} + return author.link ? ( + + {avatar} + + ) : ( + {avatar} + ); }) - ) -} \ No newline at end of file + ); +} diff --git a/components/Calendar.js b/components/Calendar.js index 8431a5416f1..f4bd6c1039f 100644 --- a/components/Calendar.js +++ b/components/Calendar.js @@ -1,25 +1,12 @@ -import moment from 'moment'; import eventsData from '../config/meetings.json'; import GoogleCalendarButton from './buttons/GoogleCalendarButton'; import Heading from './typography/Heading'; +import { getEvents } from '../lib/staticHelpers'; export default function Calendar({ className = '', size, text="text-left" }) { const CALENDAR_URL = 'https://calendar.google.com/calendar/embed?src=c_q9tseiglomdsj6njuhvbpts11c%40group.calendar.google.com&ctz=UTC'; const eventsExist = eventsData.length > 0; - - function getEvents() { - let meetingsWithDates = eventsData.map((event) => ({ - ...event, - date: moment(event.date), - })); - meetingsWithDates.sort((a, b) => a.date - b.date); - return meetingsWithDates - .filter((meeting) => meeting.date > new Date()) - .slice(0, size || meetingsWithDates.length); - } - - return (
    - {getEvents().map((event, index) => ( -
  • + {getEvents(eventsData, size).map((event, index) => ( +
  • {eventsExist ? -
    +
    +

    {children}

    ) diff --git a/components/CaseStudyCard.js b/components/CaseStudyCard.js new file mode 100644 index 00000000000..fc741b4c487 --- /dev/null +++ b/components/CaseStudyCard.js @@ -0,0 +1,29 @@ +import Paragraph from './typography/Paragraph'; + +export default function CaseStudyCard({ + studies = [] +}) { + if(studies.length === 0){ + return null; + } + return ( +
    + ); +} diff --git a/components/Feedback.js b/components/Feedback.js index 73d96599c54..d369b7a9e65 100644 --- a/components/Feedback.js +++ b/components/Feedback.js @@ -50,7 +50,7 @@ export default function Feedback(className = '') {
    -
    +
    Thank you for your feedback!
    @@ -71,7 +71,7 @@ export default function Feedback(className = '') {
    -
    +
    Oops! Something went wrong...
    @@ -84,7 +84,7 @@ export default function Feedback(className = '') { return (
    - +
    Was this helpful? diff --git a/components/Figure.js b/components/Figure.js index 35887e0726a..ed5c75dc6db 100644 --- a/components/Figure.js +++ b/components/Figure.js @@ -12,9 +12,9 @@ export default function Figure ({ src, caption, widthClass, className, float, al } return ( -
    +
    - {alt} + {alt} { caption && ({caption}) }
    diff --git a/components/Footer.js b/components/Footer.js deleted file mode 100644 index 3232910c46e..00000000000 --- a/components/Footer.js +++ /dev/null @@ -1,184 +0,0 @@ -import IconTwitter from "./icons/Twitter" -import IconGithub from "./icons/Github" -import IconYoutubeGray from "./icons/YouTubeGray" -import IconLinkedIn from "./icons/LinkedIn" -import Link from "next/link" -import AsyncAPILogoLight from "./AsyncAPILogoLight" -import IconSlack from "./icons/Slack" -import IconTwitch from "./icons/Twitch" -import Heading from "./typography/Heading" - -export default function Footer() { - return ( - - ) -} diff --git a/components/GoldSponsors.js b/components/GoldSponsors.js deleted file mode 100644 index b1b58e21249..00000000000 --- a/components/GoldSponsors.js +++ /dev/null @@ -1,21 +0,0 @@ -export default function GoldSponsors({ className = '', showSupportBanner = true }){ - return( -
    -
    - - Red Hat - -
    -
    - ) - -} diff --git a/components/Head.js b/components/Head.js index 5facad2954e..b353336ad2d 100644 --- a/components/Head.js +++ b/components/Head.js @@ -1,24 +1,33 @@ -import { useContext } from 'react' -import Head from 'next/head' -import AppContext from '../context/AppContext' -import ReactGA from 'react-ga' -import TagManager from 'react-gtm-module' +import { useContext, useEffect } from 'react'; +import Head from 'next/head'; +import AppContext from '../context/AppContext'; +import ReactGA from 'react-ga'; +import TagManager from 'react-gtm-module'; export default function HeadComponent({ title, description = 'Open source tools to easily build and maintain your event-driven architecture. All powered by the AsyncAPI specification, the industry standard for defining asynchronous APIs.', image = '/img/social/website-card.jpg', rssTitle = 'RSS Feed for AsyncAPI Initiative Blog', - rssLink = '/rss.xml' + rssLink = '/rss.xml', }) { - const url = process.env.DEPLOY_PRIME_URL || process.env.DEPLOY_URL - const { path = '' } = useContext(AppContext) - const permalink = `${url}${path}` - let type = 'website' - if (path.startsWith('/docs') || path.startsWith('/blog')) type = 'article' - if (!image.startsWith('http') && !image.startsWith('https')) image = `${url}${image}` - const permTitle = 'AsyncAPI Initiative for event-driven APIs' - title = title ? `${title} | ${permTitle}` : permTitle + const url = process.env.DEPLOY_PRIME_URL || process.env.DEPLOY_URL || 'http://localhost:3000'; + const appContext = useContext(AppContext); + const { path = '' } = appContext || {}; + + const permalink = `${url}${path}`; + let type = 'website'; + + if (path.startsWith('/docs') || path.startsWith('/blog')) { + type = 'article'; + } + + if (!image.startsWith('http') && !image.startsWith('https')) { + image = `${url}${image}`; + } + + const permTitle = 'AsyncAPI Initiative for event-driven APIs'; + title = title ? `${title} | ${permTitle}` : permTitle; //enable google analytics if (typeof window !== 'undefined') { @@ -27,6 +36,7 @@ export default function HeadComponent({ ReactGA.pageview(window.location.pathname + window.location.search) } + return ( @@ -50,13 +60,13 @@ export default function HeadComponent({ - + {/* Twitter Card data */} - + {/* Open Graph data */} @@ -66,5 +76,5 @@ export default function HeadComponent({ {title} - ) + ); } diff --git a/components/Hero.js b/components/Hero.js index 471441ecb50..b6327942d60 100644 --- a/components/Hero.js +++ b/components/Hero.js @@ -6,7 +6,7 @@ import DemoAnimation from './DemoAnimation' import AnnouncementHero from '../components/campaigns/AnnoucementHero' import Heading from './typography/Heading' import Paragraph from './typography/Paragraph' -import { SearchButton } from './AlgoliaSearch'; +import AlgoliaSearch, { SearchButton } from './AlgoliaSearch'; // Import AlgoliaSearch component import IconLoupe from './icons/Loupe'; export default function Hero({ className = ''}) { @@ -28,28 +28,32 @@ export default function Hero({ className = ''}) { industry standard for defining asynchronous APIs.
    -
    Proud to be part of the {" "} @@ -66,3 +70,4 @@ export default function Hero({ className = ''}) { ); } + diff --git a/components/InlineHelp.js b/components/InlineHelp.js index f052041f30b..41581eb9dbe 100644 --- a/components/InlineHelp.js +++ b/components/InlineHelp.js @@ -18,10 +18,10 @@ export default function InlineHelp({
    { isHelpVisible && ( -
    {text}
    +
    {text}
    ) } - setIsHelpVisible(!isHelpVisible)} onMouseEnter={() => setIsHelpVisible(true)} onMouseLeave={() => setIsHelpVisible(false)} /> + setIsHelpVisible(!isHelpVisible)} onMouseEnter={() => setIsHelpVisible(true)} onMouseLeave={() => setIsHelpVisible(false)} data-testid="InlineHelp-icon" />
    ) } \ No newline at end of file diff --git a/components/JobSummary.js b/components/JobSummary.js index cf09e23dfed..c55374b8bc5 100644 --- a/components/JobSummary.js +++ b/components/JobSummary.js @@ -6,11 +6,11 @@ export default function JobSummary({ job, className = '' }) {
    Location
    -
    +
    {!job.location || job.location === 'remote' &&

    Remote

    } -

    {!job.region || job.region === 'any' ? 'Anywhere (on planet Earth)' : job.region}

    +

    {!job.region || job.region === 'any' ? 'Anywhere (on planet Earth)' : job.region}

    diff --git a/components/MDX.js b/components/MDX.js index 5fa8d67d8b0..168e6c8dfb7 100644 --- a/components/MDX.js +++ b/components/MDX.js @@ -10,7 +10,7 @@ import ChapterSuggestions from '../components/buttons/ChapterSuggestions' import CodeBlock from '../components/editor/CodeBlock' import Remember from '../components/Remember' import Warning from '../components/Warning' -import Sponsors from '../components/Sponsors' +import Sponsors from "./sponsors/Sponsors"; import Caption from '../components/Caption' import Row from '../components/layout/Row' import Column from '../components/layout/Column' @@ -24,7 +24,7 @@ let mermaidInitialized = false; initializeMermaid(); const mdxComponents = getMDXComponents(); -export default function MDXProvider({ children }) { +export function MDXProvider({ children }) { return ( {children} @@ -32,7 +32,7 @@ export default function MDXProvider({ children }) { ); } -function getMDXComponents() { +export function getMDXComponents() { return { h1: props =>

    , h2: props =>

    , diff --git a/components/MacWindow.js b/components/MacWindow.js index 0660fe3afe1..e3e259ba5ab 100644 --- a/components/MacWindow.js +++ b/components/MacWindow.js @@ -7,17 +7,17 @@ export default function MacWindow({ children, }) { return ( -
    -
    +
    +
    -
    +
    {title}
    -
    {/* This block is used for aligning the title on the center */} +
    {/* This block is used for aligning the title on the center */} diff --git a/components/Meeting.js b/components/Meeting.js index d137d3cb2d0..75de7580ec0 100644 --- a/components/Meeting.js +++ b/components/Meeting.js @@ -2,33 +2,50 @@ import YoutubeButton from './buttons/YoutubeButton'; import Paragraph from './typography/Paragraph'; import TextLink from './typography/TextLink'; import Heading from './typography/Heading'; +import { ArrowRightIcon } from '@heroicons/react/outline'; export default function Meeting({ name = '', purpose = '', host = '', hostProfile = '', - youtube = '' + youtube = '', + bg = '' }) { return ( -
    - - { name } - - - Purpose: { purpose } - - - Host: - { hostProfile - ? ( - { host } - ) - : ` ${host}.` - } - - -
    + +
    +
    +

    {name}

    +
    + + {purpose} + +
    +
    +
    + + Host: + {hostProfile ? ( + + {host} + + ) : ( + ` ${host}.` + )} + +
    + +
    +
    +
    +
    ); } diff --git a/components/Modal.js b/components/Modal.js index 76d0531a9f2..a7fb153c9d6 100644 --- a/components/Modal.js +++ b/components/Modal.js @@ -22,17 +22,17 @@ export default function Modal({ } return ( -
    -
    +
    +

    {title}

    -
    -
    +
    {children}
    diff --git a/components/NewsletterSubscribe.js b/components/NewsletterSubscribe.js index 639711acf28..7038d524798 100644 --- a/components/NewsletterSubscribe.js +++ b/components/NewsletterSubscribe.js @@ -13,7 +13,7 @@ export default function NewsletterSubscribe ({ const paragraphTextColor = dark ? 'text-gray-300' : '' return ( -
    +
    - - + +
    diff --git a/components/OpenAPIComparison.js b/components/OpenAPIComparison.js index 2cef9691865..14cb59391a5 100644 --- a/components/OpenAPIComparison.js +++ b/components/OpenAPIComparison.js @@ -1,125 +1,56 @@ -export default function OpenAPIComparison({ className = '' }) { - return ( -
    -
    -

    OpenAPI 3.0

    - -
    -
    - Info -
    -
    -
    - Servers -
    -
    - Security -
    -
    -
    - Paths -
    -
    - Path Item +import React, { useState } from 'react'; -
    -
    - Summary and description -
    -
    -
    - Operation (GET, PUT, POST, etc.) +export default function OpenAPIComparison({ className = '' }) { + const [hoverState, setHoverState] = useState({ + Info: false, + Servers: false, + Paths: false, + PathItem: true, + Summary: false, + Operation: false, + Message: false, + Tags: false, + External: false, + Components: false + }); -
    -
    - Request -
    -
    - Responses -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - Tags -
    -
    - External Docs -
    -
    -
    - Components + return ( +
    +
    +

    OpenAPI 3.0

    -
    -
    - Definitions -
    -
    - Responses -
    -
    - Parameters -
    -
    - Response Headers -
    -
    - Security Definitions -
    -
    - Callbacks -
    -
    - Links -
    -
    -
    -
    -
    - -
    -

    AsyncAPI 2.0

    - -
    -
    - Info -
    -
    -
    - Servers (hosts + security) +
    +
    setHoverState(prevState => ({ ...prevState, Info: true })) } onMouseLeave={ () => setHoverState({ ...hoverState, Info: false }) } data-testid="OpenAPI-sec-info"> + Info
    -
    -
    - Channel -
    -
    - Channel Item - -
    -
    -
    - Operation (Publish and Subscribe) - -
    -
    - Summary, description, tags, etc. -
    -
    -
    - Message +
    setHoverState(prevState => ({ ...prevState, Servers: true })) } onMouseLeave={ () => setHoverState({ ...hoverState, Servers: false }) } data-testid="OpenAPI-sec-servers"> + Servers +
    +
    + Security +
    +
    +
    setHoverState(prevState => ({ ...prevState, Paths: true })) } onMouseLeave={ () => setHoverState({ ...hoverState, Paths: false }) } data-testid="OpenAPI-paths"> + Paths +
    +
    { return setHoverState(prevState => ({ ...prevState, PathItem: true })) } } onMouseLeave={ () => { return setHoverState({ ...hoverState, PathItem: false }) } } data-testid="OpenAPI-path-item"> + Path Item -
    - Headers -
    -
    - Payload -
    +
    +
    setHoverState(prevState => ({ ...prevState, Summary: true })) } onMouseLeave={ () => { return setHoverState({ ...hoverState, Summary: false }) } } data-testid="OpenAPI-summary"> + Summary and description +
    +
    +
    setHoverState(prevState => ({ ...prevState, Operation: true })) } onMouseLeave={ () => setHoverState({ ...hoverState, Operation: false }) } data-testid="OpenAPI-operation"> + Operation (GET, PUT, POST, etc.) + +
    +
    setHoverState(prevState => ({ ...prevState, Message: true })) } onMouseLeave={ () => setHoverState({ ...hoverState, Message: false }) } data-testid="OpenAPI-request"> + Request +
    +
    setHoverState(prevState => ({ ...prevState, Message: true })) } onMouseLeave={ () => setHoverState({ ...hoverState, Message: false }) } data-testid="OpenAPI-responses"> + Responses
    @@ -128,61 +59,145 @@ export default function OpenAPIComparison({ className = '' }) {
    -
    -
    -
    - Id (application identifier) -
    -
    -
    -
    - Tags -
    -
    - External Docs -
    -
    -
    - Components - -
    -
    - Schemas -
    -
    - Messages -
    -
    - Security Schemes +
    +
    setHoverState(prevState => ({ ...prevState, Tags: true })) } onMouseLeave={ () => setHoverState({ Tags: false }) } data-testid="OpenAPI-tags"> +

    Tags

    -
    - Parameters +
    setHoverState(prevState => ({ ...prevState, External: true })) } onMouseLeave={ () => setHoverState({ External: false }) } data-testid="OpenAPI-external"> +

    External Docs

    -
    - Correlation Ids +
    +
    setHoverState(prevState => ({ ...prevState, Components: true })) } onMouseLeave={ () => setHoverState({ Components: false }) } data-testid="OpenAPI-components"> + Components + +
    +
    + Definitions +
    +
    + Responses +
    +
    + Parameters +
    +
    + Response Headers +
    +
    + Security Definitions +
    +
    + Callbacks +
    +
    + Links +
    -
    - Operation Traits +
    +
    +
    + +
    +

    AsyncAPI 2.0

    + +
    +
    setHoverState(prevState => ({ ...prevState, Info: true })) } onMouseLeave={ () => setHoverState({ Info: false }) }> + Info +
    +
    +
    setHoverState(prevState => ({ ...prevState, Servers: true })) } onMouseLeave={ () => setHoverState({ Servers: false }) }> + Servers (hosts + security)
    -
    - Message Traits +
    +
    setHoverState(prevState => ({ ...prevState, Paths: true })) } onMouseLeave={ () => setHoverState({ Paths: false }) }> + Channel + +
    +
    setHoverState(prevState => ({ ...prevState, PathItem: true })) } onMouseLeave={ () => setHoverState({ PathItem: false }) }> + Channel Item + +
    +
    +
    setHoverState(prevState => ({ ...prevState, Operation: true })) } onMouseLeave={ () => setHoverState({ Operation: false }) }> + Operation (Publish and Subscribe) + +
    +
    setHoverState(prevState => ({ ...prevState, Summary: true })) } onMouseLeave={ () => setHoverState({ Summary: false }) } > + Summary, description, tags, etc. +
    +
    +
    setHoverState(prevState => ({ ...prevState, Message: true })) } onMouseLeave={ () => setHoverState({ Message: false }) }> + Message + +
    + Headers +
    +
    + Payload +
    +
    +
    +
    +
    +
    +
    +
    -
    - Server Bindings +
    +
    +
    + Id (application identifier)
    -
    - Channel Bindings +
    +
    +
    setHoverState(prevState => ({ ...prevState, Tags: true })) } onMouseLeave={ () => setHoverState({ Tags: false }) }> +

    Tags

    -
    - Operation Bindings +
    setHoverState(prevState => ({ ...prevState, External: true })) } onMouseLeave={ () => setHoverState({ External: false }) }> +

    External Docs

    -
    - Message Bindings +
    +
    setHoverState(prevState => ({ ...prevState, Components: true })) } onMouseLeave={ () => setHoverState({ Components: false }) }> + Components + +
    +
    + Schemas +
    +
    + Messages +
    +
    + Security Schemes +
    +
    + Parameters +
    +
    + Correlation Ids +
    +
    + Operation Traits +
    +
    + Message Traits +
    +
    + Server Bindings +
    +
    + Channel Bindings +
    +
    + Operation Bindings +
    +
    + Message Bindings +
    -
    -
    - ) +
    + ) } diff --git a/components/Profile.js b/components/Profile.js index e5ae5afb2cb..0c34ba1489b 100644 --- a/components/Profile.js +++ b/components/Profile.js @@ -3,9 +3,10 @@ export default function Profile({profiles = [], className}) { return null; } return ( -
    +
    {profiles.map((profile) => ( - -
    +
    +
    - {title} + {title}
    { children } diff --git a/components/SilverSponsors.js b/components/SilverSponsors.js deleted file mode 100644 index 8758453ebd6..00000000000 --- a/components/SilverSponsors.js +++ /dev/null @@ -1,21 +0,0 @@ -export default function SilverSponsors({ className = '', showSupportBanner = true }){ - return( - - ) - -} diff --git a/components/Sponsors.js b/components/Sponsors.js deleted file mode 100644 index dc8ef800e7d..00000000000 --- a/components/Sponsors.js +++ /dev/null @@ -1,78 +0,0 @@ -export default function Sponsors({ className = '', showSupportBanner = true }) { - return ( -
    - - {showSupportBanner && ( -
    - Want to become a sponsor?{' '} - - Support us! - -
    - )} -
    - ); -} diff --git a/components/SupportUs.js b/components/SupportUs.js deleted file mode 100644 index 3f559c5e95e..00000000000 --- a/components/SupportUs.js +++ /dev/null @@ -1,85 +0,0 @@ -export default function SupportUs({ className = '', showSupportBanner = true }) { - return ( -
    -
    - - - - - - - - - - - -
    - - -
    - ); -} diff --git a/components/SupportUs/SupportItemsList.js b/components/SupportUs/SupportItemsList.js new file mode 100644 index 00000000000..40292e5aa30 --- /dev/null +++ b/components/SupportUs/SupportItemsList.js @@ -0,0 +1,51 @@ +export const items = [ + { + href: "https://slack.com/media-kit", + imgSrc: "/img/supportus/slack.webp", + imgTitle: "Slack - Free Standard Subscription.", + imgClass: "inline-block px-4 sm:h-10", + section: 1, + }, + { + href: "https://toast.ninja/", + imgSrc: "/img/supportus/toast.webp", + imgTitle: "Toast - Free services.", + imgClass: "inline-block px-4 sm:h-10", + section: 1, + }, + { + href: "https://www.netlify.com/", + imgSrc: "/img/supportus/netlify.webp", + imgTitle: "Netlify - Free website deployment.", + imgClass: "inline-block px-4 sm:h-10", + section: 1, + }, + { + href: "https://sonarcloud.io/", + imgSrc: "/img/supportus/sonarcloud.webp", + imgTitle: "Sonarcloud - Free tier for automated project scanning.", + imgClass: "inline-block px-4 md:h-14", + section: 2, + }, + { + href: "https://www.digitalocean.com/press/", + imgSrc: "/img/supportus/digitalocean.webp", + imgTitle: "DigitalOcean - 500 dollars on cloud services.", + imgClass: "inline-block px-2 sm:h-8", + section: 2, + }, + { + href: "https://restream.io/", + imgSrc: "/img/supportus/restream.webp", + imgTitle: "Restream - Free professional plan subscription.", + imgClass: "inline-block px-4 sm:h-6", + section: 2, + }, + { + href: "https://sessionize.com/", + imgSrc: "/img/supportus/sessionize.webp", + imgTitle: "Sessionize-Free community license for AACoT Madrid.", + imgClass: "inline-block px-4 sm:h-9", + section: 3, + }, + ]; \ No newline at end of file diff --git a/components/SupportUs/SupportUs.js b/components/SupportUs/SupportUs.js new file mode 100644 index 00000000000..e8868d0e067 --- /dev/null +++ b/components/SupportUs/SupportUs.js @@ -0,0 +1,65 @@ +import { items } from "./SupportItemsList"; +export default function SupportUs({ className = '', showSupportBanner = true }) { + return ( +
    +
    + { items + .filter((item) => item.section === 1) + .map((item, index) => ( + + + + )) } +
    +
    + { items + .filter((item) => item.section === 2) + .map((item, index) => ( + + + + )) } +
    +
    + { items + .filter((item) => item.section === 3) + .map((item, index) => ( + + + + )) } +
    +
    + ); +} + diff --git a/components/TOC.js b/components/TOC.js index 177a746df20..3f8de3fd192 100644 --- a/components/TOC.js +++ b/components/TOC.js @@ -18,14 +18,14 @@ export default function TOC({ //For TOC rendering in specification files in the spec repo we have "a" tags added manually to the spec markdown document //MDX takes these "a" tags and uses them to render the "id" for headers like a-namedefinitionsapplicationaapplication //slugWithATag contains transformed heading name that is later used for scroll spy identification - slugWithATag: item.content.replace(/<|>|"|\\|\/|=/gi, '').replace(/\s/gi, '-').toLowerCase() + slugWithATag: item.content.replace(/[<>?!:`'."\\\/=]/gi, '').replace(/\s/gi, '-').toLowerCase() })); const [open, setOpen] = useState(false); return (
    setOpen(!open)}>
    -
    +
    On this page
    @@ -38,15 +38,17 @@ export default function TOC({ currentClassName="text-primary-500 font-bold" componentTag="div" rootEl={contentSelector} + offset={-120} > { tocItems.map((item, index) => ( - - {item.content} + {item.content.replaceAll('`', '')} )) } diff --git a/components/Testimonial.js b/components/Testimonial.js index cdc3717418d..a4be2717954 100644 --- a/components/Testimonial.js +++ b/components/Testimonial.js @@ -21,7 +21,7 @@ export default function Testimonial({