-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'version-3-4' into pause-3-4
- Loading branch information
Showing
10 changed files
with
9,038 additions
and
2,151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: API Format | ||
|
||
on: | ||
pull_request_target: | ||
types: ["labeled", "closed"] | ||
|
||
env: | ||
GITHUB_BRANCH: ${{ github.ref_name }} | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
FULLSTORY_ORGID: ${{ secrets.FULLSTORY_ORGID }} | ||
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} | ||
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | ||
ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }} | ||
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }} | ||
PALETTE_API_KEY: ${{ secrets.PALETTE_API_KEY }} | ||
|
||
jobs: | ||
backport: | ||
name: Format API PR | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.action == 'labeled' | ||
&& github.event.label.name == 'api-format' | ||
&& github.event.pull_request.draft == false | ||
|
||
steps: | ||
- name: Retrieve Credentials | ||
id: import-secrets | ||
uses: hashicorp/[email protected] | ||
with: | ||
url: https://vault.prism.spectrocloud.com | ||
method: approle | ||
roleId: ${{ secrets.VAULT_ROLE_ID }} | ||
secretId: ${{ secrets.VAULT_SECRET_ID }} | ||
secrets: /providers/github/organizations/spectrocloud/token?org_name=spectrocloud token | VAULT_GITHUB_TOKEN | ||
|
||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }} | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "npm" | ||
|
||
- name: Determine branch name | ||
id: extract_branch | ||
run: | | ||
if [ "${{ github.event_name }}" = "pull_request" ]; then | ||
echo "GITHUB_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV | ||
else | ||
echo "GITHUB_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV | ||
fi | ||
- run: npm ci | ||
|
||
- name: Format API | ||
run: make api | ||
|
||
|
||
- name: Commit Changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "ci: auto-formatting API changes" | ||
|
||
|
||
- name: Slack Notification | ||
if: ${{ failure() }} | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_PRIVATE_TEAM_WEBHOOK }} | ||
SLACK_USERNAME: "spectromate" | ||
SLACK_ICON_EMOJI: ":robot_panic:" | ||
SLACK_COLOR: ${{ job.status }} | ||
SLACK_MESSAGE: ' The PR for branch ${{env.GITHUB_BRANCH}} failed when attempting to format the API. Review the GitHub Actions logs for more details.' | ||
|
||
- name: Post Netlify progress | ||
uses: mshick/add-pr-comment@v2 | ||
with: | ||
message: | | ||
🤖 The API has been formated and is ready for merging. | ||
refresh-message-position: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"concurrency": 50, | ||
"markdown": true, | ||
"recurse": true, | ||
"timeout": 100000, | ||
"retry": true, | ||
"retryErrors": true, | ||
"retryErrorsJitter": 10000, | ||
"retryErrorsCount": 5, | ||
"format": "json", | ||
"skip": [ | ||
"^https://docs.spectrocloud.com.*$$", | ||
"^https://docs.spectrocloud.com/.*/supplemental-packs$$", | ||
"^http://docs.spectrocloud.com.*$$", | ||
"^https://software-private.spectrocloud.com.*$$", | ||
"^/.*.md$$", | ||
"![.*](.*)$$", | ||
".(jpg|jpeg|png|gif|webp)$$", | ||
"https://linux.die.net/man/.*$$", | ||
"https://mysql.com/.*.*$$", | ||
"https://dev.mysql.com/doc/.*$$" | ||
], | ||
"verbosity": "error", | ||
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"concurrency": 1, | ||
"markdown": true, | ||
"recurse": false, | ||
"timeout": 100000, | ||
"retry": true, | ||
"retryErrors": true, | ||
"retryErrorsJitter": 10000, | ||
"retryErrorsCount": 5, | ||
"format": "json", | ||
"skip": [ | ||
"^https://docs.spectrocloud.com.*$$", | ||
"^https://docs.spectrocloud.com/.*/supplemental-packs$$", | ||
"^http://docs.spectrocloud.com.*$$", | ||
"^https://software-private.spectrocloud.com.*$$", | ||
"^/.*.md$$", | ||
"![.*](.*)$$", | ||
".(jpg|jpeg|png|gif|webp)$$", | ||
"https://linux.die.net/man/.*$$", | ||
"https://mysql.com/.*.*$$", | ||
"https://dev.mysql.com/doc/.*$$" | ||
], | ||
"verbosity": "error", | ||
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"concurrency": 1, | ||
"markdown": true, | ||
"recurse": false, | ||
"timeout": 100000, | ||
"retry": true, | ||
"retryErrors": true, | ||
"retryErrorsJitter": 10000, | ||
"retryErrorsCount": 5, | ||
"format": "csv", | ||
"skip": [ | ||
"^https://docs.spectrocloud.com.*$$", | ||
"^https://docs.spectrocloud.com/.*/supplemental-packs$$", | ||
"^http://docs.spectrocloud.com.*$$", | ||
"^https://software-private.spectrocloud.com.*$$", | ||
"^/.*.md$$", | ||
"^/.*.md#*$$", | ||
"![.*](.*)$$", | ||
".(jpg|jpeg|png|gif|webp)$$", | ||
"https://linux.die.net/man/.*$$", | ||
"https://mysql.com/.*.*$$", | ||
"https://dev.mysql.com/doc/.*$$" | ||
], | ||
"verbosity": "error", | ||
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"concurrency": 50, | ||
"markdown": true, | ||
"recurse": true, | ||
"timeout": 100000, | ||
"retry": true, | ||
"retryErrors": true, | ||
"retryErrorsJitter": 10000, | ||
"retryErrorsCount": 5, | ||
"format": "csv", | ||
"skip": [ | ||
"^https://docs.spectrocloud.com.*$$", | ||
"^https://docs.spectrocloud.com/.*/supplemental-packs$$", | ||
"^http://docs.spectrocloud.com.*$$", | ||
"^https://software-private.spectrocloud.com.*$$", | ||
"^/.*.md$$", | ||
"![.*](.*)$$", | ||
".(jpg|jpeg|png|gif|webp)$$", | ||
"https://linux.die.net/man/.*$$", | ||
"https://mysql.com/.*.*$$", | ||
"https://dev.mysql.com/doc/.*$$" | ||
], | ||
"verbosity": "error", | ||
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" | ||
} |
Oops, something went wrong.