-
Notifications
You must be signed in to change notification settings - Fork 11
refactor: move git_refs into its own module #848
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
refactor: move git_refs into its own module #848
Conversation
There 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 refactors the git references detection functionality by moving it from mergify_cli.ci.scopes.git_refs_detector into its own dedicated module at mergify_cli.ci.git_refs.detector, enabling reuse for a new CLI tool.
Key changes:
- Moved
git_refs_detectormodule intomergify_cli.ci.git_refs.detector - Relocated GitHub Actions output writing for base/head refs from
scopes/cli.pyto theReferencesclass via a newmaybe_write_to_github_outputs()method - Updated all import statements and references across the codebase
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mergify_cli/tests/ci/scopes/test_cli.py | Updated imports and mock paths to use the new module location; removed base/head parameters from maybe_write_github_outputs calls |
| mergify_cli/tests/ci/git_refs/test_git_refs_detector.py | Updated imports to use new module path; added test for the new maybe_write_to_github_outputs method |
| mergify_cli/ci/scopes/cli.py | Updated import to use new module location; removed base/head output writing logic and parameters |
| mergify_cli/ci/git_refs/detector.py | Added GitHub Actions output constants and maybe_write_to_github_outputs method to References class |
| mergify_cli/ci/git_refs/cli.py | Created empty placeholder file for future CLI implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
🧪 CI InsightsHere's what we observed from your CI run for 26b0e37. 🟢 All jobs passed!But CI Insights is watching 👀 |
This modules will be reused for a new cli. Change-Id: I95fa84a430ebfb8fde19dcb1b8cd231f69502600
e7ae8ea to
26b0e37
Compare
|
✅ The pull request has been merged |
This introduces `mergify ci git-refs` to get the shas the monorepo tooling must use for testing batches. Depends-On: #848
These modules will be reused for a new cli
mergify ci git-refgs.