[PATCH] D119312: issue-release-workflow: Add support for /cherry-pick command in issue body

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 22:07:34 PST 2022


tstellar created this revision.
tstellar added a reviewer: kwk.
tstellar requested review of this revision.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119312

Files:
  .github/workflows/issue-release-workflow.yml


Index: .github/workflows/issue-release-workflow.yml
===================================================================
--- .github/workflows/issue-release-workflow.yml
+++ .github/workflows/issue-release-workflow.yml
@@ -19,18 +19,20 @@
     types:
       - created
       - edited
+  issues:
+    types:
+      - opened
 
 env:
-  COMMENT_BODY: ${{ github.event.comment.body }}
+  COMMENT_BODY: ${{ github.event.action == 'opened' && github.event.issue.body || github.event.comment.body  }}
 
 jobs:
   backport-commits:
     name: Backport Commits
     runs-on: ubuntu-20.04
     if: >-
-        (github.repository == 'llvm/llvm-project') &&
         !startswith(github.event.comment.body, '<!--IGNORE-->') &&
-        contains(github.event.comment.body, '/cherry-pick')
+        contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
     steps:
       - name: Fetch LLVM sources
         uses: actions/checkout at v2
@@ -61,7 +63,6 @@
     name: Create Pull Request
     runs-on: ubuntu-20.04
     if: >-
-        (github.repository == 'llvm/llvm-project') &&
         !startswith(github.event.comment.body, '<!--IGNORE-->') &&
         contains(github.event.comment.body, '/branch')
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119312.407049.patch
Type: text/x-patch
Size: 1247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/d920f99c/attachment.bin>


More information about the llvm-commits mailing list