From 46afd74717352150f3822edd9744e5770c537843 Mon Sep 17 00:00:00 2001 From: Ashmit Personal Date: Mon, 10 Jun 2024 11:11:06 +0530 Subject: [PATCH 1/5] added prettier and formatted the files --- .../automerge-for-humans-merging.yml | 4 +- .github/workflows/automerge-orphans.yml | 6 +- .github/workflows/automerge.yml | 2 +- .github/workflows/autoupdate.yml | 12 +- .github/workflows/bump.yml | 2 +- .github/workflows/help-command.yml | 18 +- .../workflows/notify-tsc-members-mention.yml | 24 +- .../workflows/please-take-a-look-command.yml | 4 +- .github/workflows/release-announcements.yml | 25 +- .github/workflows/scripts/README.md | 2 +- .../scripts/mailchimp/htmlContent.js | 9 +- .github/workflows/scripts/mailchimp/index.js | 132 +++--- .../scripts/mailchimp/package-lock.json | 2 +- .../workflows/scripts/mailchimp/package.json | 2 +- .github/workflows/stale-issues-prs.yml | 46 +-- .github/workflows/update-pr.yml | 4 +- .../workflows/welcome-first-time-contrib.yml | 130 +++--- .prettierignore | 4 +- CONTRIBUTING.md | 8 +- README.md | 4 +- components/About/about.js | 107 +++-- components/Agenda/agenda.js | 181 ++++---- components/Buttons/button.js | 22 +- components/Cards/ticketCards.js | 28 +- components/Countdown/countdown.js | 220 +++++----- components/Dropdown/dropdown.js | 124 +++--- components/Footer/footer.js | 33 +- components/Form/Cfp/stepFour.js | 28 +- components/Form/Cfp/stepOne.js | 23 +- components/Form/Cfp/stepThree.js | 48 ++- components/Form/Cfp/stepTwo.js | 23 +- components/Form/paper.js | 84 ++-- components/Form/select.js | 4 +- components/Form/subscription.js | 41 +- components/Header/header.js | 102 ++--- components/Navbar/navDrop.js | 117 +++--- components/Navbar/navbar.js | 216 +++++----- components/PastEditionCard/index.js | 51 ++- components/Select/select.js | 4 +- components/Slider/slider.js | 56 +-- components/Speaker/speaker.js | 70 ++-- components/Sponsors/sponsors.js | 54 +-- components/Typography/heading.js | 128 +++--- components/Typography/paragraph.js | 40 +- components/Venue/venue.js | 71 ++-- components/announcement.js | 10 +- components/illustration/activityLoader.js | 2 +- components/illustration/arrow.js | 42 +- components/illustration/cancel.js | 100 ++--- components/illustration/dropdown.js | 28 +- components/illustration/hamburger.js | 87 ++-- components/illustration/plus.js | 44 +- config/city-lists.json | 90 ++-- config/editions.json | 10 +- config/links.json | 71 ++-- config/speakers.json | 128 +++--- next.config.js | 10 +- package-lock.json | 16 + package.json | 5 +- pages/_app.js | 20 +- pages/api/hello.js | 2 +- pages/editions/index.js | 46 +-- pages/index.js | 386 ++++++++++-------- pages/venue/[id].js | 153 +++---- postcss.config.js | 2 +- styles/globals.css | 215 +++++----- tailwind.config.js | 66 +-- 67 files changed, 2050 insertions(+), 1798 deletions(-) diff --git a/.github/workflows/automerge-for-humans-merging.yml b/.github/workflows/automerge-for-humans-merging.yml index 9ba0be90..dc5f64cc 100644 --- a/.github/workflows/automerge-for-humans-merging.yml +++ b/.github/workflows/automerge-for-humans-merging.yml @@ -33,7 +33,7 @@ jobs: # 5. Removes repeated authors (authors can have more than one commit in the PR). # 6. Builds the `Co-authored-by: ...` lines with actual info. # 7. Transforms the array into plain text. Thanks to this, the actual stdout of this step can be used by the next Workflow step (wich is basically the automerge). - cmd: | + cmd: | curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" "${{github.event.pull_request._links.commits.href}}?per_page=100" | jq -r '[.[] | {name: .commit.author.name, email: .commit.author.email, login: .author.login}] @@ -50,6 +50,6 @@ jobs: MERGE_METHOD: "squash" # Using the output of the previous step (`Co-authored-by: ...` lines) as commit description. # Important to keep 2 empty lines as https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors#creating-co-authored-commits-on-the-command-line mentions - MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n\n\n${{ steps.authors.outputs.value }}" + MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n\n\n${{ steps.authors.outputs.value }}" MERGE_RETRIES: "20" MERGE_RETRY_SLEEP: "30000" diff --git a/.github/workflows/automerge-orphans.yml b/.github/workflows/automerge-orphans.yml index a1776853..c797b513 100644 --- a/.github/workflows/automerge-orphans.yml +++ b/.github/workflows/automerge-orphans.yml @@ -1,11 +1,11 @@ # 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: 'Notify on failing automerge' +name: "Notify on failing automerge" on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * *" jobs: identify-orphans: @@ -63,4 +63,4 @@ jobs: SLACK_WEBHOOK: ${{secrets.SLACK_CI_FAIL_NOTIFY}} SLACK_TITLE: 🚨 Not merged PR that should be automerged 🚨 SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} - MSG_MINIMAL: true \ No newline at end of file + MSG_MINIMAL: true diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 116b8065..14086755 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Autoapproving - uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4 # v3.2.1 is used https://github.com/hmarr/auto-approve-action/releases/tag/v3.2.1 + 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 }}" diff --git a/.github/workflows/autoupdate.yml b/.github/workflows/autoupdate.yml index eeb77a47..ee019c72 100644 --- a/.github/workflows/autoupdate.yml +++ b/.github/workflows/autoupdate.yml @@ -12,11 +12,11 @@ name: autoupdate on: push: - branches-ignore: - - 'version-bump/**' - - 'dependabot/**' - - 'bot/**' - - 'all-contributors/**' + branches-ignore: + - "version-bump/**" + - "dependabot/**" + - "bot/**" + - "all-contributors/**" jobs: autoupdate-for-bot: @@ -27,7 +27,7 @@ jobs: - name: Autoupdating uses: docker://chinthakagodawita/autoupdate-action:v1 env: - GITHUB_TOKEN: '${{ secrets.GH_TOKEN_BOT_EVE }}' + GITHUB_TOKEN: "${{ secrets.GH_TOKEN_BOT_EVE }}" PR_FILTER: "labelled" PR_LABELS: "autoupdate" PR_READY_STATE: "ready_for_review" diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 66af7a55..84ae0f7e 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.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 -#Purpose of this action is to update npm package in libraries that use it. It is like dependabot for asyncapi npm modules only. +#Purpose of this action is to update npm package in libraries that use it. It is like dependabot for asyncapi npm modules only. #It runs in a repo after merge of release commit and searches for other packages that use released package. Every found package gets updated with lates version name: Bump package version in dependent repos - if Node project diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index 3f4dcbc4..68b859d2 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -3,10 +3,10 @@ name: Create help comment -on: - issue_comment: - types: - - created +on: + issue_comment: + types: + - created jobs: create_help_comment_pr: @@ -28,9 +28,9 @@ jobs: 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: - + - \`/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 @@ -54,9 +54,9 @@ jobs: 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/notify-tsc-members-mention.yml b/.github/workflows/notify-tsc-members-mention.yml index d72fd85b..841fb47f 100644 --- a/.github/workflows/notify-tsc-members-mention.yml +++ b/.github/workflows/notify-tsc-members-mention.yml @@ -37,8 +37,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16 - cache: 'npm' - cache-dependency-path: '**/package-lock.json' + cache: "npm" + cache-dependency-path: "**/package-lock.json" ######### # Handling Slack notifications ######### @@ -82,8 +82,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16 - cache: 'npm' - cache-dependency-path: '**/package-lock.json' + cache: "npm" + cache-dependency-path: "**/package-lock.json" ######### # Handling Slack notifications ######### @@ -127,8 +127,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16 - cache: 'npm' - cache-dependency-path: '**/package-lock.json' + cache: "npm" + cache-dependency-path: "**/package-lock.json" ######### # Handling Slack notifications ######### @@ -172,8 +172,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16 - cache: 'npm' - cache-dependency-path: '**/package-lock.json' + cache: "npm" + cache-dependency-path: "**/package-lock.json" ######### # Handling Slack notifications ######### @@ -217,8 +217,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16 - cache: 'npm' - cache-dependency-path: '**/package-lock.json' + cache: "npm" + cache-dependency-path: "**/package-lock.json" ######### # Handling Slack notifications ######### @@ -262,8 +262,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16 - cache: 'npm' - cache-dependency-path: '**/package-lock.json' + cache: "npm" + cache-dependency-path: "**/package-lock.json" ######### # Handling Slack notifications ######### diff --git a/.github/workflows/please-take-a-look-command.yml b/.github/workflows/please-take-a-look-command.yml index b26cbc41..b94b7500 100644 --- a/.github/workflows/please-take-a-look-command.yml +++ b/.github/workflows/please-take-a-look-command.yml @@ -1,8 +1,8 @@ # This action is centrally managed in https://github.com/asyncapi/.github/ # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo -# It uses Github actions to listen for comments on issues and pull requests and -# if the comment contains /please-take-a-look or /ptal it will add a comment pinging +# It uses Github actions to listen for comments on issues and pull requests and +# if the comment contains /please-take-a-look or /ptal it will add a comment pinging # the code-owners who are reviewers for PR name: Please take a Look diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml index 9587cace..5ef4e409 100644 --- a/.github/workflows/release-announcements.yml +++ b/.github/workflows/release-announcements.yml @@ -1,15 +1,14 @@ # 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: 'Announce releases in different channels' +name: "Announce releases in different channels" -on: +on: release: - types: + types: - published jobs: - slack-announce: name: Slack - notify on every release runs-on: ubuntu-latest @@ -24,10 +23,10 @@ jobs: - name: Send info about release to Slack uses: rtCamp/action-slack-notify@v2 env: - SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASES }} - SLACK_TITLE: Release ${{github.event.release.tag_name}} for ${{github.repository}} is out in the wild 😱πŸ’ͺπŸΎπŸŽ‚ - SLACK_MESSAGE: ${{steps.markdown.outputs.text}} - MSG_MINIMAL: true + SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASES }} + SLACK_TITLE: Release ${{github.event.release.tag_name}} for ${{github.repository}} is out in the wild 😱πŸ’ͺπŸΎπŸŽ‚ + SLACK_MESSAGE: ${{steps.markdown.outputs.text}} + MSG_MINIMAL: true twitter-announce: name: Twitter - notify on minor and major releases @@ -70,10 +69,10 @@ jobs: # tweet goes out even if the type is not major or minor but "You need provide version number to compare." # it is ok, it just means we did not identify previous version as we are tweeting out information about the release for the first time if: steps.releasetype.outputs.type != 'null' && steps.releasetype.outputs.type != 'patch' # null means that versions are the same - uses: m1ner79/Github-Twittction@d1e508b6c2170145127138f93c49b7c46c6ff3a7 # using 2.0.0 https://github.com/m1ner79/Github-Twittction/releases/tag/v2.0.0 + 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 }} - twitter_consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }} - twitter_access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} - twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} \ No newline at end of file + twitter_consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }} + twitter_consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }} + twitter_access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} + twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} diff --git a/.github/workflows/scripts/README.md b/.github/workflows/scripts/README.md index ba97dca0..b63e8820 100644 --- a/.github/workflows/scripts/README.md +++ b/.github/workflows/scripts/README.md @@ -1 +1 @@ -The entire `scripts` directory is centrally managed in [.github](https://github.com/asyncapi/.github/) repository. Any changes in this folder should be done in central repository. \ No newline at end of file +The entire `scripts` directory is centrally managed in [.github](https://github.com/asyncapi/.github/) repository. Any changes in this folder should be done in central repository. diff --git a/.github/workflows/scripts/mailchimp/htmlContent.js b/.github/workflows/scripts/mailchimp/htmlContent.js index d132c72f..08c44e17 100644 --- a/.github/workflows/scripts/mailchimp/htmlContent.js +++ b/.github/workflows/scripts/mailchimp/htmlContent.js @@ -3,8 +3,7 @@ * Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo */ module.exports = (link, title) => { - - return ` + return ` @@ -386,7 +385,7 @@ There is a new topic at AsyncAPI Initiative that requires Technical Steering Com
Please have a look if it is just something you need to be aware of, or maybe your vote is needed.
-Topic: ${ title }. +Topic: ${title}. @@ -491,5 +490,5 @@ You can { + let newCampaign; - let newCampaign; + mailchimp.setConfig({ + apiKey: process.env.MAILCHIMP_API_KEY, + server: "us12", + }); - mailchimp.setConfig({ - apiKey: process.env.MAILCHIMP_API_KEY, - server: 'us12' - }); - - /* - * First we create campaign - */ - try { - newCampaign = await mailchimp.campaigns.create({ - type: 'regular', - recipients: { - list_id: '6e3e437abe', - segment_opts: { - match: 'any', - conditions: [{ - condition_type: 'Interests', - field: 'interests-2801e38b9f', - op: 'interestcontains', - value: ['f7204f9b90'] - }] - } + /* + * First we create campaign + */ + try { + newCampaign = await mailchimp.campaigns.create({ + type: "regular", + recipients: { + list_id: "6e3e437abe", + segment_opts: { + match: "any", + conditions: [ + { + condition_type: "Interests", + field: "interests-2801e38b9f", + op: "interestcontains", + value: ["f7204f9b90"], }, - settings: { - subject_line: `TSC attention required: ${ title }`, - preview_text: 'Check out the latest topic that TSC members have to be aware of', - title: `New topic info - ${ new Date(Date.now()).toUTCString()}`, - from_name: 'AsyncAPI Initiative', - reply_to: 'info@asyncapi.io', - } - }); - } catch (error) { - return core.setFailed(`Failed creating campaign: ${ JSON.stringify(error) }`); - } + ], + }, + }, + settings: { + subject_line: `TSC attention required: ${title}`, + preview_text: + "Check out the latest topic that TSC members have to be aware of", + title: `New topic info - ${new Date(Date.now()).toUTCString()}`, + from_name: "AsyncAPI Initiative", + reply_to: "info@asyncapi.io", + }, + }); + } catch (error) { + return core.setFailed(`Failed creating campaign: ${JSON.stringify(error)}`); + } - /* - * Content of the email is added separately after campaign creation - */ - try { - await mailchimp.campaigns.setContent(newCampaign.id, { html: htmlContent(link, title) }); - } catch (error) { - return core.setFailed(`Failed adding content to campaign: ${ JSON.stringify(error) }`); - } + /* + * Content of the email is added separately after campaign creation + */ + try { + await mailchimp.campaigns.setContent(newCampaign.id, { + html: htmlContent(link, title), + }); + } catch (error) { + return core.setFailed( + `Failed adding content to campaign: ${JSON.stringify(error)}`, + ); + } - /* - * We schedule an email to send it immediately - */ - try { - //schedule for next hour - //so if this code was created by new issue creation at 9:46, the email is scheduled for 10:00 - //is it like this as schedule has limitiations and you cannot schedule email for 9:48 - const scheduleDate = new Date(Date.parse(new Date(Date.now()).toISOString()) + 1 * 1 * 60 * 60 * 1000); - scheduleDate.setUTCMinutes(00); + /* + * We schedule an email to send it immediately + */ + try { + //schedule for next hour + //so if this code was created by new issue creation at 9:46, the email is scheduled for 10:00 + //is it like this as schedule has limitiations and you cannot schedule email for 9:48 + const scheduleDate = new Date( + Date.parse(new Date(Date.now()).toISOString()) + 1 * 1 * 60 * 60 * 1000, + ); + scheduleDate.setUTCMinutes(00); - await mailchimp.campaigns.schedule(newCampaign.id, { - schedule_time: scheduleDate.toISOString(), - }); - } catch (error) { - return core.setFailed(`Failed scheduling email: ${ JSON.stringify(error) }`); - } + await mailchimp.campaigns.schedule(newCampaign.id, { + schedule_time: scheduleDate.toISOString(), + }); + } catch (error) { + return core.setFailed(`Failed scheduling email: ${JSON.stringify(error)}`); + } - core.info(`New email campaign created`); -} \ No newline at end of file + core.info(`New email campaign created`); +}; diff --git a/.github/workflows/scripts/mailchimp/package-lock.json b/.github/workflows/scripts/mailchimp/package-lock.json index 7ee7d84f..cc41a360 100644 --- a/.github/workflows/scripts/mailchimp/package-lock.json +++ b/.github/workflows/scripts/mailchimp/package-lock.json @@ -594,4 +594,4 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } -} \ No newline at end of file +} diff --git a/.github/workflows/scripts/mailchimp/package.json b/.github/workflows/scripts/mailchimp/package.json index cc50e43e..7016b22f 100644 --- a/.github/workflows/scripts/mailchimp/package.json +++ b/.github/workflows/scripts/mailchimp/package.json @@ -6,4 +6,4 @@ "@actions/core": "1.6.0", "@mailchimp/mailchimp_marketing": "3.0.74" } -} \ No newline at end of file +} diff --git a/.github/workflows/stale-issues-prs.yml b/.github/workflows/stale-issues-prs.yml index ed1fcf19..f9eb3db4 100644 --- a/.github/workflows/stale-issues-prs.yml +++ b/.github/workflows/stale-issues-prs.yml @@ -5,7 +5,7 @@ name: Manage stale issues and PRs on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * *" jobs: stale: @@ -13,33 +13,33 @@ jobs: name: Mark issue or PR as stale runs-on: ubuntu-latest steps: - - uses: actions/stale@99b6c709598e2b0d0841cd037aaf1ba07a4410bd #v5.2.0 but pointing to commit for security reasons - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: | - This issue has been automatically marked as stale because it has not had recent activity :sleeping: + - uses: actions/stale@99b6c709598e2b0d0841cd037aaf1ba07a4410bd #v5.2.0 but pointing to commit for security reasons + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: | + This issue has been automatically marked as stale because it has not had recent activity :sleeping: - It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. + It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. - There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under [open governance model](https://github.com/asyncapi/community/blob/master/CHARTER.md). + There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under [open governance model](https://github.com/asyncapi/community/blob/master/CHARTER.md). - Let us figure out together how to push this issue forward. Connect with us through [one of many communication channels](https://github.com/asyncapi/community/issues/1) we established here. + Let us figure out together how to push this issue forward. Connect with us through [one of many communication channels](https://github.com/asyncapi/community/issues/1) we established here. - Thank you for your patience :heart: - stale-pr-message: | - This pull request has been automatically marked as stale because it has not had recent activity :sleeping: + Thank you for your patience :heart: + stale-pr-message: | + This pull request has been automatically marked as stale because it has not had recent activity :sleeping: - It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. + It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. - There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under [open governance model](https://github.com/asyncapi/community/blob/master/CHARTER.md). + There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under [open governance model](https://github.com/asyncapi/community/blob/master/CHARTER.md). - Let us figure out together how to push this pull request forward. Connect with us through [one of many communication channels](https://github.com/asyncapi/community/issues/1) we established here. + Let us figure out together how to push this pull request forward. Connect with us through [one of many communication channels](https://github.com/asyncapi/community/issues/1) we established here. - Thank you for your patience :heart: - days-before-stale: 120 - days-before-close: 120 - stale-issue-label: stale - stale-pr-label: stale - exempt-issue-labels: keep-open - exempt-pr-labels: keep-open - close-issue-reason: not_planned + Thank you for your patience :heart: + days-before-stale: 120 + days-before-close: 120 + stale-issue-label: stale + stale-pr-label: stale + exempt-issue-labels: keep-open + exempt-pr-labels: keep-open + close-issue-reason: not_planned diff --git a/.github/workflows/update-pr.yml b/.github/workflows/update-pr.yml index 2fa19b0a..bb7334c9 100644 --- a/.github/workflows/update-pr.yml +++ b/.github/workflows/update-pr.yml @@ -10,7 +10,7 @@ name: Update PR branches from fork on: - issue_comment: + issue_comment: types: [created] jobs: @@ -29,7 +29,7 @@ jobs: uses: actions/github-script@v7 with: github-token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }} - previews: 'merge-info-preview' # https://docs.github.com/en/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview + previews: "merge-info-preview" # https://docs.github.com/en/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview script: | const prNumber = context.payload.issue.number; core.debug(`PR Number: ${prNumber}`); diff --git a/.github/workflows/welcome-first-time-contrib.yml b/.github/workflows/welcome-first-time-contrib.yml index cbc23ce7..3e464a29 100644 --- a/.github/workflows/welcome-first-time-contrib.yml +++ b/.github/workflows/welcome-first-time-contrib.yml @@ -5,7 +5,7 @@ name: Welcome first time contributors on: pull_request_target: - types: + types: - opened issues: types: @@ -17,69 +17,69 @@ jobs: if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor) }} runs-on: ubuntu-latest steps: - - 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/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'); - } - const isIssue = !!context.payload.issue; - let isFirstContribution; - if (isIssue) { - const query = `query($owner:String!, $name:String!, $contributer:String!) { - repository(owner:$owner, name:$name){ - issues(first: 1, filterBy: {createdBy:$contributer}){ - totalCount + - 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/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'); + } + const isIssue = !!context.payload.issue; + let isFirstContribution; + if (isIssue) { + const query = `query($owner:String!, $name:String!, $contributer:String!) { + repository(owner:$owner, name:$name){ + issues(first: 1, filterBy: {createdBy:$contributer}){ + totalCount + } } - } - }`; - const variables = { - owner: context.repo.owner, - name: context.repo.repo, - contributer: context.payload.sender.login - }; - const { repository: { issues: { totalCount } } } = await github.graphql(query, variables); - isFirstContribution = totalCount === 1; - } else { - const query = `query($qstr: String!) { - search(query: $qstr, type: ISSUE, first: 1) { - issueCount - } }`; - const variables = { - "qstr": `repo:${context.repo.owner}/${context.repo.repo} type:pr author:${context.payload.sender.login}`, - }; - const { search: { issueCount } } = await github.graphql(query, variables); - isFirstContribution = issueCount === 1; - } - - if (!isFirstContribution) { - console.log(`Not the users first contribution.`); - return; - } - const message = isIssue ? issueMessage : prMessage; - // Add a comment to the appropriate place - if (isIssue) { - const issueNumber = context.payload.issue.number; - console.log(`Adding message: ${message} to issue #${issueNumber}`); - await github.rest.issues.createComment({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, - issue_number: issueNumber, - body: message - }); - } - else { - const pullNumber = context.payload.pull_request.number; - console.log(`Adding message: ${message} to pull request #${pullNumber}`); - await github.rest.pulls.createReview({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, - pull_number: pullNumber, - body: message, - event: 'COMMENT' - }); - } + const variables = { + owner: context.repo.owner, + name: context.repo.repo, + contributer: context.payload.sender.login + }; + const { repository: { issues: { totalCount } } } = await github.graphql(query, variables); + isFirstContribution = totalCount === 1; + } else { + const query = `query($qstr: String!) { + search(query: $qstr, type: ISSUE, first: 1) { + issueCount + } + }`; + const variables = { + "qstr": `repo:${context.repo.owner}/${context.repo.repo} type:pr author:${context.payload.sender.login}`, + }; + const { search: { issueCount } } = await github.graphql(query, variables); + isFirstContribution = issueCount === 1; + } + + if (!isFirstContribution) { + console.log(`Not the users first contribution.`); + return; + } + const message = isIssue ? issueMessage : prMessage; + // Add a comment to the appropriate place + if (isIssue) { + const issueNumber = context.payload.issue.number; + console.log(`Adding message: ${message} to issue #${issueNumber}`); + await github.rest.issues.createComment({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + issue_number: issueNumber, + body: message + }); + } + else { + const pullNumber = context.payload.pull_request.number; + console.log(`Adding message: ${message} to pull request #${pullNumber}`); + await github.rest.pulls.createReview({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: pullNumber, + body: message, + event: 'COMMENT' + }); + } diff --git a/.prettierignore b/.prettierignore index fa29cdff..1b07c39e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,3 @@ -** \ No newline at end of file +# Ignore artifacts: +build +coverage \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1334921c..ed3008e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ # Contributing to AsyncAPI + We love your input! We want to make contributing to this project as easy and transparent as possible. ## Contribution recogniton @@ -37,12 +38,15 @@ The following is a summary of the ideal contribution flow. Please, note that Pul ``` ## Code of Conduct + 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. ## 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! ## Bug Reports and Feature Requests @@ -73,7 +77,9 @@ Prefix that follows specification is not enough though. Remember that the title Happy contributing :heart: ## License + When you submit changes, your submissions are understood to be under the same [Apache 2.0 License](https://github.com/asyncapi/asyncapi/blob/master/LICENSE) that covers the project. Feel free to [contact the maintainers](https://www.asyncapi.com/slack-invite) if that's a concern. ## References -This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/master/CONTRIBUTING.md). \ No newline at end of file + +This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/master/CONTRIBUTING.md). diff --git a/README.md b/README.md index 7706fa76..d40e54c1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next ## Getting Started - First, fork the repository and clone it. ```bash @@ -10,6 +9,7 @@ git clone https://github.com//conference-website.git ``` Install Dependencies + ```bash npm install ``` @@ -51,4 +51,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/components/About/about.js b/components/About/about.js index 2ff1a3b1..11d77e79 100644 --- a/components/About/about.js +++ b/components/About/about.js @@ -1,49 +1,68 @@ /* eslint-disable react/no-unescaped-entities */ -import React from 'react' -import Heading from '../Typography/heading'; -import Paragraph from '../Typography/paragraph'; -import Button from '../Buttons/button'; +import React from "react"; +import Heading from "../Typography/heading"; +import Paragraph from "../Typography/paragraph"; +import Button from "../Buttons/button"; function About() { - return ( -
-
-
-
-
-
-
-
About The Event
-
- - AACoT'24 - - - The AsyncAPI Conf on Tour is an official event created by the AsyncAPI - Initiative. This conference is aimed primarily at the community to share and - exchange experiences between existing users and new members. We plan to - integrate new members into the community and expand their knowledge about - the project. - - - We are currently looking for sponsors, for more details please read our Sponsorship Prospectus. - -
-
-
-
- ); + return ( +
+
+
+
+
+
+
+ About The Event +
+
+ + AACoT'24 + + + The AsyncAPI Conf on Tour is an official event created by the + AsyncAPI Initiative. This conference is aimed primarily at the + community to share and exchange experiences between existing users + and new members. We plan to integrate new members into the community + and expand their knowledge about the project. + + + We are currently looking for sponsors, for more details please read + our Sponsorship Prospectus. + + +
+
+
+ ); } -export default About \ No newline at end of file +export default About; diff --git a/components/Agenda/agenda.js b/components/Agenda/agenda.js index 6ee864f9..1827a668 100644 --- a/components/Agenda/agenda.js +++ b/components/Agenda/agenda.js @@ -1,80 +1,111 @@ -import React from 'react' -import Heading from '../Typography/heading' -import Paragraph from '../Typography/paragraph' +import React from "react"; +import Heading from "../Typography/heading"; +import Paragraph from "../Typography/paragraph"; function Agenda({ city }) { return ( -
-
- - Agenda - - {!city.agenda &&
- - Agenda Coming Soon - Stay Tuned! - -
} -
- {city.agenda &&
- - {city.date} - -
- {city.agenda.map((talk) => { - return
- - {talk.time} - -
-
- - {talk.type} - - - {talk.session} - -
- {talk.speaker && typeof talk.speaker === 'number' ?
-
- {city.speakers[talk.speaker -
-
- - {city.speakers[talk.speaker-1].name} - - - {city.speakers[talk.speaker-1].title} - -
-
:
} - {talk.speaker && typeof talk.speaker === 'object' &&
- {talk.speaker.map((speak, i) =>
-
-
- {city.speakers[speak -
-
- - {city.speakers[speak-1].name} - - - {city.speakers[speak-1].title} - -
-
-
) - } -
} -
-
- })} -
-
} -
- ); +
+
+ Agenda + {!city.agenda && ( +
+ + Agenda Coming Soon - Stay Tuned! + +
+ )} +
+ {city.agenda && ( +
+ + {city.date} + +
+ {city.agenda.map((talk) => { + return ( +
+ {talk.time} +
+
+ + {talk.type} + + + {talk.session} + +
+ {talk.speaker && typeof talk.speaker === "number" ? ( +
+
+ {city.speakers[talk.speaker +
+
+ + {city.speakers[talk.speaker - 1].name} + + + {city.speakers[talk.speaker - 1].title} + +
+
+ ) : ( +
+ )} + {talk.speaker && typeof talk.speaker === "object" && ( +
+ {talk.speaker.map((speak, i) => ( +
+
+
+ {city.speakers[speak +
+
+ + {city.speakers[speak - 1].name} + + + {city.speakers[speak - 1].title} + +
+
+
+ ))} +
+ )} +
+
+ ); + })} +
+
+ )} +
+ ); } -export default Agenda \ No newline at end of file +export default Agenda; diff --git a/components/Buttons/button.js b/components/Buttons/button.js index 9cd32e7e..0436c4d6 100644 --- a/components/Buttons/button.js +++ b/components/Buttons/button.js @@ -1,14 +1,16 @@ -import React from 'react' +import React from "react"; -function Button({className, children, overlay, onClick, type, disabled}) { +function Button({ className, children, overlay, onClick, type, disabled }) { return ( - - ); + + ); } -export default Button \ No newline at end of file +export default Button; diff --git a/components/Cards/ticketCards.js b/components/Cards/ticketCards.js index 7589c054..e9a32a07 100644 --- a/components/Cards/ticketCards.js +++ b/components/Cards/ticketCards.js @@ -1,16 +1,24 @@ -import React from 'react' -import Button from '../Buttons/button' +import React from "react"; +import Button from "../Buttons/button"; -function TicketCards({className, city}) { +function TicketCards({ className, city }) { return ( -
-
-
{city.name}, {city.country}
-
{city.date}
+
+
+
+ {city.name}, {city.country}
-
+
{city.date}
+
+
+ +
- ) + ); } -export default TicketCards \ No newline at end of file +export default TicketCards; diff --git a/components/Countdown/countdown.js b/components/Countdown/countdown.js index 58247b17..2a808f1b 100644 --- a/components/Countdown/countdown.js +++ b/components/Countdown/countdown.js @@ -1,120 +1,122 @@ -import React, { useEffect, useRef, useState } from 'react'; -import Countdown from 'react-countdown'; +import React, { useEffect, useRef, useState } from "react"; +import Countdown from "react-countdown"; const dates = [ - { - name: 'London, UK', - date: 'September 20, 2023', - }, - { - name: 'Madrid, Spain', - date: 'October 19, 2023', - }, - { - name: 'Bangalore, India', - date: 'November 30, 2023', - }, - { - name: 'Paris, France', - date: 'December 6, 2023', - }, + { + name: "London, UK", + date: "September 20, 2023", + }, + { + name: "Madrid, Spain", + date: "October 19, 2023", + }, + { + name: "Bangalore, India", + date: "November 30, 2023", + }, + { + name: "Paris, France", + date: "December 6, 2023", + }, ]; function Countdowns() { - const [selectedIndex, setSelectedIndex] = useState(0); + const [selectedIndex, setSelectedIndex] = useState(0); - const locationRef = useRef(null); - const dateRef = useRef(null); - useEffect(() => { - const intervalId = setInterval(() => { - locationRef.current.classList.remove('hidden'); - locationRef.current.classList.add('home-title'); - dateRef.current.classList.remove('hidden'); - dateRef.current.classList.add('home-title'); - setSelectedIndex((prevIndex) => (prevIndex + 1) % dates.length); - setTimeout(() => { - if(locationRef?.current) { - locationRef.current.classList.remove('home-title'); - locationRef.current.classList.add('hidden'); - } - if(dateRef?.current) { - dateRef.current.classList.remove('home-title'); - dateRef.current.classList.add('hidden'); - } - }, 9900); // Element stays visible for 800 milliseconds - }, 10000); // Toggle visibility every 1500 milliseconds + const locationRef = useRef(null); + const dateRef = useRef(null); + useEffect(() => { + const intervalId = setInterval(() => { + locationRef.current.classList.remove("hidden"); + locationRef.current.classList.add("home-title"); + dateRef.current.classList.remove("hidden"); + dateRef.current.classList.add("home-title"); + setSelectedIndex((prevIndex) => (prevIndex + 1) % dates.length); + setTimeout(() => { + if (locationRef?.current) { + locationRef.current.classList.remove("home-title"); + locationRef.current.classList.add("hidden"); + } + if (dateRef?.current) { + dateRef.current.classList.remove("home-title"); + dateRef.current.classList.add("hidden"); + } + }, 9900); // Element stays visible for 800 milliseconds + }, 10000); // Toggle visibility every 1500 milliseconds - return () => { - clearInterval(intervalId); - }; - }, []); + return () => { + clearInterval(intervalId); + }; + }, []); - const renderer = ({ days, hours, minutes, seconds, completed }) => { - if (completed) { - // Render a completed state - return
-
-
-
-
-
- - Ended - -
-
- } else { - // Render a countdown - return ( -
-
- - {days}: - -
-
- - {hours}: - -
-
- - {minutes}: - -
-
- - {seconds} - -
-
- ); - } - }; - return ( -
-
-
- - {dates[selectedIndex].name} - -
-
-
- -
-
- ); + const renderer = ({ days, hours, minutes, seconds, completed }) => { + if (completed) { + // Render a completed state + return ( +
+
+
+
+
+
+ + Ended + +
+
+ ); + } else { + // Render a countdown + return ( +
+
+ + {days}: + +
+
+ + {hours}: + +
+
+ + {minutes}: + +
+
+ + {seconds} + +
+
+ ); + } + }; + return ( +
+
+
+ + {dates[selectedIndex].name} + +
+
+
+ +
+
+ ); } export default Countdowns; diff --git a/components/Dropdown/dropdown.js b/components/Dropdown/dropdown.js index 958e959e..934d899e 100644 --- a/components/Dropdown/dropdown.js +++ b/components/Dropdown/dropdown.js @@ -1,34 +1,34 @@ -import React, {useState} from 'react'; +import React, { useState } from "react"; function Dropdown({ active, items, setOptions, setOptions2 }) { - const [show, setShow] = useState(false) - return ( -
-
- -
- {/* + const [show, setShow] = useState(false); + return ( +
+
+ +
+ {/* */} - {show && ( -
-
- {items && - items.map((item) => { - return ( -
{ - setOptions(item); - setOptions2(item.lists); - setShow(false); - }} - className={`text-gray-700 block p-4 text-md hover:text-white cursor-pointer navbg`} - role='menuitem' - tabindex='-1' - id='menu-item-0' - > - {item.city} -
- ); - })} -
-
- )} -
- ); + {show && ( +
+
+ {items && + items.map((item) => { + return ( +
{ + setOptions(item); + setOptions2(item.lists); + setShow(false); + }} + className={`text-gray-700 block p-4 text-md hover:text-white cursor-pointer navbg`} + role="menuitem" + tabindex="-1" + id="menu-item-0" + > + {item.city} +
+ ); + })} +
+
+ )} +
+ ); } export default Dropdown; diff --git a/components/Footer/footer.js b/components/Footer/footer.js index 96bc009f..ddf19429 100644 --- a/components/Footer/footer.js +++ b/components/Footer/footer.js @@ -21,22 +21,21 @@ function Footer() { return (
- company logo -
- {/* This div helps keep the text centered */} -
- -
-
+ company logo +
+ {/* This div helps keep the text centered */} +
+ +
@@ -60,7 +59,7 @@ function Footer() {
-
+
); } diff --git a/components/Form/Cfp/stepFour.js b/components/Form/Cfp/stepFour.js index 4134e656..3a0fd11c 100644 --- a/components/Form/Cfp/stepFour.js +++ b/components/Form/Cfp/stepFour.js @@ -1,5 +1,5 @@ /* eslint-disable react/no-unescaped-entities */ -import React, {useState} from "react"; +import React, { useState } from "react"; import { toast } from "react-hot-toast"; import axios from "axios"; import ActivityLoader from "../../illustration/activityLoader"; @@ -14,20 +14,20 @@ function StepFour({ setStep, setForm, data }) { axios .post( "https://sheet.best/api/sheets/91aebdc6-66cb-46c2-9c7b-4cdfc7541b56", - data + data, ) .then((res) => { setSubmitting(false); if (res.status === 200) { setDisabled(true); - setStep(e, 'successful') + setStep(e, "successful"); } }) .catch((err) => { setSubmitting(false); toast.error("Failed to submit feedback. Try again", { - duration: '6000' - }); + duration: "6000", + }); }); }; return ( @@ -36,7 +36,9 @@ function StepFour({ setStep, setForm, data }) { Additional Information

- Notes will only be seen by reviewers during the CFP process. Therefore, it is important to use this space to explain any technical requirements or why you are best suited to speak on the subject, etc... + Notes will only be seen by reviewers during the CFP process. Therefore, + it is important to use this space to explain any technical requirements + or why you are best suited to speak on the subject, etc...

@@ -48,9 +50,17 @@ function StepFour({ setStep, setForm, data }) { }} onChange={(e) => setForm({ ...data, AdditionalInfo: e.target.value })} /> - +
- By clicking submit, this means you agree to follow the AsyncAPI Initiative Code of Conduct + By clicking submit, this means you agree to follow the{" "} + + AsyncAPI Initiative Code of Conduct +
setStep(e, 2)}> +
setStep(e, 2)} + >

Let's start with your name

@@ -32,7 +35,7 @@ function StepOne({ setStep, setForm, data }) { }} onChange={(e) => setForm({ ...data, Email: e.target.value })} /> -
Bio
+
Bio