-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat(utils): add git helper #469
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but requiring a clean repository state in order to run integration tests is a hard no from a DX perspective 🙅♂️ Either make the tests the tests more robust, or don't test it.
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure which methods are needed for the history command. A brief intro in the PR description explaining the goal would be helpful. 🙏
Currently, I can only check the tests, not if the list of methods is sufficient.
Test feedback below.
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1a4206d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targetsSent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! 🧪
Added one comment but can be done in a separate PR.
This PR includes utility functions related to git logic use in the future history command.
Methods included:
getCurrentBranchOrTag
- The history command needs to end in the same branch where it started. This method is called before we start walking the repo history to save the "initial" branchstatusIsClean
- To safely check out a branch the status needs to be cleanguardAgainstLocalChanges
- the command should throw if the git status is not cleansafeCheckout
- as there might be some files generated while walking the history we need to do the following:partially resolves #216