Skip to content

Commit

Permalink
Try creating the label if one isnt found
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Jan 30, 2024
1 parent 555eb0b commit 59219ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ProfanityFilter.Action/ProfanityProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public async Task ProcessProfanityAsync()
"The profanity filter GitHub Action only works with issues or pull requests.")
};

var label = isIssueComment ? null : await client.GetLabelAsync();
var label = isIssueComment
? null
: await client.GetLabelAsync() ?? await client.CreateLabelAsync();
if (label is null && isIssueComment is false)
{
core.Warning("""
Expand Down

0 comments on commit 59219ed

Please sign in to comment.