Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@codejedi365
Copy link
Contributor

Purpose

Rationale

How did you test?

How to Verify


PR Completion Checklist

  • Reviewed & followed the Contributor Guidelines

  • Changes Implemented & Validation pipeline succeeds

  • Commits follow the Conventional 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)

@codejedi365 codejedi365 force-pushed the feat/unshallow-repo-automatically branch from de3525b to 06c6906 Compare November 8, 2025 22:05
@codejedi365 codejedi365 requested a review from Copilot November 8, 2025 23:06
Copy link

Copilot AI left a 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 specify fetch-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() and git_unshallow() methods to the GitProject class
  • Integrated shallow clone detection into the version command workflow
  • Updated documentation to reflect that fetch-depth: 0 is 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.

codejedi365 and others added 6 commits November 8, 2025 16:24
…workflow

NOTICE: If you were previously handling the unshallowing of a repository clone
in your CI/CD pipelines, you may now remove that step from your workflow. PSR
will now detect a shallow repository and unshallow it before evaluating the commit history.
@codejedi365 codejedi365 force-pushed the feat/unshallow-repo-automatically branch from 06c6906 to f06e780 Compare November 8, 2025 23:24
@codejedi365 codejedi365 merged commit 90a1ffa into python-semantic-release:master Nov 9, 2025
9 checks passed
@codejedi365 codejedi365 deleted the feat/unshallow-repo-automatically branch November 9, 2025 04:28
@codejedi365
Copy link
Contributor Author

🎉 This PR has been published as part of v10.5.0 🎉

You can find more information about this release on the GitHub Releases page.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant