NASA-PDS / roundup-action

Do a "roundup", a/k/a PDS-style continuous integration and delivery
Apache License 2.0
1 stars 4 forks source link

Remove --force from commit #89

Closed jordanpadams closed 1 year ago

jordanpadams commented 1 year ago

This may have been put there for a reason, but it causes funky merge conflicts in branches from main, plus, if someone sneaks in a commit on main before the merge, I would like this release tagging to fail and someone to look at it

Resolves #76

nutjob4life commented 1 year ago

In fact, it might make sense to essentially do

try:
    invokeGIT(['push', 'origin', 'HEAD:main'])
except InvokedProcessError:
    invokeGIT(['push', 'origin', 'HEAD:main', '--force'])

in the case that the "you are not currently on a branch" reappears—and perhaps deal with the funk later. I don't know 🤷‍♀️

jordanpadams commented 1 year ago

In fact, it might make sense to essentially do

try:
    invokeGIT(['push', 'origin', 'HEAD:main'])
except InvokedProcessError:
    invokeGIT(['push', 'origin', 'HEAD:main', '--force'])

in the case that the "you are not currently on a branch" reappears—and perhaps deal with the funk later. I don't know 🤷‍♀️

@nutjob4life hmm. My thought here was I would almost rather not mistaken overwrite the main branch without knowing it. If someone wants to do something like this, they can manually go through the release process? thoughts?

nutjob4life commented 1 year ago

@nutjob4life hmm. My thought here was I would almost rather not mistaken overwrite the main branch without knowing it. If someone wants to do something like this, they can manually go through the release process? thoughts?

Yeah I guess @jordanpadams.

I'm still baffled why we would randomly get "you are not currently on a branch" and even more bamboozled as to why --force fixes it.

But better safe than sorry, I suppose! I'm going to add a comment though so that the TODO comment will make sense with --force suddenly gone.

jordanpadams commented 1 year ago

@nutjob4life sounds good 🚀