-
-
Notifications
You must be signed in to change notification settings - Fork 26.1k
CI Add link to changelog instructions #31954
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
base: main
Are you sure you want to change the base?
CI Add link to changelog instructions #31954
Conversation
I have also noted that currently, the Maybe we could only have it run if the changelog label is unset by adding a condition We could also only run it on scikit-learn repo by adding a condition |
script: | | ||
github.rest.repos.createCommitStatus({ | ||
sha: context.payload.pull_request.head.sha, | ||
state: "error", |
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.
state: "error",
This state defines the icon that is shown before the status. It can be
- "error" to show a yellow triangle with exclamation mark
- "failure" to show a red circle with an x, like in failed jobs (like in the first screenshot on the PR description)
- "neutral" to show a grey empty circle
@@ -1,6 +1,7 @@ | |||
name: Check Changelog | |||
permissions: | |||
contents: read | |||
statuses: write |
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.
With the pull_request
trigger, I'm not sure if a PR from a fork would have enough permissions to write a status.
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.
Hey @thomasjpfan, sorry I am not sure if I understand your comment. I have tried this in my fork and verified it works before opening this PR.
Do you mean that PRs on a fork might not have permission to write statuses on the upstream repo? Is using pull_request_target
instead a solution?
What does this implement/fix? Explain your changes.
This PR adds a link to the changelog instructions into the CI output summary below the PR.
If the changelog is not provided, the CI summary should now look similar to this (but with a different icon in the beginning, see #31954 (comment) for the icon):
If the changelog is either provided or not needed, the additional commit status does not show at all:
Any other comments?
Adding the link directly to the CI status titled "Check Changelog / A reviewer will let you know if it is required or can be bypassed (pull_request)" would be ideal, but I think it is not possible without re-writing both the actions used in "uses" and that's pretty complicated.
I have tried this on my fork first and you can see a CI summary for a PR without changelog here and a CI summary for a PR with added changelog here (but they both have a wrong link and a few tiny things a different, too).
We had talked about that, @lesteve. Maybe you like to have a look?