2222 issue_comment :
2323 types : [created, edited]
2424
25+ permissions : {}
26+
2527jobs :
2628 autoapprove :
2729 # This job only runs for pull request comments
@@ -37,28 +39,36 @@ jobs:
3739
3840 - name : " Settings"
3941 id : settings
42+ env :
43+ event_name : ${{ github.event_name }}
44+ inputs_user : ${{ inputs.user }}
45+ inputs_html_url : ${{ inputs.html_url }}
46+ inputs_pr : ${{ inputs.pr }}
47+ inputs_commentid : ${{ inputs.commentid }}
48+ github_login : ${{ github.event.comment.user.login }}
49+ github_html_url : ${{ github.event.comment.html_url }}
50+ github_number : ${{ github.event.issue.number }}
51+ github_id : ${{ github.event.comment.id }}
4052 run : |
41- export event_name=${{ github.event_name }}
42-
4353 if [[ $event_name == "workflow_dispatch" ]] ; then
4454 echo "On workflow dispatch"
45- echo "user=${{ inputs.user } }" >> $GITHUB_OUTPUT
46- echo "html_url=${{ inputs.html_url } }" >> $GITHUB_OUTPUT
47- echo "pull_request=${{ inputs.pr } }" >> $GITHUB_OUTPUT
48- echo "commentid=${{ inputs.commentid } }" >> $GITHUB_OUTPUT
55+ echo "user=${inputs_user }" >> $GITHUB_OUTPUT
56+ echo "html_url=${inputs_html_url }" >> $GITHUB_OUTPUT
57+ echo "pull_request=${inputs_pr }" >> $GITHUB_OUTPUT
58+ echo "commentid=${inputs_commentid }" >> $GITHUB_OUTPUT
4959
5060 else
5161 echo "On $event_name"
52- echo "user=${{ github.event.comment.user.login } }" >> $GITHUB_OUTPUT
53- echo "html_url=${{ github.event.comment.html_url } }" >> $GITHUB_OUTPUT
54- echo "pull_request=${{ github.event.issue.number } }" >> $GITHUB_OUTPUT
55- echo "commentid=${{ github.event.comment.id } }" >> $GITHUB_OUTPUT
62+ echo "user=${github_login }" >> $GITHUB_OUTPUT
63+ echo "html_url=${github_html_url }" >> $GITHUB_OUTPUT
64+ echo "pull_request=${github_number }" >> $GITHUB_OUTPUT
65+ echo "commentid=${github_id }" >> $GITHUB_OUTPUT
5666
5767 fi;
5868
5969 - name : React to comment
6070 # https://github.com/ansys/pymapdl/pull/2654#issuecomment-1889009514
61- uses : dkershner6/reaction-action@v2 # You can also use a specific version, e.g. v2.0.0
71+ uses : dkershner6/reaction-action@97ede302a1b145b3739dec3ca84a489a34ef48b5 # v2.2.1
6272 with :
6373 token : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
6474 commentId : ${{ steps.settings.outputs.commentid }} # Optional if the trigger is a comment. Use another action to find this otherwise.
7181 export IMG_MSG=$(curl -s 'https://us-central1-lgtm-reloaded.cloudfunctions.net/lgtm' | jq -r '.markdown' | grep -v 'Powered By GIPHY')
7282 echo "IMG_MSG=$IMG_MSG" >> $GITHUB_OUTPUT
7383
74- - uses : hmarr/auto-approve-action@v4
84+ - uses : hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
7585 with :
7686 review-message : |
7787 :white_check_mark: Approving this PR because [${{ steps.settings.outputs.user }}](https://github.com/${{ steps.settings.outputs.user }}) said so in [here](${{ steps.settings.outputs.html_url }}) :grimacing:
0 commit comments