[PATCH] D117386: github: Add actions to automate part of the release workflow

Konrad Wilhelm Kleine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 09:09:09 PST 2022


kwk added a comment.

Looks good overall.  Thank for your patience. Please make sure it still works after my patch ;/



================
Comment at: .github/workflows/issue-release-workflow.yml:1
+name: Issue Release Workflow
+
----------------
Please add a description in YAML comment here so one gets an immediate idea for whom this script is and what it does.


================
Comment at: .github/workflows/issue-release-workflow.yml:12
+    name: Backport Commits
+    runs-on: ubuntu-20.04
+    if: >-
----------------
Good that you've fixed the OS version. 


================
Comment at: .github/workflows/issue-release-workflow.yml:16
+        !startswith(github.event.comment.body, '<!--IGNORE-->') &&
+        contains(github.event.comment.body, '/cherry-pick')
+    steps:
----------------
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?


================
Comment at: .github/workflows/issue-release-workflow.yml:31
+        run: |
+          printf '${{ github.event.comment.body }}' |
+          ./llvm/utils/git/github-automation.py \
----------------
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
```


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