Refactor: code-quality batch (method extraction, dedupe, STDERR migration)#390
Merged
Conversation
cloudofficer-admin
approved these changes
May 17, 2026
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.
Summary
Resolves the Medium-severity code-quality / refactor findings from the deep code review. All changes are behaviour-preserving — the existing 321-example suite passes unchanged with no spec modifications, and RuboCop is clean across all 45 files.
Key changes:
LanguageJobBuilder#add_language_job(127 LOC) split intobuild_setup_step,build_dependency_steps,build_mono_dependency_steps,build_licenses_step.RepositoryConfigurator#configure_branch_protection(122 LOC) split intoaugment_required_status_checks,log_codeql_languages,discover_xcode_cloud_checks,validate_required_checks!,required_checks_differ?,build_branch_protection_payload.Job::COPYABLE_PROPERTIES/Step::COPYABLE_PROPERTIESconstants now default thecopy_propertiesargument; the duplicated literal array removed from all 24 call sites across 7 builder/manager files.Workflow#deploy_needs/Workflow#deploy_if_statementreplace the byte-duplicated deploy-condition block inaws_job_builderandcode_deploy_job_builder.language[:short_name]string equality centralized intoextra_deploy_checks?/xcode_cloud_unit_tests?/needs_codedeploy_setup?predicates; Swiftadditional_checksbuilt fromSWIFT_DEPLOY_CHECK_FLAGSlist instead of a literal.excluded_dirs_from_configontofind_files_matching.Workflow#readdefaults@on/@permissions/@envto{}(not[]); the now-redundantis_a?(Hash)guards inapplication.rbdropped.bin/github-build.rbrescue output and therepository_configurator.rbMISSING/EXTRA diagnostic block now usewarn.oreliminated via a captured boolean) and QUAL-025 (class comments tightened to carry information).Deferred to separate work: QUAL-017 (
BuildContext— touches every builder constructor + spec) and COMPAT-002 (--strict_version_checkrename is a breaking CLI change needing a product decision).Types of changes
Checklist