Closed fkorotkov closed 2 years ago
I've manually checked that for https://github.com/flutter/flutter this works and head
is still not working which leads to an incident:
git fetch origin pull/112191/head:test
fatal: couldn't find remote ref pull/112191/head
❯ git fetch origin pull/112191/merge:test
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 32 (delta 13), reused 13 (delta 5), pack-reused 0
Unpacking objects: 100% (32/32), 43.51 KiB | 1.89 MiB/s, done.
From github.com:flutter/flutter
* [new ref] refs/pull/112191/merge -> test
I also tested it on this PR https://github.com/cirruslabs/http-cache-action/actions/runs/3107625033/jobs/5035941706#step:3:101
On the other hand it confuses users of GitHub actions sometimes https://github.com/actions/checkout/issues/504 but I guess it's better then the situation like right now when the cloning is not working. I guess if the merge
commit had the same issue GitHub people would've notice it quicker.
GH's
checkout
action seems to use this reference for clones.See https://stackoverflow.com/questions/63594658/git-refs-merge-vs-head-in-pull-request