Ability to create notice level annotations via logging

It is currently possible to create warning and error annotations in a build by logging the following syntax

::warning file=test.java,line=4::Message

https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message

Is it possible to create a notice level annotation the same way?

Nothing in the documentation

It is possible to create a notice level annotation via the API but that requires a github access token to be passed into the action and linking the current run via the API is not that straight forwards as it is dependent on what has triggered the run

Welcome to the community, we’re glad you’re here!

Outputting anything that isn’t in the workflow command format is the way that you emit a message that isn’t a debug message, warning, or error. So, in essence, if you’re using shell scripting:

echo "::debug::This is a debug message"
echo "This is a notice/info/normal message"
echo "::warning::This is a warning message"
echo "::error::This is an error message"

Does that help?

Unfortunately, it is currently not possible to create notice level annotations like this. See https://github.com/actions/toolkit/issues/186 for a related discussion.

1 Like

Problem is the debug messages will only show if you add the extra github action secret.
For a generic plugin that does not work.

I have a plugin that makes an annotation for a summary of you unit test run.
On a successful build is just a notice annotation.
Failed makes a warning annotation.

When a pull request is triggered from a external branch you can not use the API to create the annotations as the API check call returns empty arrays.

In this case there is no way to give the notice annotation.