Skip to content

Commit 1789cc2

Browse files
authored
fix(generate_pr): Don't use @ mention for --review option in gh CLI (#437)
* fix(generate_prs): Remove @ from author, and only add it in the PR description. * fix(generate_prs): Use a valid author for scheduled run as it will be used as the PR reviewer.
1 parent c9ed75c commit 1789cc2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/generate_prs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ jobs:
128128
- name: Set commit message for manual dispatch
129129
if: ${{ github.event_name == 'workflow_dispatch' }}
130130
run: |
131-
echo "AUTHOR=@${{ github.event.sender.login }}" >> "$GITHUB_ENV"
131+
echo "AUTHOR=${{ github.event.sender.login }}" >> "$GITHUB_ENV"
132132
echo "REASON=${{ github.event.inputs.message }}" >> "$GITHUB_ENV"
133133
- name: Set commit message for schedule
134134
if: ${{ github.event_name == 'schedule' }}
135135
run: |
136-
echo "AUTHOR=Github Actions"
136+
echo "AUTHOR=stackabletech/developers"
137137
echo "REASON=Daily run triggered" >> "$GITHUB_ENV"
138138
139139
- name: Overwrite repositories.yaml for ${{ matrix.repository.name }}
@@ -152,7 +152,7 @@ jobs:
152152
if: ${{ !inputs.dry-run }}
153153
run: |
154154
# Funnel via JSON to ensure that values are escaped properly
155-
echo '{}' | jq '{commit_hash: $ENV.GITHUB_SHA, author: $ENV.AUTHOR, reason: $ENV.REASON, base_dir: $pwd, gh_access_token: $ENV.GH_ACCESS_TOKEN}' --arg pwd "$(pwd)" > vars.json
155+
echo '{}' | jq '{commit_hash: $ENV.GITHUB_SHA, author: $ENV.AUTHOR, reason: $ENV.REASON, base_dir: $pwd, gh_access_token: $ENV.GH_ACCESS_TOKEN}' --arg pwd "$(pwd)" > vars.json
156156
ansible-playbook playbook/playbook.yaml --extra-vars "@vars.json"
157157
env:
158158
GH_ACCESS_TOKEN: ${{ secrets.gh_access_token }}

playbook/group_vars/all/vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pr_body: |
2626
>
2727
> | **Trigger-message** |
2828
> | - |
29-
> | {{ author }}: {{ reason }} |
29+
> | @{{ author }}: {{ reason }} |
3030

3131
> [!TIP]
3232
> Please update the change type as appropriate.

0 commit comments

Comments
 (0)