Skip to content

Commit

Permalink
fix PR num on pull req
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Feb 7, 2024
1 parent 1039250 commit 3dc9df9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ runs:
uses: tj-actions/branch-names@v8

# Find the pull request number
- id: find-pull-request
if: ${{inputs.destroy != 'true' && github.event_name == 'pull_request'}}
uses: jwalton/gh-find-current-pr@v1
with:
state: open
- id: bcgov
if: ${{github.event_name == 'pull_request'}}
uses: bcgov-nr/[email protected]

# All branch names for this repo seperated by spaces
- name: Extract all active branches
Expand Down Expand Up @@ -92,7 +90,7 @@ runs:
"score": "${{ env.SCORE }}",
"user": "${{ github.actor }}",
"branch": "${{ steps.branch-name.outputs.current_branch }}",
"pr_num": "${{ steps.find-pull-request.outputs.number }}",
"pr_num": "${{ steps.bcgov.outputs.pr }}",
"branches": "${{ env.CIU_ACTIVE_BRANCHES }}"
}' \
"${{inputs.host}}/upload"
Expand All @@ -113,10 +111,10 @@ runs:
# Comment on PR if it is a pull req and the status code is 201
- name: Comment on PR if it is a pull req
if: ${{inputs.pr_comment == 'true' && steps.find-pull-request.outputs.number != '' && steps.branch-name.outputs.base_ref_branch != '' && env.PR_HTTP_RESPONSE == '201'}}
if: ${{inputs.pr_comment == 'true' && github.event_name == 'pull_request' && steps.branch-name.outputs.base_ref_branch != '' && env.PR_HTTP_RESPONSE == '201'}}
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ steps.find-pull-request.outputs.number }}
issue-number: ${{ steps.bcgov.outputs.pr }}
body-path: comment_body.txt
### END ###
### PUBLISHING ###
Expand Down

0 comments on commit 3dc9df9

Please sign in to comment.