Skip to content

Commit

Permalink
Merge pull request #5 from BrownUniversity/bugfix/draft-flag
Browse files Browse the repository at this point in the history
Fix draft flag
  • Loading branch information
ekasbohm authored Aug 22, 2023
2 parents 36d36a1 + 4ca0fcf commit e7650bc
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ outputs:
runs:
using: "composite"
steps:
- name: Set Draft
id: set-draft
run: |
if [ '${{ inputs.draft }}' = 'true' ]; then
echo 'DRAFT="--draft"' >> $GITHUB_OUTPUT
else
echo 'DRAFT=""' >> $GITHUB_OUTPUT
fi
shell: bash
- name: Create Pull Request
id: pull-request
run: |
Expand All @@ -50,7 +41,11 @@ runs:
git config user.name "${{ github.actor }}"
git commit -am "${{ inputs.commit-message }}"
git push -u origin ${{ inputs.branch-name }}
echo "PR_URL=$(gh pr create --title "${{ inputs.title }}" --body "${{ inputs.description }}" ${{ steps.set-draft.outputs.DRAFT }})" >> $GITHUB_OUTPUT
if [ '${{ inputs.draft }}' = 'true' ]; then
echo "PR_URL=$(gh pr create --title "${{ inputs.title }}" --body "${{ inputs.description }}" --draft)" >> $GITHUB_OUTPUT
else
echo "PR_URL=$(gh pr create --title "${{ inputs.title }}" --body "${{ inputs.description }}")" >> $GITHUB_OUTPUT
fi
env:
GITHUB_TOKEN: ${{ inputs.token }}
working-directory: ${{ inputs.directory }}
Expand Down

0 comments on commit e7650bc

Please sign in to comment.