You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org> on 2023/09/04 15:51:44 UTC

[GitHub] [apisix] monkeyDluffy6017 opened a new pull request, #10152: ci: add label when user respond in the pr

monkeyDluffy6017 opened a new pull request, #10152:
URL: https://github.com/apache/apisix/pull/10152

   ### Description
   
   Add a `user respond` label when someone comment in the pr
   
   Fixes # (issue)
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on pull request #10152: ci: add label when user respond in the pr

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10152:
URL: https://github.com/apache/apisix/pull/10152#issuecomment-1705506938

   > Are you sure you do not want to do the automation when the user pushes a new commit?
   
   @shreemaan-abhishek I can't get the label value from the `push` event, so i think it's fine to focus on the comment, the author need to notify us when he is ready


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] shreemaan-abhishek commented on a diff in pull request #10152: ci: add label when user respond in the pr

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #10152:
URL: https://github.com/apache/apisix/pull/10152#discussion_r1315094897


##########
.github/workflows/update-labels.yml:
##########
@@ -28,3 +30,33 @@ jobs:
               repo: context.repo.repo,
               name: "wait for update"
             })
+
+  pr_commented:
+    if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss')) && !contains(github.event.issue.labels.*.name, 'user responded')
+    runs-on: ubuntu-latest
+    steps:
+      - name: update label when user responds
+        uses: actions/github-script@v6
+        with:
+          script: |
+            github.rest.issues.addLabels({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              labels: ["user responded"]
+            })
+
+  pr_review_commented:
+    if: github.event.pull_request && github.event.comment.user.login == github.event.pull_request.user.login && (contains(github.event.pull_request.labels.*.name, 'wait for update') || contains(github.event.pull_request.labels.*.name, 'discuss')) && !contains(github.event.pull_request.labels.*.name, 'user responded')

Review Comment:
   I think it should be:
   ```suggestion
       if: github.event.pull_request && github.event.pull_request_review_comment.user.login == github.event.pull_request.user.login && (contains(github.event.pull_request.labels.*.name, 'wait for update') || contains(github.event.pull_request.labels.*.name, 'discuss')) && !contains(github.event.pull_request.labels.*.name, 'user responded')
   ```
   
   https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review_comment



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] shreemaan-abhishek commented on a diff in pull request #10152: ci: add label when user respond in the pr

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #10152:
URL: https://github.com/apache/apisix/pull/10152#discussion_r1315100466


##########
.github/workflows/update-labels.yml:
##########
@@ -28,3 +30,33 @@ jobs:
               repo: context.repo.repo,
               name: "wait for update"
             })
+
+  pr_commented:
+    if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss')) && !contains(github.event.issue.labels.*.name, 'user responded')
+    runs-on: ubuntu-latest
+    steps:
+      - name: update label when user responds
+        uses: actions/github-script@v6
+        with:
+          script: |
+            github.rest.issues.addLabels({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              labels: ["user responded"]
+            })
+
+  pr_review_commented:
+    if: github.event.pull_request && github.event.comment.user.login == github.event.pull_request.user.login && (contains(github.event.pull_request.labels.*.name, 'wait for update') || contains(github.event.pull_request.labels.*.name, 'discuss')) && !contains(github.event.pull_request.labels.*.name, 'user responded')

Review Comment:
   I hope you performed a manual test/demo in a dummy repository. It's a good idea to do so.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] shreemaan-abhishek commented on a diff in pull request #10152: ci: add label when user respond in the pr

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #10152:
URL: https://github.com/apache/apisix/pull/10152#discussion_r1318304013


##########
.github/workflows/update-labels.yml:
##########
@@ -28,3 +30,33 @@ jobs:
               repo: context.repo.repo,
               name: "wait for update"
             })
+
+  pr_commented:
+    if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss') || contains(github.event.issue.labels.*.name, 'need test cases')) && !contains(github.event.issue.labels.*.name, 'user responded')
+    runs-on: ubuntu-latest
+    steps:
+      - name: update label when user responds
+        uses: actions/github-script@v6
+        with:
+          script: |
+            github.rest.issues.addLabels({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              labels: ["user responded"]
+            })
+

Review Comment:
   @monkeyDluffy6017 `removeLabel` to remove "wait for update" label is missing. 😬 
   
   ref:
   https://github.com/monkeyDluffy6017/apisix/blob/d643de37c2701861fbcf4775d0dcc0d049954fb9/.github/workflows/update-labels.yml#L27-L32



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 closed pull request #10152: ci: add label when user respond in the pr

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 closed pull request #10152: ci: add label when user respond in the pr
URL: https://github.com/apache/apisix/pull/10152


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #10152: ci: add label when user respond in the pr

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #10152:
URL: https://github.com/apache/apisix/pull/10152#discussion_r1315098538


