Skip to content

Pin macOS runner to macos-26 and add --sync_required_status_checks flag#381

Merged
ydesgagn merged 3 commits into
masterfrom
update-20260513-202001
May 13, 2026
Merged

Pin macOS runner to macos-26 and add --sync_required_status_checks flag#381
ydesgagn merged 3 commits into
masterfrom
update-20260513-202001

Conversation

@ydesgagn
Copy link
Copy Markdown
Contributor

Summary

Pins the macOS GitHub Actions runner from the macos-latest rolling tag to the explicit macos-26 image so CI behavior remains stable across runner upgrades, and introduces a new opt-in --sync_required_status_checks flag that lets github-build repair branch-protection check lists when job or matrix names change (instead of failing with a mismatch error).

Key changes:

  • Replace macos-latest with macos-26 in the default constant (lib/ghb.rb), the workflow matrix (.github/workflows/build.yml), and the proto/swift language entries (config/languages.yaml)
  • Add --sync_required_status_checks CLI option in lib/ghb/options.rb, along with a new EPHEMERAL_FLAGS constant that strips one-shot flags from original_argv so they are not persisted to the generated workflow header
  • In lib/ghb/repository_configurator.rb, treat a branch-protection check mismatch as recoverable when the new flag is set: rebuild the remote check list from expected_checks while preserving each existing entry's app_id (so integration-specific configurations such as Xcode Cloud checks are not clobbered)
  • Update README.md help block and docs/architecture.md to document the new option, the EPHEMERAL_FLAGS constant, and the updated branch-protection sync behavior

Types of changes

  • Bugfix (fixes an issue)
  • New feature (adds functionality)
  • Refactoring (improves code without changing functionality)
  • Breaking change (incompatible changes)
  • Build or security update (updates dependencies, libraries, or security patches)
  • Code style or documentation update (formatting, renaming, or documentation changes)
  • Other (please describe):

Checklist

  • Unit tests added to validate my fix/feature
  • I have manually tested my change
  • I did not add automation test. Why ?:
  • Database changes requiring migration with downtime or reprocessing of existing data
  • The SOUP file lists the risk Level, requirements and verification reasoning associated with each library
  • readme.md includes sections on introduction, installation, usage, and contributing
  • docs/architecture.md includes sections on the architecture diagram, software units, software of unknown provenance, critical algorithms and risk controls related to PII and security
  • Impact on PII, privacy regulations (CCPA/GDPR/PIPEDA), CIS benchmarks or security (availability/confidentiality/integrity); management must be notified

@ydesgagn ydesgagn requested a review from a team as a code owner May 13, 2026 20:21
@ydesgagn ydesgagn enabled auto-merge (squash) May 13, 2026 20:21
Existing RepositoryConfigurator specs use InstanceDouble(GHB::Options)
without the newly added sync_required_status_checks reader; stub it to
unblock the mismatch tests. Add a new context that exercises the sync
override path (no raise, branch protection rewritten with expected
checks while preserving existing app_ids) plus an Options spec proving
ephemeral flags are stripped from the persisted args_comment header.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Combine put/post/patch stubs via receive_messages, extract the expected
branch protection payload into a let, hoist configurator.configure into
the before block so the example has a single expectation, switch
contexts to %w and use symbol keys in the JSON-roundtripped fixture.
Split the ephemeral-flag option test into one assertion per example.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ydesgagn ydesgagn merged commit daaeb0a into master May 13, 2026
16 checks passed
@ydesgagn ydesgagn deleted the update-20260513-202001 branch May 13, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants