Skip to content

Commit

Permalink
HPCC-31397 Jirabot Cloud Jira Updates
Browse files Browse the repository at this point in the history
- Fixed issue with null assignee on issue

Signed-off-by: James McMullan [email protected]
  • Loading branch information
jpmcmu committed Mar 27, 2024
1 parent 6431a34 commit b4bb3a2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/jirabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4bb3a2

Please sign in to comment.