Skip to content

Commit eade5c5

Browse files
ci(cc): add comments (#1790)
1 parent d83e13c commit eade5c5

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/conventional-commits-check.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,31 @@ jobs:
1919
uses: webiny/[email protected]
2020

2121
- name: Check Semantic Pull Request title
22-
uses: amannn/[email protected]
22+
uses: amannn/action-semantic-pull-request@v5
23+
id: lint_pr_title
2324
env:
2425
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- uses: marocchino/sticky-pull-request-comment@v2
28+
# When the previous steps fails, the workflow would stop. By adding this
29+
# condition you can continue the execution with the populated error message.
30+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
31+
with:
32+
header: pr-title-lint-error
33+
message: |
34+
Hey there and thank you for opening this pull request! 👋🏼
35+
36+
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
37+
38+
Details:
39+
40+
```
41+
${{ steps.lint_pr_title.outputs.error_message }}
42+
```
43+
44+
# Delete a previous comment when the issue has been resolved
45+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
46+
uses: marocchino/sticky-pull-request-comment@v2
47+
with:
48+
header: pr-title-lint-error
49+
delete: true

0 commit comments

Comments
 (0)