insights: add check for issue to be a code insights issue before adding to the project (#33324)

Co-authored-by: Felix Becker <felix.b@outlook.com>
This commit is contained in:
coury-clark 2022-04-01 19:59:33 -07:00 committed by GitHub
parent 0ad910230f
commit 4aececdfe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,11 @@ switch ($github.event_name) {
Send-SlackMessage -Uri $SlackWebhookUri
} else {
if ($github.event.issue.labels | Where-Object { $_.name -eq $TeamLabel }) {
Write-Information "Closed / re-opened issue labeled without team label $TeamLabel, exiting."
return
}
# If issue was closed or reopened, update Status column
$status = if ($github.event.action -eq 'closed') { 'Done' } else { 'In Progress' }