Skip to content

GIT_PREVIOUS_SUCCESSFUL_COMMIT may fail if git push was forced #18

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

Closed
vykozlov opened this issue Nov 18, 2024 · 0 comments · Fixed by #19 · May be fixed by #15
Closed

GIT_PREVIOUS_SUCCESSFUL_COMMIT may fail if git push was forced #18

vykozlov opened this issue Nov 18, 2024 · 0 comments · Fixed by #19 · May be fixed by #15
Labels
bug Something isn't working

Comments

@vykozlov
Copy link
Contributor

Problem:
the fix which closed #16 , uses GIT_PREVIOUS_SUCCESSFUL_COMMIT but this check may fail if a user used git push --force and rewrote some commits

Possible solution:
instead "if () {} else {}" use "try {} catch {}" construction

@vykozlov vykozlov added the bug Something isn't working label Nov 18, 2024
vykozlov added a commit that referenced this issue Nov 18, 2024
* fix: if GIT_PREVIOUS_SUCCESSFUL_COMMIT fails due to e.g. rewritten commits (e.g. git push --force)

fixes #18

modified:   Jenkinsfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant