-
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 'master' into datadog2024
- Loading branch information
Showing
740 changed files
with
71,584 additions
and
48,299 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
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ env: | |
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: | ||
run-ci: | ||
|
@@ -45,8 +46,20 @@ jobs: | |
needs: [run-ci] | ||
runs-on: ubuntu-latest | ||
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 Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }} | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
|
@@ -56,8 +69,13 @@ jobs: | |
|
||
- run: npm ci | ||
|
||
- name: Prettier Check | ||
run: npx prettier . --check | ||
- name: Auto Format (Prettier) | ||
run: make format | ||
|
||
- name: Commit Changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "ci: auto-formatting prettier issues" | ||
|
||
build: | ||
name: Build | ||
|
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
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
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
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
Oops, something went wrong.