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

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

commit e30b5d435439e99fde1908beeb6507fcbe84d270
Author: Danny McCormick <[email protected]>
AuthorDate: Thu Oct 31 15:29:20 2024 -0400

    Swallow errors removing awaiting triage label
---
 .github/workflows/self-assign.yml | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/self-assign.yml 
b/.github/workflows/self-assign.yml
index 084581db734..6c2f2219b4e 100644
--- a/.github/workflows/self-assign.yml
+++ b/.github/workflows/self-assign.yml
@@ -40,12 +40,16 @@ jobs:
                 repo: context.repo.repo,
                 assignees: [context.payload.comment.user.login]
               });
-              github.rest.issues.removeLabel({
-                issue_number: context.issue.number,
-                owner: context.repo.owner,
-                repo: context.repo.repo,
-                name: 'awaiting triage'
-              });
+              try {
+                github.rest.issues.removeLabel({
+                  issue_number: context.issue.number,
+                  owner: context.repo.owner,
+                  repo: context.repo.repo,
+                  name: 'awaiting triage'
+                });
+              } catch (error) {
+                console.log(`Failed to remove awaiting triage label. It may 
not exist on this issue. Error ${error}`);
+              }
             } else if (bodyString == '.close-issue') {
               console.log('Closing issue');
               if (i + 1 < body.length && body[i+1].toLowerCase() == 
'not_planned') {

Reply via email to