You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2022/10/19 21:05:04 UTC

[beam] branch master updated: Add reopen issue command (#23733)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 972e66ca780 Add reopen issue command (#23733)
972e66ca780 is described below

commit 972e66ca78090c5ceacab3773a41a3bb8123d933
Author: Danny McCormick <da...@google.com>
AuthorDate: Wed Oct 19 17:04:53 2022 -0400

    Add reopen issue command (#23733)
    
    * Add reopen issue command
    
    * Reopen issue docs
    
    * reopen issue docs
    
    * Update feature.yml
    
    * Update task.yml
---
 .github/ACTIONS.md                 | 1 +
 .github/ISSUE_TEMPLATE/bug.yml     | 1 +
 .github/ISSUE_TEMPLATE/feature.yml | 3 ++-
 .github/ISSUE_TEMPLATE/task.yml    | 3 ++-
 .github/workflows/self-assign.yml  | 8 ++++++++
 5 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/.github/ACTIONS.md b/.github/ACTIONS.md
index 43dbe0479d4..7432a3d28b1 100644
--- a/.github/ACTIONS.md
+++ b/.github/ACTIONS.md
@@ -94,6 +94,7 @@ Phrases self-assign, close, or manage labels on an issue:
 | `.take-issue` | Self-assign the issue |
 | `.close-issue` | Close the issue as completed |
 | `.close-issue not_planned` | Close the issue as not-planned |
+| `.reopen-issue` | Reopen a closed issue |
 | `.add-labels` | Add comma separated labels to the issue (e.g. `add-labels l1, 'l2 with spaces'`) |
 | `.remove-labels` | Remove comma separated labels to the issue (e.g. `remove-labels l1, 'l2 with spaces'`) |
 | `.set-labels` | Sets comma separated labels to the issue and removes any other labels (e.g. `set-labels l1, 'l2 with spaces'`) |
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 4c5de526189..3c30c343ca8 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -26,6 +26,7 @@ body:
     attributes:
       value: |
         Thanks for taking the time to fill out this bug report! Once you've created an issue, you can self-assign by commenting `.take-issue` and you can close by commenting `.close-issue`.
+        Anyone can reopen a closed issue by commenting `.reopen-issue`.
         You can also add/remove labels by commenting `.add-labels label1,label2,'label 3 with spaces'` or `.remove-labels label1,label2,'label 3 with spaces'`,
         or with `.set-labels label1,label2,'label 3 with spaces'` (which removes any labels not in that set).
   - type: textarea
diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml
index 2f895a8bc42..c88073f41b8 100644
--- a/.github/ISSUE_TEMPLATE/feature.yml
+++ b/.github/ISSUE_TEMPLATE/feature.yml
@@ -26,6 +26,7 @@ body:
     attributes:
       value: |
         Thanks for taking the time to fill out this feature request! Once you've created an issue, you can self-assign by commenting `.take-issue` and you can close by commenting `.close-issue`.
+        Anyone can reopen a closed issue by commenting `.reopen-issue`.
         You can also add/remove labels by commenting `.add-labels label1,label2,'label 3 with spaces'` or `.remove-labels label1,label2,'label 3 with spaces'`,
         or with `.set-labels label1,label2,'label 3 with spaces'` (which removes any labels not in that set).
   - type: textarea
@@ -159,4 +160,4 @@ body:
       - "Component: testing-nexmark"
       - "Component: website"
     validations:
-      required: true
\ No newline at end of file
+      required: true
diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml
index 9ff10112fef..4e7d714fa8a 100644
--- a/.github/ISSUE_TEMPLATE/task.yml
+++ b/.github/ISSUE_TEMPLATE/task.yml
@@ -26,6 +26,7 @@ body:
     attributes:
       value: |
         Thanks for taking the time to fill out this task! Once you've created an issue, you can self-assign by commenting `.take-issue` and you can close by commenting `.close-issue`.
+        Anyone can reopen a closed issue by commenting `.reopen-issue`.
         You can also add/remove labels by commenting `.add-labels label1,label2,'label 3 with spaces'` or `.remove-labels label1,label2,'label 3 with spaces'`,
         or with `.set-labels label1,label2,'label 3 with spaces'` (which removes any labels not in that set).
   - type: textarea
@@ -159,4 +160,4 @@ body:
       - "Component: testing-nexmark"
       - "Component: website"
     validations:
-      required: true
\ No newline at end of file
+      required: true
diff --git a/.github/workflows/self-assign.yml b/.github/workflows/self-assign.yml
index 569624b3d18..c6b7cc69ce9 100644
--- a/.github/workflows/self-assign.yml
+++ b/.github/workflows/self-assign.yml
@@ -64,6 +64,14 @@ jobs:
                   state: 'closed'
                 });
               }
+            } else if (bodyString == '.reopen-issue') {
+                console.log('Reopening issue');
+                github.rest.issues.update({
+                  issue_number: context.issue.number,
+                  owner: context.repo.owner,
+                  repo: context.repo.repo,
+                  state: 'open'
+                });
             } else if (bodyString == '.set-labels' || bodyString == '.add-labels' || bodyString == '.remove-labels') {
               console.log('Updating labels');
               if (i + 1 >= body.length) {