Skip to content

feat: add check against default branch #1519

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

Open
wants to merge 1 commit into
base: v4-9-0-test
Choose a base branch
from

Conversation

bearomorphism
Copy link
Contributor

@bearomorphism bearomorphism commented Jun 9, 2025

Description

Related PR: #1400
Wait for #1472 and #1457

Related issue: #1498

  • Added cz check --default-range.

Some TODOs

  • Add tests
  • Documentation

Checklist

@Lee-W Lee-W added this to the 4.9.0 milestone Jun 9, 2025
@bearomorphism bearomorphism marked this pull request as draft June 9, 2025 15:49
@bearomorphism bearomorphism force-pushed the feat-check-from-default branch from 93f3c0b to 9627306 Compare June 10, 2025 05:35
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v4-9-0-test@445f013). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             v4-9-0-test    #1519   +/-   ##
==============================================
  Coverage               ?   98.28%           
==============================================
  Files                  ?       58           
  Lines                  ?     2680           
  Branches               ?        0           
==============================================
  Hits                   ?     2634           
  Misses                 ?       46           
  Partials               ?        0           
Flag Coverage Δ
unittests 98.28% <100.00%> (?)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bearomorphism bearomorphism force-pushed the feat-check-from-default branch 6 times, most recently from 8ec2c66 to 3c7623f Compare June 10, 2025 05:50
@bearomorphism bearomorphism marked this pull request as ready for review June 10, 2025 05:51
@bearomorphism bearomorphism changed the base branch from master to v4-9-0-test June 10, 2025 06:06
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

other than the naming issue, everything looks great. a wonderful feature we should have long ago

Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

one nitpick. but overall looks great!

@@ -480,3 +480,22 @@ def test_create_commit_cmd_string(mocker, os_name, committer_date, expected_cmd)
mocker.patch("os.name", os_name)
result = git._create_commit_cmd_string("", committer_date, "temp.txt")
assert result == expected_cmd


def test_get_default_branch(mocker: MockFixture):
Copy link
Member

Choose a reason for hiding this comment

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

This should be separate as 2 test cases instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants