forked from AOT-Technologies/forms-flow-ai-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging/QA' into staging/QA
- Loading branch information
Showing
59 changed files
with
2,333 additions
and
6,108 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,21 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- staging/QA | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
sonarcloud: | ||
name: SonarCloud | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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,84 @@ | ||
name: PR Notification to Google Chat | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, closed] | ||
branches: | ||
- master | ||
- staging/QA | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'AOT-Technologies/forms-flow-ai-charts' | ||
|
||
steps: | ||
- name: Determine PR Status | ||
id: pr_status | ||
run: | | ||
if [[ "${{ github.event.action }}" == "opened" ]]; then | ||
echo "status=🟢 Open" >> $GITHUB_ENV | ||
elif [[ "${{ github.event.action }}" == "closed" && "${{ github.event.pull_request.merged }}" == "true" ]]; then | ||
echo "status=🟣 Merged" >> $GITHUB_ENV | ||
elif [[ "${{ github.event.action }}" == "closed" ]]; then | ||
echo "status=🔴 Closed" >> $GITHUB_ENV | ||
else | ||
echo "status=🟢 Open" >> $GITHUB_ENV | ||
fi | ||
- name: Confirm PR_NOTIFICATION Secret is Set | ||
run: | | ||
if [[ -z "${{ secrets.PR_NOTIFICATION }}" ]]; then | ||
echo "PR_NOTIFICATION secret is not set." | ||
else | ||
echo "PR_NOTIFICATION secret is set." | ||
fi | ||
- name: Send notification to Google Chat | ||
uses: fjogeleit/[email protected] | ||
with: | ||
url: ${{ secrets.PR_NOTIFICATION }} | ||
method: POST | ||
contentType: application/json | ||
data: | | ||
{ | ||
"cards": [ | ||
{ | ||
"header": { | ||
"title": "Open source: Pull Request Opened by ${{ github.event.pull_request.user.login }}", | ||
"subtitle": "Pull Request #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}", | ||
"imageUrl": "${{ github.event.pull_request.user.avatar_url }}" | ||
}, | ||
"sections": [ | ||
{ | ||
"widgets": [ | ||
{ | ||
"textParagraph": { | ||
"text": "Repository: ${{ github.repository }}" | ||
} | ||
}, | ||
{ | ||
"textParagraph": { | ||
"text": "Status: ${{ env.status }}" | ||
} | ||
}, | ||
{ | ||
"buttons": [ | ||
{ | ||
"textButton": { | ||
"text": "View Pull Request", | ||
"onClick": { | ||
"openLink": { | ||
"url": "${{ github.event.pull_request.html_url }}" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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.