Skip to content

Commit

Permalink
fix: @mention owner for module issues, if GH handle can't be found du…
Browse files Browse the repository at this point in the history
…e to GH bug (#1118)

When a module issue is raised, the workflow should automatically assign
the owner to it. Unfortunately due to a bug in GH, see
cli/cli#6235, the GH handle is sometimes not
found. As a workaround, the owner will then in this case be @mentioned
in a comment.
  • Loading branch information
rahalan authored Mar 2, 2024
1 parent e76ffd7 commit d79e7a7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ A member of the @azure/$($module.ModuleOwnersGHTeam) or @azure/$($module.ModuleC
}

if ([String]::IsNullOrEmpty($assign)) {
$reply = "This issue couldn't be assigend to $($module.PrimaryModuleOwnerGHHandle), because no such users exists."
if ($PSCmdlet.ShouldProcess("missing user comment to issue [$($issue.title)]", 'Add')) {
$reply = "This issue couldn't be assigend due to an internal error. @$($module.PrimaryModuleOwnerGHHandle), please make sure this issue is assigned to you and please provide an initial response within 5 business days."
gh issue comment $issue.url --body $reply --repo $Repo
}
}
Expand Down

0 comments on commit d79e7a7

Please sign in to comment.