Skip to content

Commit

Permalink
update bash output
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahSiegel committed Feb 19, 2024
1 parent 91422a9 commit 2c4802b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ inputs:
outputs:
PRURL:
description: 'The URL of the created pull request'
value: ${{ steps.create_pr.outputs.PR_URL }}
runs:
using: 'composite'
steps:
- name: Create Pull Request
id: create_pr
shell: bash
run: bash create-pr.sh
env:
Expand Down
4 changes: 2 additions & 2 deletions create-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ PR_OUTPUT=$(gh pr create \
--base "$INPUT_TARGETBRANCH" \
--head "$INPUT_SOURCEBRANCH" \
--label "$INPUT_LABELS" \
--assignee "$INPUT_ASSIGNEES")
--assignee "$INPUT_ASSIGNEES" 2>&1)

# Extract PR URL from the output
PR_URL=$(echo "$PR_OUTPUT" | grep -o 'https://github.com/[^ ]*')

# Set the PR URL as the output
echo "name=$PR_URL" >> $GITHUB_OUTPUT
echo "PR_URL=$PR_URL" >> $GITHUB_OUTPUT

0 comments on commit 2c4802b

Please sign in to comment.