Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(pre-commit-hooks)!: allow empty ranges in 'commitizen-branch' #1209

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

Merged
Lee-W merged 3 commits into commitizen-tools:v4 from AdrianDC:hooks-branch-empty-range
Nov 10, 2024

Conversation

@AdrianDC
Copy link
Contributor

@AdrianDC AdrianDC commented Aug 15, 2024

Description

fix(pre-commit-hooks)!: move 'check' to 'args' for global options

Details: 'args: [...]' is not able to access '-nr NO_RAISE' global
arguments for example from a arguments configuration

fix(pre-commit-hooks)!: allow empty ranges in 'commitizen-branch'

Details: Pushing the same history from 'develop' to 'staging' for
example fails because range 'origin/HEAD..HEAD' is empty

No commit found with range: 'origin/HEAD..HEAD'

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

Error No commit found with range: 'origin/HEAD..HEAD' not raised

Steps to Test This Pull Request

Push same history to develop then staging

Copy link

codecov bot commented Aug 15, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (v4@737c24c). Learn more about missing BASE report.

Additional details and impacted files
@@ Coverage Diff @@
## v4 #1209 +/- ##
=====================================
 Coverage ? 97.57% 
=====================================
 Files ? 55 
 Lines ? 2516 
 Branches ? 0 
=====================================
 Hits ? 2455 
 Misses ? 61 
 Partials ? 0 
Flag Coverage Δ
unittests 97.57% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@woile woile left a comment

Choose a reason for hiding this comment

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

@Lee-W thoughts on this? LGTM

Copy link
Member

Lee-W commented Aug 16, 2024

Looks good to me. but we probably won't want to bump a major version for it. so I would suggest we remove the ! in all the commits

Copy link
Contributor Author

Thanks for the feedback.

IMO this should be a ! change, as any user having args: [] as I used to will have local and CI breakages.

Could go along other fixes such as #1206 and #1207

Example local usage until released: https://gitlab.com/RadianDevCore/tools/gcil/-/blob/53e6cb534ff77704ac9b9dc51d755b9965556910/.pre-commit-config.yaml#L54

Copy link
Member

Lee-W commented Aug 16, 2024

If that's the case, we'll need to wait for our next release. @woile we probably can create a v4 branch already?

woile reacted with thumbs up emoji

@Lee-W Lee-W added the v4 label Aug 17, 2024
@Lee-W Lee-W mentioned this pull request Aug 17, 2024
3 tasks
@Lee-W Lee-W changed the base branch from master to v4 August 22, 2024 02:33
dependabot bot and others added 3 commits August 23, 2024 10:18
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.6.1...0.6.2)
---
updated-dependencies:
- dependency-name: ruff
 dependency-type: direct:development
 update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Details: 'args: [...]' is not able to access '-nr NO_RAISE' global
 arguments for example from a arguments configuration
---
Signed-off-by: Adrian DC <radian.dc@gmail.com>
Details: Pushing the same history from 'develop' to 'staging' for
 example fails because range 'origin/HEAD..HEAD' is empty
> No commit found with range: 'origin/HEAD..HEAD'
---
Signed-off-by: Adrian DC <radian.dc@gmail.com>
@AdrianDC AdrianDC force-pushed the hooks-branch-empty-range branch from 5885a04 to 5e4cbd6 Compare August 25, 2024 00:52
Copy link
Member

Lee-W commented Nov 10, 2024

Just change the base to v4. and let's merge it 🚀

@Lee-W Lee-W merged commit 39cdcfa into commitizen-tools:v4 Nov 10, 2024
@AdrianDC AdrianDC deleted the hooks-branch-empty-range branch November 16, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@woile woile woile left review comments

@Lee-W Lee-W Lee-W approved these changes

@noirbizarre noirbizarre Awaiting requested review from noirbizarre

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /