ci/ci_commit_formatting_run: Problem with checking older MR branch. #12658
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've noticed on a couple of MR's lately that the CI commit message check is failing, even when the MR commit looks fine.
One example of this is https://github.com/micropython/micropython/actions/runs/6059530353/job/16442749613?pr=12126

This an MR with 4 commits, however the CI check is looking at a long list of different commits:
I made this dummy MR branched from the same point as #12126 to test / examine the issue, though in testing locally I'm pretty sure I've found the problem. Assuming this initial push fails the same way, I'll push a follow up commit to check the solution.
This MR, like many other active MR's, is branched from an old enough point in master that when
ci_commit_formatting_run
runsgit fetch --depth=100 upstream master
it doesn't actually grab enough commits from upstream to find the common ancestor between the MR branch and master.It ends up checking only master... which includes some older commits that did not pass the check.