-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CI: check the presence of the changelog line in every pull request #13976
Conversation
f631eb1
to
7666376
Compare
r? @flip1995 |
7666376
to
3c6b1ce
Compare
Oh, I remember why I added this check to the bors run and not the PR now: You can't trigger a workflow on "PR description changed". So if the So it shouldn't be a per-requisite for other checks. But even then, a PR might have a failing check and can still be merged, which is a bit weird. Also a note for future adventurers: The merge queue check must still exist, otherwise it could lead to accidental merges of PRs without a changelog, if the changelog is removed after the check was done. |
I just noticed, that you might be able to use the |
I'll do that, looks like the solution is indeed trigerring on the PR |
5e99beb
to
1a4376b
Compare
@flip1995 It seems to be working fine (I did several edition of the PR body to test it). Once it is merged, "Clippy changelog check / conclusion_changelog (pull_request) " must be made a requested check for putting a PR into the queue. |
Also, |
@flip1995 Edit: I (programmatically) checked every open pull request, and only two of them had no "changelog" line, and both were authored by me… So right now every open pull request has a changelog line, and will be rechecked if this changes, so no need to keep the check in |
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.
Awesome, thanks for addressing this so quickly and the rigorous checking, that it works!
must be made a requested check for putting a PR into the queue
I'll take care of this 👍
@@ -0,0 +1,56 @@ | |||
name: Clippy changelog check | |||
|
|||
on: |
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.
Let's also run this on
on: | |
on: | |
merge_group: |
It is a really cheap check. Just to be safe and because I don't know, if you can set a check as "Required" for enqueuing, but not in the merge queue.
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.
Ok. I will have to see if the PR number is available in this case, it should be.
(and I have to remove one unrelated change that went in in another file)
1a4376b
to
63c341e
Compare
63c341e
to
acb5646
Compare
I have renamed the file to |
@flip1995 Since technically a merge group might aggregate several pull requests, I am not sure we can check the individual PR there, including their body. Would adding the |
Or I can make the test be successful if we are in a |
acb5646
to
1d953f3
Compare
@flip1995 I have the What is great is that even if something doesn't work well, this PR will not pass the merge step, so we can amend it if needed, we don't take a large risk. My only remaining question is if the |
I think the current version is the way we want to go. Can you try to skip the test in this PR, to make sure that |
I don't think this will be an issues, as the step that requests the PR number will be skipped in the queue. |
Sure. I'll also try to get a non-existent field from the event in the environment to check how it behaves. |
1d953f3
to
162b32d
Compare
Checking it only in the merge queue leads to deferred failures once the decision to merge has been taken already.
162b32d
to
7639e82
Compare
Ok, that went well with a non-step-triggering test, the conclusion was a success. |
Checking it only in the merge queue leads to deferred failures once the decision to merge has been taken already.
changelog: none