You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve logging, fix error logs and comments, and fixing wildcard search of approval (#11)
* posting separate message if not failing #4
* changing failure default and fixing link #4
* updating message #4
* using github-script for error
* adding if statement and using notice #4
* fixing if statement
* updating logs and using verbose #7
* trying to fix wildcard finds
* remove debug
* using xargs -0
* trying quotes
* increasing to 100 comments
* ending the loop if we find approver
* improving log
* removing new lines
* fixing trim
* trying to fix trim
echo "Approval command found in comment id $id ..."
64
+
echo $users | grep -q $actor && echo "Found $actor in team: ${{ inputs.team-name }}" && authorized=true || echo "Not found $actor in team: ${{ inputs.team-name }}"
65
+
break
64
66
else
65
-
echo "Approve command not found..."
67
+
echo "Approval command not found in comment id $id ..."
66
68
fi
67
69
done
68
70
if $authorized; then
69
-
echo "Approval authorized"
71
+
echo "Approval authorized by $actor"
70
72
echo "::set-output name=approved::true"
71
73
else
72
74
echo "Approval not found or not authorized"
73
75
echo "::set-output name=approved::false"
74
-
echo "::error title=Not Approved::There is no /approve command in the comments from someone in the ${{ github.repository_owner }}/${{ inputs.team-name }} team"
76
+
if !(${{ inputs.fail-if-approval-not-found }}); then
77
+
echo "::notice title=Not Approved::There is no /approve command in the comments from someone in the ${{ github.repository_owner }}/${{ inputs.team-name }} team"
:cry: No one approved your run yet! Have someone from the @${{ github.repository_owner }}/${{ inputs.team-name }} team run `/approve` and then try your command again
86
-
:no_entry_sign: :no_entry: Marking the workflow run as failed
90
+
:no_entry_sign: :no_entry: Marking the [workflow run](${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}) as failed
:cry: No one approved your run yet! Have someone from the @${{ github.repository_owner }}/${{ inputs.team-name }} team run `/approve` and then try your command again
101
+
:warning: :pause_button: The [workflow run](${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}) wasn't marked as failed
0 commit comments