##########
.github/workflows/update-labels.yml:
##########
@@ -28,3 +30,33 @@ jobs:
               repo: context.repo.repo,
               name: "wait for update"
             })
+
+  pr_commented:
+    if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss')) && !contains(github.event.issue.labels.*.name, 'user responded')
+    runs-on: ubuntu-latest
+    steps:
+      - name: update label when user responds
+        uses: actions/github-script@v6
+        with:
+          script: |
+            github.rest.issues.addLabels({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              labels: ["user responded"]
+            })
+
+  pr_review_commented:
+    if: github.event.pull_request && github.event.comment.user.login == github.event.pull_request.user.login && (contains(github.event.pull_request.labels.*.name, 'wait for update') || contains(github.event.pull_request.labels.*.name, 'discuss')) && !contains(github.event.pull_request.labels.*.name, 'user responded')

Review Comment:
   The `github.event` stands for the event `pull_request_review_comment`, so we just need to get the property `comment` from `github.event`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] shreemaan-abhishek commented on a diff in pull request #10152: ci: add label when user respond in the pr

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #10152:
URL: https://github.com/apache/apisix/pull/10152#discussion_r1318304013


##########
.github/workflows/update-labels.yml:
##########
@@ -28,3 +30,33 @@ jobs:
               repo: context.repo.repo,
               name: "wait for update"
             })
+
+  pr_commented:
+    if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss') || contains(github.event.issue.labels.*.name, 'need test cases')) && !contains(github.event.issue.labels.*.name, 'user responded')
+    runs-on: ubuntu-latest
+    steps:
+      - name: update label when user responds
+        uses: actions/github-script@v6
+        with:
+          script: |
+            github.rest.issues.addLabels({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              labels: ["user responded"]
+            })
+

Review Comment:
   `removeLabel` to remove "wait for update" label is missing. 😬 
   
   ref:
   https://github.com/monkeyDluffy6017/apisix/blob/d643de37c2701861fbcf4775d0dcc0d049954fb9/.github/workflows/update-labels.yml#L27-L32



##########
.github/workflows/update-labels.yml:
##########
@@ -28,3 +30,33 @@ jobs:
               repo: context.repo.repo,
               name: "wait for update"
             })
+
+  pr_commented:
+    if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss') || contains(github.event.issue.labels.*.name, 'need test cases')) && !contains(github.event.issue.labels.*.name, 'user responded')
+    runs-on: ubuntu-latest
+    steps:
+      - name: update label when user responds
+        uses: actions/github-script@v6
+        with:
+          script: |
+            github.rest.issues.addLabels({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              labels: ["user responded"]
+            })
+

Review Comment:
   `removeLabel` to remove "wait for update" label is missing. 😬 
   
   ref:
   https://github.com/monkeyDluffy6017/apisix/blob/d643de37c2701861fbcf4775d0dcc0d049954fb9/.github/workflows/update-labels.yml#L27-L32



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on pull request #10152: ci: add label when user respond in the pr

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10152:
URL: https://github.com/apache/apisix/pull/10152#issuecomment-1705182962

   test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 merged pull request #10152: ci: add label when user respond in the pr

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 merged PR #10152:
URL: https://github.com/apache/apisix/pull/10152


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on pull request #10152: ci: add label when user respond in the pr

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10152:
URL: https://github.com/apache/apisix/pull/10152#issuecomment-1705184967

   test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #10152: ci: add label when user respond in the pr

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on code in PR #10152:
URL: https://github.com/apache/apisix/pull/10152#discussion_r1315102296


##########
.github/workflows/update-labels.yml:
##########
@@ -28,3 +30,33 @@ jobs:
               repo: context.repo.repo,
               name: "wait for update"
             })
+
+  pr_commented:
+    if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss')) && !contains(github.event.issue.labels.*.name, 'user responded')
+    runs-on: ubuntu-latest
+    steps:
+      - name: update label when user responds
+        uses: actions/github-script@v6
+        with:
+          script: |
+            github.rest.issues.addLabels({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              labels: ["user responded"]
+            })
+
+  pr_review_commented:
+    if: github.event.pull_request && github.event.comment.user.login == github.event.pull_request.user.login && (contains(github.event.pull_request.labels.*.name, 'wait for update') || contains(github.event.pull_request.labels.*.name, 'discuss')) && !contains(github.event.pull_request.labels.*.name, 'user responded')

Review Comment:
   Yeah, i metioned this in the description
   ```
   I tested in the pr: https://github.com/monkeyDluffy6017/apisix/pull/6
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org