Skip to content

Allow setting default severity to "notice"#1213

Merged
TingluoHuang merged 1 commit intoactions:mainfrom
CyberShadow:pull-20210720-175914
Sep 1, 2021
Merged

Allow setting default severity to "notice"#1213
TingluoHuang merged 1 commit intoactions:mainfrom
CyberShadow:pull-20210720-175914

Conversation

@CyberShadow
Copy link
Contributor

Pull request #203 added a way to specify the default severity for a matcher. This allows us to define multiple matchers per severity, each matching only that specific severity.

However, currently the only allowed values for the default severity setting are "ERROR", "WARNING" and the empty string:

case "":
case "ERROR":
case "WARNING":
break;
default:
throw new ArgumentException($"Matcher '{_owner}' contains unexpected default severity '{_severity}'");

The empty string is interpreted in the same way as "ERROR":

if (string.IsNullOrEmpty(match.Severity) || string.Equals(match.Severity, "error", StringComparison.OrdinalIgnoreCase))
{
issueType = DTWebApi.IssueType.Error;
}

As such, there is no way to add a matcher with the default severity of "notice".

This pull request addresses this by adding "notice" as one of the allowed options for the default matcher severity.

@CyberShadow CyberShadow requested a review from a team as a code owner July 20, 2021 18:14
Copy link
Contributor

@luketomlinson luketomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @CyberShadow! It looks good to me. Notice annotations aren't fully supported yet, but will be soon. We will hold off merging this one until it's rolled out.

@TingluoHuang TingluoHuang merged commit c5ce526 into actions:main Sep 1, 2021
TingluoHuang added a commit that referenced this pull request Sep 1, 2021
* Temporary fix for macOS runner upgrade crash loop. (#1304)

* Typo fixed (#1289)

* Update error to say 'uninstall' not 'unconfigure' (#1179)

* Update error to say 'uninstall' not 'unconfigure'

* Say uninstall service in *nix config error msgs

Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>

* Allow setting default severity to "notice" (#1213)

* Show More Step Information in composite Actions (#1279)

* Prepare 2.281.1 runner release. (#1305)

Co-authored-by: Daniel Asztalos <asztalosdani@users.noreply.github.com>
Co-authored-by: Nick Fields <50085412+nick-invision@users.noreply.github.com>
Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
Co-authored-by: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants