feat: add support for data-analytics- [FC-3152] #7226
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
name: Blade PR Title Check | |
on: | |
pull_request_target: | |
types: [opened, edited, synchronize] | |
concurrency: # cancel previously running workflows when a new workflow is re-run | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pr-title-check: | |
name: PR Title Check | |
runs-on: ubuntu-latest # nosemgrep: non-self-hosted-runner | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
steps: | |
- uses: amannn/action-semantic-pull-request@v5 | |
id: pr_title_check | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
# When the previous steps fails, the workflow would stop. By adding this | |
# condition you can continue the execution with the populated error message. | |
if: always() && (steps.pr_title_check.outputs.error_message != null) | |
with: | |
header: pr-title-comment | |
message: | | |
❌ PR title doesn't follow [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). | |
Details: | |
``` | |
${{ steps.pr_title_check.outputs.error_message }} | |
``` | |
# Delete a previous comment when the issue has been resolved | |
- if: ${{ steps.pr_title_check.outputs.error_message == null }} | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
header: pr-title-comment | |
message: '✅ PR title follows [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).' |