Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added prettier and formatted the files #332

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/automerge-for-humans-merging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}]
Expand All @@ -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"
6 changes: 3 additions & 3 deletions .github/workflows/automerge-orphans.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
MSG_MINIMAL: true
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/format-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Checking formatting using Prettier

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18

#Install dependencies
- run: npm ci

# Prettier must be in `package.json`
- name: Run linters
working-directory: ./
run: npm run format:check
18 changes: 9 additions & 9 deletions .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

name: Create help comment

on:
issue_comment:
types:
- created
on:
issue_comment:
types:
- created

jobs:
create_help_comment_pr:
Expand All @@ -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
Expand All @@ -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\``
})
})
24 changes: 12 additions & 12 deletions .github/workflows/notify-tsc-members-mention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
#########
Expand Down Expand Up @@ -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
#########
Expand Down Expand Up @@ -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
#########
Expand Down Expand Up @@ -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
#########
Expand Down Expand Up @@ -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
#########
Expand Down Expand Up @@ -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
#########
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/please-take-a-look-command.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/release-announcements.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/scripts/README.md
Original file line number Diff line number Diff line change
@@ -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.
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.
9 changes: 4 additions & 5 deletions .github/workflows/scripts/mailchimp/htmlContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<!doctype html>
return `<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!-- NAME: SIMPLE TEXT -->
Expand Down Expand Up @@ -386,7 +385,7 @@ There is a new topic at AsyncAPI Initiative that requires Technical Steering Com
<br>
Please have a look if it is just something you need to be aware of, or maybe your vote is needed.
<br>
Topic: <a href="${ link }" style="color:#007c89;font-weight:normal;text-decoration:underline" target="_blank">${ title }</a>.
Topic: <a href="${link}" style="color:#007c89;font-weight:normal;text-decoration:underline" target="_blank">${title}</a>.
</td>
</tr>
</tbody></table>
Expand Down Expand Up @@ -491,5 +490,5 @@ You can <a href="*|UPDATE_PROFILE|*" style="mso-line-height-rule: exactly;-ms-te
</center>
</body>
</html>
`
}
`;
};
Loading
Loading