From b4bb3a296b6ee244b87350ab32c3ab359925e547 Mon Sep 17 00:00:00 2001 From: James McMullan Date: Wed, 27 Mar 2024 12:35:40 -0400 Subject: [PATCH] HPCC-31397 Jirabot Cloud Jira Updates - Fixed issue with null assignee on issue Signed-off-by: James McMullan James.McMullan@lexisnexis.com --- .github/workflows/jirabot.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jirabot.yml b/.github/workflows/jirabot.yml index aa3b2bd8361..45c92b236b9 100644 --- a/.github/workflows/jirabot.yml +++ b/.github/workflows/jirabot.yml @@ -82,14 +82,18 @@ jobs: if prAuthor: assignee = issueFields['assignee'] - assigneeId = assignee['accountId'] - assigneeEmail = assignee["emailAddress"] + if assignee is None: + assigneeId = '' + assigneeEmail = '' + else: + assigneeId = assignee['accountId'] + assigneeEmail = assignee["emailAddress"] prAuthorId = prAuthor["accountId"] prAuthorEmail = prAuthor["emailAddress"] if assigneeId is None or assigneeId == '': jira.assign_issue(issueName, prAuthorId) - result += 'Assigning user: ' + prAuthor + '\n' + result += 'Assigning user: ' + prAuthorEmail + '\n' elif assigneeId != prAuthorId: result += 'Changing assignee from: ' + assigneeEmail + ' to: ' + prAuthorEmail + '\n' jira.assign_issue(issueName, prAuthorId)