Feat/verify upstream before push#1360
Merged
codejedi365 merged 8 commits intopython-semantic-release:masterfrom Nov 7, 2025
Merged
Feat/verify upstream before push#1360codejedi365 merged 8 commits intopython-semantic-release:masterfrom
codejedi365 merged 8 commits intopython-semantic-release:masterfrom
Conversation
1a5242d to
17114ad
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR integrates upstream branch verification directly into Python Semantic Release, eliminating the need for external shell scripts in CI/CD workflows. The implementation adds a new verify_upstream_unchanged() method that checks if the upstream branch has changed before pushing commits, preventing push conflicts when multiple developers are working on the same branch.
- Adds new error types for handling upstream verification failures
- Implements upstream verification logic in the
GitProjectclass - Integrates verification into the version command before pushing changes
- Updates documentation to reflect the new built-in verification
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/semantic_release/errors.py | Adds three new error classes for upstream verification failures |
| src/semantic_release/gitproject.py | Implements the verify_upstream_unchanged() method with upstream branch verification logic |
| src/semantic_release/cli/commands/version.py | Integrates upstream verification check before pushing changes |
| tests/unit/semantic_release/test_gitproject.py | Adds comprehensive unit tests for the new verification method |
| tests/e2e/cmd_version/test_version_upstream_check.py | Adds end-to-end tests for upstream verification scenarios |
| docs/configuration/automatic-releases/github-actions.rst | Removes manual upstream verification step from documentation and adds note about built-in verification |
| docs/configuration/configuration-guides/uv_integration.rst | Removes manual upstream verification script reference |
| docs/api/commands.rst | Documents the new automatic upstream verification behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a27e797 to
0c369c7
Compare
…t commit push collisions
…erify unchanged upstream
…g upon version creation
0c369c7 to
7936607
Compare
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)