This is an archive of the discontinued LLVM Phabricator instance.

issue-release-workflow: Add support for /cherry-pick command in issue body
ClosedPublic

Authored by tstellar on Feb 8 2022, 10:07 PM.

Diff Detail

Event Timeline

tstellar requested review of this revision.Feb 8 2022, 10:07 PM
tstellar created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2022, 10:07 PM
tstellar updated this revision to Diff 407402.Feb 9 2022, 11:43 PM

Add back condition to limit action to llvm/llvm-project repo

alexbatashev added inline comments.
.github/workflows/issue-release-workflow.yml
36

My understanding of https://docs.github.com/en/actions/learn-github-actions/expressions#contains is that contains accepts either strings or arrays. Here I'm not sure what the resulting type would be. github.event.action == 'opened' is boolean expression, and the last two are strings. @tstellar could you please explain what this line is doing?

tstellar added inline comments.Feb 9 2022, 11:56 PM
.github/workflows/issue-release-workflow.yml
36

This is how you emulate a ternary operator with the GitHub actions expression. So it's github.event.action == 'opened' ? github.event.issue.body : github.event.comment.body. The resulting value/type comes from the last expression that is executed.

alexbatashev added inline comments.Feb 9 2022, 11:59 PM
.github/workflows/issue-release-workflow.yml
36

Wow! Cool stuff. Thanks for explanation.

kwk added inline comments.Feb 14 2022, 1:42 PM
.github/workflows/issue-release-workflow.yml
36

Why not use the COMMENT_BODY from above here? Isn't that possible?

tstellar added inline comments.Feb 15 2022, 10:36 AM
.github/workflows/issue-release-workflow.yml
36

I tried and it doesn't work. The docs also say that the env context can only be used in steps.

kwk accepted this revision.Feb 16 2022, 3:03 AM

LGTM. I assume you've tested that it works because with github.repository == 'llvm/llvm-project' I'm not able to test this ;)

This revision is now accepted and ready to land.Feb 16 2022, 3:03 AM
This revision was landed with ongoing or failed builds.Feb 16 2022, 10:19 PM
This revision was automatically updated to reflect the committed changes.