You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tv...@apache.org on 2024/02/05 21:58:32 UTC

(beam) branch master updated: Handle a user whose account was deleted. (#30192)

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

tvalentyn 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 d5aa44c9ba9 Handle a user whose account was deleted. (#30192)
d5aa44c9ba9 is described below

commit d5aa44c9ba9eb910774d789dd4182a5d25d8f552
Author: tvalentyn <tv...@users.noreply.github.com>
AuthorDate: Mon Feb 5 13:58:26 2024 -0800

    Handle a user whose account was deleted. (#30192)
    
    * Handle a user whose account was deleted.
    
    * Regroup items on the dashboard.
---
 .test-infra/metrics/sync/github/sync_workflows.py | 12 ++++++------
 scripts/ci/pr-bot/updateReviewers.ts              |  1 +
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/.test-infra/metrics/sync/github/sync_workflows.py b/.test-infra/metrics/sync/github/sync_workflows.py
index a2c062b175e..d2400dab408 100644
--- a/.test-infra/metrics/sync/github/sync_workflows.py
+++ b/.test-infra/metrics/sync/github/sync_workflows.py
@@ -328,7 +328,6 @@ CORE_INFRA_TESTS = [
   'Beam Metrics Report',
   'Build and Version Runner Docker Image',
   'PreCommit GHA',
-  'pr-bot-prs-needing-attention',
   'PreCommit RAT',
   'Assign or close an issue',
   'PostCommit Website Test',
@@ -339,8 +338,10 @@ CORE_INFRA_TESTS = [
   'PreCommit Whitespace',
   'Publish Beam SDK Snapshots',
   'Cancel Stale Dataflow Jobs',
+  'pr-bot-new-prs',
   'pr-bot-pr-updates',
-  'pr-bot-new-prs'
+  'pr-bot-prs-needing-attention',
+  'pr-bot-update-reviewers'
 ]
 
 MISC_TESTS = [
@@ -355,7 +356,6 @@ MISC_TESTS = [
   'Cancel',
   'PostCommit PortableJar Spark',
   'PreCommit Integration and Load Test Framework',
-  'pr-bot-update-reviewers',
   'PostCommit TransformService Direct',
   'Cut Release Branch',
   'Generate issue report',
@@ -404,7 +404,7 @@ def get_dashboard_category(workflow_name):
     return 'go'
   if workflow_name in MISC_TESTS:
     return 'misc'
-  
+
   print(f'No category found for workflow: {workflow_name}')
   print('Falling back to rules based assignment')
 
@@ -471,7 +471,7 @@ def get_token():
   git_integration = GithubIntegration(GH_APP_ID, GH_PEM_KEY)
   token = git_integration.get_access_token(GH_APP_INSTALLATION_ID).token
   return f'Bearer {token}'
-  
+
 @backoff.on_exception(backoff.constant, aiohttp.ClientResponseError, max_tries=5)
 async def fetch(url, semaphore, params=None, headers=None, request_id=None):
   async with semaphore:
@@ -574,7 +574,7 @@ async def fetch_workflow_data():
       else:
         workflow_ids_to_fetch_extra_runs.pop(workflow_id, None)
       print(f"Successfully fetched details for: {workflow.filename}")
-  
+
   page = math.ceil(
     int(GH_NUMBER_OF_WORKFLOW_RUNS_TO_FETCH) / number_of_entries_per_page
   ) + 1
diff --git a/scripts/ci/pr-bot/updateReviewers.ts b/scripts/ci/pr-bot/updateReviewers.ts
index c49f8feba24..96eaa6e22f6 100644
--- a/scripts/ci/pr-bot/updateReviewers.ts
+++ b/scripts/ci/pr-bot/updateReviewers.ts
@@ -104,6 +104,7 @@ async function getReviewersForPull(pull: any): Promise<string[]> {
 
   for (const comment of comments) {
     if (
+      comment.user &&
       comment.user.login &&
       comment.user.login !== pull.user.login &&
       comment.user.login !== BOT_NAME