This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 90d1dd187e GH-14784: [Dev] Add possibility to autoassign on GitHub 
issue comment (#14785)
90d1dd187e is described below

commit 90d1dd187ea1235037d17ac596f71ad6a67fc567
Author: Raúl Cumplido <[email protected]>
AuthorDate: Fri Dec 2 07:37:31 2022 +0100

    GH-14784: [Dev] Add possibility to autoassign on GitHub issue comment 
(#14785)
    
    This PR will allow a user to type `take` in an issue comment and the issue 
will automatically be assigned to them.
    
    Authored-by: Raúl Cumplido <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 .github/workflows/comment_bot.yml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/.github/workflows/comment_bot.yml 
b/.github/workflows/comment_bot.yml
index 4a5461752b..0711a23f75 100644
--- a/.github/workflows/comment_bot.yml
+++ b/.github/workflows/comment_bot.yml
@@ -174,3 +174,21 @@ jobs:
         with:
           repo-token: ${{ secrets.GITHUB_TOKEN }}
           args: "--force"
+
+  issue_assign:
+    name: "Assign issue"
+    permissions:
+      issues: write
+    if: github.event.comment.body == 'take'
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/github-script@v3
+        with:
+          github-token: ${{ secrets.GITHUB_TOKEN }}
+          script: |
+            github.issues.addAssignees({
+                owner: context.repo.owner,
+                repo: context.repo.repo,
+                issue_number: context.payload.issue.number,
+                assignees: context.payload.comment.user.login
+            });

Reply via email to