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

feat: Make cz bump work on shallow clones #649

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 2, 2023

  1. feat: Make cz bump work on shallow clones

    This allows reliably setting up your CI to only fetch the latest changes.
    E.g. Gitlab CI uses shallow clones with a depth of 20 by default:
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77576
    
    Only `tag_exists()` had to be modified for this. `cz changelog` is not
    ready yet, more functions would have to include a `git fetch` for that.
    
    I was worried about slowing down error reporting in non-CI workflows ("git
    fetch" calls can sometimes take a while if your connection is bad). To
    minimize the risk for this, now only fetching the tag for shallow
    clones and always printing a warning when this happens.
    
    I was hit by this issue while trying out Commitizen in Gitlab CI on a
    monorepo, where some packages haven't seen a release for >50 commits.
    Robert Schweizer committed Jan 2, 2023
    Configuration menu
    Copy the full SHA
    416f68c View commit details
    Browse the repository at this point in the history