-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update citations fails on pull request close trigger #191
Comments
Strangely though, pull request closes are running just fine on this repo itself: |
I think I have a similar problem.
The only difference is that I now have one more paper published that should be updated on the list. It is already in my ORCID.
So the events went like this.
|
Sorry forgot to add that I tried to make a small change to the repo and see how it worked on "push to main". And this is the whole error message:
|
https://github.com/NVL-Lab/NVL-Lab.github.io/actions
For this error, I believe you have a branch protection rule set, such that you can't push directly to main and need to make a PR. This is good, but conflicts with the ability to run automatic citations directly on main. We ran into this in this issue on greenelab.com too. Currently, GitHub doesn't provide a way to make an exception to a branch protection rule for a GitHub Actions run, so you either need to remove the protection rule, or only do pull requests. |
Have you enabled PRs in the GitHub Actions settings of your repo? ![]() |
That solved it! |
This issue, as originally described, doesn't seem to be happening anymore. This recent failure on PR close is actually due to a citation error in the But that raises the point that that workflow shouldn't really be running on PR close, it's a waste of time (even if only 30s). Reminder to look into skip calling update citations if the PR type is "closed". |
Nevermind, it still is happening in the greenelab.com instance of the template. Definitely want to skip every step/job/workflow possible on PR close (I think the only one that needs to stay is whatever is running the pr-prevew action, so it can remove the pr-preview files from the gh-pages branch). Another bad thing about this is that, while it shouldn't really affect anything on your site (I'm pretty sure), it does make debugging harder because it overwrites the last ✅ with an ❌ in the github ui: This originally passed, but when the pr got merged and the workflow ran again on close, it failed and updated that to a failure. The successful run is still there in the logs, it's just that that commit status icon doesn't take you to the right one. It also makes it looks like all of your prs have failed, when they may not have, which makes it harder to spot real errors. As such, removing the enhancement label. This will be important to fix quickly. Also, because the closing is failing, the pr-preview action isn't able to clean up closed prs: https://github.com/greenelab/greenelab.com/tree/gh-pages/preview |
#190
The process '/usr/bin/git' failed with exit code 1
The
update-citations
workflow runs on pull request activity, including the "close" event. That is so thebuild-preview
workflow can delete the PR preview folder on thegh-pages
branch when the PR is closed.I believe the error being reported is because the git ref (needed for
update-citations
) no longer exists when the pull request is closed.In reality, when it's a pull request and it's being closed,
update-citations
should not run, onlybuild-preview
should. Need to add checks for this.The text was updated successfully, but these errors were encountered: