Skip to content
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

refactor: throw error if issue with git #16618

Merged
merged 14 commits into from Jul 18, 2022

Conversation

RahulGautamSingh
Copy link
Collaborator

Changes

  • add if-block which throws error if error detected

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@RahulGautamSingh RahulGautamSingh changed the title throw error refactor: throw error if issue with git Jul 16, 2022
@RahulGautamSingh
Copy link
Collaborator Author

RahulGautamSingh commented Jul 16, 2022

@rarkins Should we throw error for all instances where we execute git commands these changes suffice?

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to wrap in a catch then you need to throw again after

@rarkins
Copy link
Collaborator

rarkins commented Jul 17, 2022

Instead of so much error handling I think let's just add a git status command after clone and hope that it is enough to trigger the error early.

@RahulGautamSingh
Copy link
Collaborator Author

RahulGautamSingh commented Jul 17, 2022

Instead of so much error handling I think let's just add a git status command after clone and hope that it is enough to trigger the error early.

🤞
We should keep the check on isBranchModified incase execution fails to stop during cloning. For any branch that exists & has cache that's the first call which clones the branch.

@rarkins rarkins enabled auto-merge (squash) July 18, 2022 06:12
@rarkins rarkins merged commit 54cff9a into renovatebot:main Jul 18, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.119.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error checking last author for isBranchModified
3 participants