[llvm] [workflows] Mention the correct user who makes a /cherry-pick comment (PR #82680)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 09:30:05 PST 2024


================
@@ -65,5 +65,5 @@ jobs:
           release-workflow \
           --branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
           --issue-number ${{ github.event.issue.number }} \
-          --requested-by ${{ github.event.issue.user.login }} \
+          --requested-by ${{ (github.event.action == 'opened' && github.event.issue.body.user.login) || github.event.comment.user.login }} \
----------------
tstellar wrote:

Yes, it's meant to be there.  With the GitHub action syntax, the value of an expression is the last expression that is evaluated using short-circuit evaluation rules..  So what this does is that when we have an 'opened' event, the expression will evaluate to `github.event.issue.body.user.login` otherwise the expression will evaluate to `github.event.comment.user.login`.

https://github.com/llvm/llvm-project/pull/82680


More information about the llvm-commits mailing list