- Notifications
You must be signed in to change notification settings - Fork262
feat(cmd-version): add automatic repository un-shallowing to version workflow#1366
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat(cmd-version): add automatic repository un-shallowing to version workflow#1366
Uh oh!
There was an error while loading.Please reload this page.
Conversation
de3525b to06c6906CompareThere 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.
Pull Request Overview
This PR adds automatic shallow clone detection and unshallowing functionality to Python Semantic Release. The changes eliminate the need for users to manually specifyfetch-depth: 0 in GitHub Actions workflows, as PSR now automatically converts shallow clones to full clones when needed for proper commit history analysis.
Key changes:
- Added
is_shallow_clone()andgit_unshallow()methods to theGitProjectclass - Integrated shallow clone detection into the version command workflow
- Updated documentation to reflect that
fetch-depth: 0is no longer required
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/semantic_release/gitproject.py | Adds new methods for detecting and converting shallow clones to full clones |
| src/semantic_release/cli/commands/version.py | Integrates shallow clone detection early in the version command workflow |
| tests/unit/semantic_release/test_gitproject.py | Adds comprehensive unit tests for the new shallow clone functionality with improved test fixtures |
| tests/e2e/cmd_version/test_version_shallow.py | Adds end-to-end tests for version command with shallow repositories |
| docs/configuration/automatic-releases/github-actions.rst | Updates documentation to reflect that fetch-depth is no longer required |
| docs/configuration/configuration-guides/uv_integration.rst | Removes fetch-depth requirement from uv integration examples |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…workflowNOTICE: If you were previously handling the unshallowing of a repository clonein your CI/CD pipelines, you may now remove that step from your workflow. PSRwill now detect a shallow repository and unshallow it before evaluating the commit history.
…heckout's fetch depth
…heckout's fetch depth
06c6906 tof06e780Compare90a1ffa intopython-semantic-release:masterUh oh!
There was an error while loading.Please reload this page.
Purpose
Rationale
How did you test?
How to Verify
PR Completion Checklist
Reviewed & followed theContributor Guidelines
Changes Implemented & Validation pipeline succeeds
Commits follow theConventional Commits standard
and are separated into the proper commit type and scope (recommended order: test, build, feat/fix, docs)
Appropriate Unit tests added/updated
Appropriate End-to-End tests added/updated
Appropriate Documentation added/updated and syntax validated for sphinx build (see Contributor Guidelines)