Create a separate "Flutter Presubmits" checkrun for the unified checkrun flow.#5022
Conversation
…run flow. This allows us to add "Flutter Presubmits" to the required checks for release candidate branches as well, and have a less confusing name (since release candidate branches don't use the merge queue). Merge Queue Guard is still created but immediately completed when unified checkruns are created, because this is a required check. Similarly, "Flutter Presubmits" is always created, and if the unified checkruns are disabled, we immediately complete it as well. This allows us to make this a required check for the `master` branch and the release candidate branches as well.
| @@ -837,8 +848,43 @@ $s | |||
| title: Config.kMergeQueueLockName, | |||
| summary: kMergeQueueLockDescription, | |||
| ), | |||
| detailsUrl: detailsUrl, | |||
| detailsUrl: isUnifiedCheckRun ? null : detailsUrl, | |||
| ); | |||
|
|
|||
| final flutterPresubmits = await _githubChecksService.githubChecksUtil | |||
| .createCheckRun( | |||
| _config, | |||
| slug, | |||
| headSha, | |||
| Config.kFlutterPresubmitsName, | |||
| output: const CheckRunOutput( | |||
| title: Config.kFlutterPresubmitsName, | |||
| summary: kFlutterPresubmitsDescription, | |||
| ), | |||
| detailsUrl: isUnifiedCheckRun ? detailsUrl : null, | |||
| ); | |||
There was a problem hiding this comment.
Do we need to create both? Is the idea that we'll have "MQG" and "PSG"?
There was a problem hiding this comment.
The reason we need to create both is that both will be required checks for the master branch.
| slug, | ||
| mqGuard, | ||
| status: CheckRunStatus.completed, | ||
| conclusion: CheckRunConclusion.success, |
There was a problem hiding this comment.
Prefer using neutral or skipped?
There was a problem hiding this comment.
I'm not sure how the required checks are configured. Will they still allow the PR to merge if the status is neutral or skipped?
There was a problem hiding this comment.
It seems like the answer is "sometimes": https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
Whether the check blocks when it is skipped depends on where it comes from, but it actually doesn't say anything about when its status is set programatically through the GH API. I think I'm just going to leave these as is, so that we don't break anything for anyone.
| slug, | ||
| flutterPresubmits, | ||
| status: CheckRunStatus.completed, | ||
| conclusion: CheckRunConclusion.success, |
jtmcdole
left a comment
There was a problem hiding this comment.
Left some comments - mostly nits.
This allows us to add "Flutter Presubmits" to the required checks for release candidate branches as well, and have a less confusing name (since release candidate branches don't use the merge queue).
Merge Queue Guard is still created but immediately completed when unified checkruns are created, because this is a required check.
Similarly, "Flutter Presubmits" is always created, and if the unified checkruns are disabled, we immediately complete it as well. This allows us to make this a required check for the
masterbranch and the release candidate branches as well.