latest-changes
latest-changes copied to clipboard
Merging two PRs very close together causes notes to be missed
I merged two PRs this morning within seconds of each other and only one got added to the release notes list:

The second action did run, but failed because it was out of sync with the remote when it tried to push:
INFO:root:Committing changes to: README.md
INFO:root:Pushing changes: README.md
To https://github.com/CrowdJustice/crowdjustice
! [rejected] develop -> develop (fetch first)
error: failed to push some refs to 'https://github.com/CrowdJustice/crowdjustice'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/latest_changes/__main__.py", line 88, in <module>
subprocess.run(["git", "push"], check=True)
File "/usr/local/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'push']' returned non-zero exit status 1.
Already up to date.
[develop 364351ceb] 📝 Update release notes
1 file changed, 1 insertion(+)
It worked on a re-run so maybe the action could just do that automatically?
Thanks! I just implemented it, so now it retries 10 times. :rocket: