Skip to content

Commit 8a4c86c

Browse files
author
KocsisV
committed
EAVPD-66 trying to fix the PR open event triggering a comment
1 parent cd1e09d commit 8a4c86c

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

action.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,18 @@ runs:
163163
$msg | Out-File -FilePath '${{ runner.temp }}/pr_comment.txt'
164164
echo $msg
165165
166-
- name: Extract branch name
167-
if: ${{ inputs.comment_on_pr == 'true' }}
168-
shell: bash
169-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
170-
id: extract_branch
166+
#- name: Extract branch name
167+
# if: ${{ inputs.comment_on_pr == 'true' }}
168+
# shell: bash
169+
# run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
170+
# id: extract_branch
171171

172172
- name: Find Pull Request
173173
if: ${{ inputs.comment_on_pr == 'true' }}
174174
uses: juliangruber/find-pull-request-action@v1
175175
id: find-pull-request
176176
with:
177-
branch: ${{ steps.extract_branch.outputs.branch }}
177+
branch: ${{ github.head_ref || github.ref_name }}
178178

179179
- name: Comment on PR
180180
if: ${{ (inputs.comment_on_pr == 'true') && (steps.find-pull-request.outputs.number > 0) }}
@@ -185,15 +185,11 @@ runs:
185185
pr_number: '${{ steps.find-pull-request.outputs.number }}'
186186

187187
- name: Check build result
188+
if: ${{ steps.process_summary.outputs.need_to_fail == 'true' }}
188189
shell: pwsh
189190
run: |
190-
$needToFail = "${{ steps.process_summary.outputs.need_to_fail }}"
191-
192-
if ( $needToFail -eq "true" )
193-
{
194-
echo "Failing build, because there are issues detected above the set threshold."
195-
exit 1
196-
}
191+
echo "Failing build, because there are issues detected above the set threshold."
192+
exit 1
197193
198194
branding:
199195
icon: 'box'

0 commit comments

Comments
 (0)