[PATCH] D117386: github: Add actions to automate part of the release workflow
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 14:06:16 PST 2022
tstellar marked 5 inline comments as done.
tstellar added inline comments.
================
Comment at: .github/workflows/issue-release-workflow.yml:16
+ !startswith(github.event.comment.body, '<!--IGNORE-->') &&
+ contains(github.event.comment.body, '/cherry-pick')
+ steps:
----------------
kwk wrote:
> I assume that checking for the `/cherry-pick` anywhere in the comment body is part of the `Allow commands on lines besides the first.`, right?
Yes, that's correct.
================
Comment at: .github/workflows/issue-release-workflow.yml:31
+ run: |
+ printf '${{ github.event.comment.body }}' |
+ ./llvm/utils/git/github-automation.py \
----------------
kwk wrote:
> I never checked this but are you sure the comment body is properly escaped if it contains an apostrophe `'`? Does it make sense to do parse it here using something like the following? The benefit would be that you can easily test the extraction from the body with tests and that you could make a clean call to the final script.
>
> ```lang=bash
> printf '${{ github.event.comment.body }}' | ./llvm/utils/git/parse-comment-body.py --get-cherry-pick-commit
> ```
Thanks for catching this. I changed this to use environment variables, which is recommended by the GitHub security documentation. I also test that ' and " are properly escaped.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117386/new/
https://reviews.llvm.org/D117386
More information about the llvm-commits
mailing list