Skip to content

Commit

Permalink
fix(generate_pr): Don't use @ mention for --review option in gh CLI (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
NickLarsenNZ committed Sep 17, 2024
1 parent c9ed75c commit 1789cc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ jobs:
- name: Set commit message for manual dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "AUTHOR=@${{ github.event.sender.login }}" >> "$GITHUB_ENV"
echo "AUTHOR=${{ github.event.sender.login }}" >> "$GITHUB_ENV"
echo "REASON=${{ github.event.inputs.message }}" >> "$GITHUB_ENV"
- name: Set commit message for schedule
if: ${{ github.event_name == 'schedule' }}
run: |
echo "AUTHOR=Github Actions"
echo "AUTHOR=stackabletech/developers"
echo "REASON=Daily run triggered" >> "$GITHUB_ENV"
- name: Overwrite repositories.yaml for ${{ matrix.repository.name }}
Expand All @@ -152,7 +152,7 @@ jobs:
if: ${{ !inputs.dry-run }}
run: |
# Funnel via JSON to ensure that values are escaped properly
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
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
ansible-playbook playbook/playbook.yaml --extra-vars "@vars.json"
env:
GH_ACCESS_TOKEN: ${{ secrets.gh_access_token }}
Expand Down
2 changes: 1 addition & 1 deletion playbook/group_vars/all/vars
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pr_body: |
>
> | **Trigger-message** |
> | - |
> | {{ author }}: {{ reason }} |
> | @{{ author }}: {{ reason }} |

> [!TIP]
> Please update the change type as appropriate.
Expand Down

0 comments on commit 1789cc2

Please sign in to comment.