Skip to content

Commit

Permalink
refactor(approve-please): swap lines
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuVeber committed Jun 14, 2024
1 parent d92a6eb commit c0d0345
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/approve-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ jobs:
steps:
- name: ${{ inputs.approval && 'Approve PRs' || 'Search PRs' }}
run: |
body=":technologist: @${{ github.actor }} approved this PR using [approve-please](https://github.com/hedia-team/.github/actions/workflows/approve-please.yml) :robot:"
urls=$(gh search prs --checks success --limit 1000 --owner hedia-team --review none --state open --author ${{ inputs.assignee }} --assignee ${{ inputs.assignee }} --review-requested hedia-team/${{ inputs.team-reviewer }} --label ${{ inputs.label }} --match title "${{ inputs.title }}" --json url --jq '.[] | .url')
${{ inputs.approval && 'echo "Approving $(echo $urls | wc -l) PRs"' || 'echo "Found $(echo $urls | wc -l) PRs"' }}
body=":technologist: @${{ github.actor }} approved this PR using [approve-please](https://github.com/hedia-team/.github/actions/workflows/approve-please.yml) :robot:"
for url in ${urls//,/ }
do
${{ inputs.approval && 'echo $url && gh pr review --approve --body $body $url' || 'echo $url' }}
Expand Down

0 comments on commit c0d0345

Please sign in to comment.