Skip to content

Commit d06e51e

Browse files
add a message
1 parent 24e7b5a commit d06e51e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/validate-pr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,30 @@ jobs:
1919
- uses: amannn/action-semantic-pull-request@v5
2020
env:
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: marocchino/sticky-pull-request-comment@v2
23+
# When the previous steps fails, the workflow would stop. By adding this
24+
# condition you can continue the execution with the populated error message.
25+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
26+
with:
27+
header: pr-title-lint-error
28+
message: |
29+
Please ensure that your PR title follows [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
30+
31+
```
32+
feat: Add variant `outlined` to Button component
33+
feat!: Remove variant `filled` from Button component
34+
bug: Fix TextField hover efffect.
35+
```
36+
37+
Details (Note: `!` denotes a breaking change):
38+
39+
```
40+
${{ steps.lint_pr_title.outputs.error_message }}
41+
```
42+
43+
# Delete a previous comment when the issue has been resolved
44+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
45+
uses: marocchino/sticky-pull-request-comment@v2
46+
with:
47+
header: pr-title-lint-error
48+
delete: true

0 commit comments

Comments
 (0)