Fix contributor workflow#2226
Conversation
| run: | | ||
| git pull | ||
| git checkout contributors-update | ||
| echo "::set-output name=head_sha::$(git rev-parse contributors-update)" |
There was a problem hiding this comment.
The relevant commit should have been committed locally to be pushed to the remote contributors-update branch. I believe git rev-parse @ would work just as well here, without needing to pull.
I was writing a response to you with that suggested fix, but forgot to send it prior to working on a PR that implemented it.
There was a problem hiding this comment.
I tried that before. Without git pull, git checkout contributors-update fails.
Not removing git pull , git rev-parse @ also works.
There was a problem hiding this comment.
Not removing
git pull
Doesn't the PyGithub API used by the add-contributors action not commit locally to push to the remote branch? It seems odd that a git pull would be required if the commit pushed is the same commit SHA locally and remote?
Something else perhaps is going on that I missed/misunderstood?
There was a problem hiding this comment.
I cannot help you with that. I don't know how add-contributors action works in detail (not very familiar with python).
|
I don't mind this PR being merged, but we may want to consider the one I submitted roughly at the same time, although it's got more going on.. |
Description
This should finally fix the contributors workflow. I've tested it successfully in a test repo.
Fixes #2224
Type of change
Checklist:
docs/)