-
Notifications
You must be signed in to change notification settings - Fork 11
chore: better base detection debug #894
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
chore: better base detection debug #894
Conversation
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 b15160c. 🟢 All jobs passed!But CI Insights is watching 👀 |
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 reference detection system to improve debugging capabilities by tracking the source of base/head SHA detection. The change replaces the boolean is_merge_queue field with a more descriptive source field that uses a typed literal to indicate where the references were detected from.
Key Changes:
- Introduced a
ReferencesSourcetype with values like "manual", "merge_queue", "github_event_pull_request", etc. - Updated the
Referencesdataclass to usesource: ReferencesSourceinstead ofis_merge_queue: bool - Modified CLI output to display the source of detected references for better debugging
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mergify_cli/ci/git_refs/detector.py | Added ReferencesSource literal type and replaced is_merge_queue field with source in the References dataclass |
| mergify_cli/ci/cli.py | Updated scopes command to create References with "manual" source when base/head are provided via CLI options |
| mergify_cli/ci/scopes/cli.py | Modified detect() and maybe_write_github_step_summary() to accept References object and display source information |
| mergify_cli/tests/ci/git_refs/test_git_refs_detector.py | Updated test assertions to use the new source field with appropriate values |
| mergify_cli/tests/ci/scopes/test_cli.py | Updated test mocks and assertions to use References objects with correct source values |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This change introduces the source of where we found the base/head sha This will help debuging Customer CI. Change-Id: I74a4910647e62f85135e6d5245e5c329c8503007
0d7c61e to
b15160c
Compare
Merge Queue Status✅ The pull request has been merged at b15160c This pull request spent 22 seconds in the queue, including 3 seconds running CI. Required conditions to merge
|
This change introduces the source of where we found the base/head sha
This will help debuging Customer CI.