Skip to content

Commit

Permalink
[backport] ci: set continue-on-error to false in pr-title-checker act…
Browse files Browse the repository at this point in the history
…ion (#496) (#497)

* ci: set continue-on-error to false in pr-title-checker action

Signed-off-by: Lin Yang <[email protected]>

* feat: improve the workflow

Signed-off-by: Lin Yang <[email protected]>

* feat: improve the workflow

Signed-off-by: Lin Yang <[email protected]>

---------

Signed-off-by: Lin Yang <[email protected]>
(cherry picked from commit 76b43e6)

ci: set continue-on-error to false in pr-title-checker action (#496)

* ci: set continue-on-error to false in pr-title-checker action

Signed-off-by: Lin Yang <[email protected]>

* feat: improve the workflow

Signed-off-by: Lin Yang <[email protected]>

* feat: improve the workflow

Signed-off-by: Lin Yang <[email protected]>

---------

Signed-off-by: Lin Yang <[email protected]>

fix: a typo

Signed-off-by: Lin Yang <[email protected]>

fix: executing condition of pr title workflow

Signed-off-by: Lin Yang <[email protected]>

fix: executing condition of pr title workflow

Signed-off-by: Lin Yang <[email protected]>

fix: workflow condition of checking pr title

Signed-off-by: Lin Yang <[email protected]>

fix: workflow syntax

Signed-off-by: Lin Yang <[email protected]>
  • Loading branch information
reaver-flomesh committed Dec 2, 2024
1 parent 9b67414 commit cd9ec8a
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,25 @@ jobs:
validate:
name: Validate PR Title
runs-on: ubuntu-latest
outputs:
success: ${{ steps.check.outputs.success }}
steps:
- name: PR Title Check
uses: thehanimo/[email protected]
id: check
continue-on-error: true
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: ".github/pr-title-checker-config.json"

fail:
name: PR Title Check Failed
runs-on: ubuntu-latest
needs: validate
if: ${{ always() && needs.validate.outputs.success == 'false'}}
steps:
- name: Add comment to fix PR title
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.check.outputs.success == 'false'}}
with:
header: 'PR Title Check'
recreate: true
Expand All @@ -47,15 +53,24 @@ jobs:
* `feat: add new feature AB#789`
* `chore: fixing build pipeline` - no AB reference
* `build(deps): bump BlahBlah from 1.0 to 1.1`
* `[WIP] feat: add new feature AB#123`
* `[CHERRY-PICK] fix: fix typo in README.md AB#123`
* `[BACKPORT] fix: fix typo in README.md AB#123`
* `[wip] feat: add new feature AB#123`
* `[cherry-pick] fix: fix typo in README.md AB#123`
* `[backport] fix: fix typo in README.md AB#123`
For more details, please refer to the [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0)
and the [PR Title Configuration File](.github/pr-title-checker-config.json).
- name: Set action status to failed
run: |
echo "❌ PR Title Check Failed"
exit 1
success:
name: PR Title Check Passed
runs-on: ubuntu-latest
needs: validate
if: ${{ always() && needs.validate.outputs.success == 'true' }}
steps:
- name: Add comment that PR title is fixed
if: ${{ steps.check.outputs.success == 'true'}}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: 'PR Title Check'
Expand Down

0 comments on commit cd9ec8a

Please sign in to comment.