Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
.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? |
.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. |
.github/workflows/issue-release-workflow.yml | ||
---|---|---|
36 | Wow! Cool stuff. Thanks for explanation. |
.github/workflows/issue-release-workflow.yml | ||
---|---|---|
36 | Why not use the COMMENT_BODY from above here? Isn't that possible? |
.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. |
LGTM. I assume you've tested that it works because with github.repository == 'llvm/llvm-project' I'm not able to test this ;)
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?