Open planetmarshall opened 2 months ago
Thanks for pointing this out @planetmarshall
I agree it would be good to at least add some note in the docs.
But I'd like to ask first, just in case. At the moment, the scm
approach is doing internally:
commit = self.run(f'rev-list HEAD -n 1 --full-history {path}')
And this is the command that is failing in case of that PR checkout. Is there any other way to get a "permanent" commit reference that could be used? Or is that PR checkout by default kind of a headless checkout and it is not possible to obtain a commit
Hi @planetmarshall
Any further feedback here? What do you think would be the best approach, just a note in the docs?
Moving this to the docs repo.
Describe the bug
Not strictly a conan bug, more of an oversight in the documentation but since the Documentation on SCM capture explicitly uses a github workflow as illustration, it's probably worth reporting.
Expected Result
A conanfile using the SCM capture feature should build during a workflow triggered by a Github PR event
Actual Result
Conanfile build fails with
See Logs for failing action.
Workaround
Explicitly specify the pull request head ref when checking out the code
How to reproduce it
Clone the repository at https://github.com/planetmarshall/conan-scm-capture.git and create a pull request for the
setup-ci
branch