Refactor breeze pr auto-triage into isolated modules#64831
Draft
potiuk wants to merge 1 commit intoapache:mainfrom
Draft
Refactor breeze pr auto-triage into isolated modules#64831potiuk wants to merge 1 commit intoapache:mainfrom
potiuk wants to merge 1 commit intoapache:mainfrom
Conversation
Extract the monolithic pr_commands.py (12,400 lines) into 7 focused modules with clean separation of concerns: - pr_github.py: GitHub API layer (GraphQL/REST, auth, labels, mutations) - pr_actions.py: Action recommendation and execution with named thresholds - pr_checks.py: CI check analysis, log parsing, failure detection - pr_workflows.py: Workflow run management (approve, cancel, rerun) - pr_authors.py: Author profiling and filtering (AuthorFilter enum) - pr_fetching.py: GraphQL PR data fetching and assembly - pr_enrichment.py: PR enrichment, filtering, and categorization pipeline The most important module is pr_actions.py which encapsulates all decision logic with named constants (AUTHOR_FLAGGED_CLOSE_THRESHOLD, MAX_CI_FAILURES_FOR_RERUN, MAX_COMMITS_BEHIND_FOR_RERUN) replacing magic numbers. pr_commands.py uses backward-compatible import aliases so all existing code continues to work without modification. 80 new tests added across 5 test files (174 total tests passing). https://claude.ai/code/session_01JaPYna6Pnw4HMr4t5aCMiL
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.
Extract the monolithic pr_commands.py (12,400 lines) into 7 focused modules with clean separation of concerns:
The most important module is pr_actions.py which encapsulates all decision logic with named constants (AUTHOR_FLAGGED_CLOSE_THRESHOLD, MAX_CI_FAILURES_FOR_RERUN, MAX_COMMITS_BEHIND_FOR_RERUN) replacing magic numbers.
pr_commands.py uses backward-compatible import aliases so all existing code continues to work without modification.
80 new tests added across 5 test files (174 total tests passing).
https://claude.ai/code/session_01JaPYna6Pnw4HMr4t5aCMiL
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.