Skip to content

Commit 25022ef

Browse files
authored
chore: Use conventional-commits in generated commit and PR (#418)
* chore: Use conventional-commits in generated commit and PR. Also add help text * chore: the * ci(generate-prs): Simplify reason text for appearances
1 parent b04cbc1 commit 25022ef

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

.github/workflows/generate_prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
- name: Set commit message for manual dispatch
129129
if: ${{ github.event_name == 'workflow_dispatch' }}
130130
run: |
131-
echo "REASON=Manual run triggered by: ${{ github.event.sender.login }} with message [${{ github.event.inputs.message }}]" >> "$GITHUB_ENV"
131+
echo "REASON=@${{ github.event.sender.login }}: ${{ github.event.inputs.message }}" >> "$GITHUB_ENV"
132132
- name: Set commit message for schedule
133133
if: ${{ github.event_name == 'schedule' }}
134134
run: |

playbook/group_vars/all/vars

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,31 @@ pr_branch_name: template_{{ commit_short_hash }}
1414

1515
# Message that will be set on commits
1616
commit_message: |
17-
Generated commit to update templated files based on rev {{ commit_short_hash }} in stackabletech/operator-templating repo.
17+
chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@{{ commit_hash }}
1818

19-
Triggered by:
20-
{{ reason }}
19+
Reference-to: stackabletech/operator-templating@{{ commit_short_hash }} ({{ reason }})
2120

2221
# Title and body of created PRs
23-
pr_title: "Update templated files to rev {{ commit_short_hash }}"
24-
22+
pr_title: "chore: Update templated files ({{ commit_short_hash }})"
2523
pr_body: |
26-
Automatically created PR based on commit {{ commit_hash }} in stackabletech/operator-templating repo.
27-
28-
Triggered by:
29-
{{ reason }}
24+
> [!NOTE]
25+
> _Autogenerated PR to update templated files since the last template run up to stackabletech/operator-templating@{{ commit_hash }}._
26+
>
27+
> | **Trigger-message** |
28+
> | - |
29+
> | {{ reason }} |
30+
31+
> [!TIP]
32+
> Please update the change type as appropriate.
33+
>
34+
> For example, if the change is breaking, add an `!` after the change type:
35+
> ```
36+
> chore!: Update templated files (b04cbc1)
37+
> ```
38+
>
39+
> If you need to add subsequent commits to make the checks pass, change the type:
40+
> ```
41+
> refactor: Replace lazy_static with std::sync::LazyLock (b04cbc1)
42+
> ```
43+
>
44+
> For more information, See [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).

0 commit comments

Comments
 (0)