-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Check Runs API to report on status checks (success and failures) #1129
Conversation
Prototype of generating checks This has a prototype to create the proper JSON format for the status check. Remaining task: Consume the output and POST the results.
POST the check results back to GitHub
7d26735
to
b9ed8e3
Compare
This way, the only annotations that are displayed actually matter for the tool being run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added notes for reviewers.
ping @jskeet for review. Once this one is merged, I'll make similar changes to the other tools. |
Will have a look on Monday - busy as a dad taxi today I'm afraid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to check on whether warnings should count as errors, but other than that looks okay. I can't say I've reviewed hugely thoroughly.
Warnings shouldn't be treated as errors.
I did update to succeed with warnings. We'll see if we want to replace that. |
Contributes to #1125 |
Replaces #1128 (because
checks: write
permissions is honored when the permission is added on a fork - details below)This updates the TOC / Anchor update tool to create a Status Check payload and upload that as part of the workflow. A new library classes captures all warnings, errors, and information messages and adds them to an "annotations" collection. When the workflow completes, the annotations and status are sent to GitHub as a status check. That enables the errors and warnings from this tool to be displayed inline in the files tab on the PR.
My tests using #1128 failed because this PR adds the
checks:write
permission to this workflow. As a security precaution, when a PR from a fork adds write permissions to any workflow, those permissions are disabled in the PR. That prevents a malicious user from elevating their permissions.