Skip to content

fix(ci): Blog → README Sync — push to dev instead of main#270

Merged
mpaulosky merged 1 commit into
devfrom
squad/269-fix-readme-sync-branch-protection
May 8, 2026
Merged

fix(ci): Blog → README Sync — push to dev instead of main#270
mpaulosky merged 1 commit into
devfrom
squad/269-fix-readme-sync-branch-protection

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

The blog-readme-sync.yml workflow was pushing README.md updates directly to main, which is blocked by branch protection rules.

Fix (Option C)

Changed the push target from git push (implicit HEAD → main) to git push origin HEAD:dev.

  • The workflow still triggers on push: branches: [main] (reads docs/blog/index.md from main)
  • The README update is now pushed to dev, flowing through the normal dev→main release cycle
  • No new secrets or PAT bypass permissions required
  • permissions: contents: write was already present

Root Cause

remote: GH013: Repository rule violations found for refs/heads/main.
remote: - Changes must be made through a pull request.
remote: - Required status check "Build Solution" is expected.

Closes #269

Working as Boromir (DevOps)

Branch protection blocks direct pushes to main. Change the git push
target from HEAD (main) to origin HEAD:dev so the README update flows
through the normal dev→main release cycle.

Closes #269

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 18:25
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label May 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the “Blog → README Sync” GitHub Actions workflow to avoid pushing README changes directly to the protected main branch by instead pushing the generated README commit to dev, and documents the change in Boromir’s agent history.

Changes:

  • Change blog-readme-sync.yml to push HEAD to dev instead of pushing to the default branch.
  • Add a Boromir history entry describing Issue #269 and the workflow update.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/blog-readme-sync.yml Changes the workflow’s final push target to dev instead of the default branch.
.squad/agents/boromir/history.md Adds a “Learnings” entry documenting the issue and chosen fix.

Comment on lines 78 to 82
git diff --quiet README.md || (
git add README.md &&
git commit -m "docs: sync Dev Blog section from docs/blog/index.md [skip ci]" &&
git push
git push origin HEAD:dev
)

## Learnings

### 2026-05-XX — Issue #269: Blog → README Sync workflow branch protection fix

**Key insight:** The `permissions: contents: write` block was already present. No new secrets or PAT bypass needed. One-line change.

**Decision:** Captured in `.squad/decisions/inbox/boromir-269-readme-sync-target.md`.
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Test Results Summary

331 tests  ±0   330 ✅ ±0   19s ⏱️ ±0s
  6 suites ±0     1 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit a8700bc. ± Comparison against base commit d1d7e79.

@mpaulosky
mpaulosky merged commit 3c309d2 into dev May 8, 2026
21 checks passed
@mpaulosky
mpaulosky deleted the squad/269-fix-readme-sync-branch-protection branch May 8, 2026 18:30
@codecov

codecov Bot commented May 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.57%. Comparing base (d1d7e79) to head (a8700bc).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #270   +/-   ##
=======================================
  Coverage   86.57%   86.57%           
=======================================
  Files          44       44           
  Lines        1043     1043           
  Branches      116      116           
=======================================
  Hits          903      903           
  Misses         96       96           
  Partials       44       44           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

mpaulosky added a commit that referenced this pull request May 8, 2026
## Sprint 18 — AppHost MongoDB Dev Commands Refactor

This release promotes all Sprint 18 work from `dev` to `main`.

### What's included

#### Feature work
- **#262** — `refactor(apphost): extract WithClearDatabaseCommand into
MongoDbResourceBuilderExtensions`
- **#263** — `feat(AppHost): add WithSeedDataCommand for local dev
seeding`
- **#264** — `feat(AppHost): add WithShowStatsCommand for local dev
stats`
- **#267** — `refactor: rename _clearMutex to _dbMutex in
MongoDbResourceBuilderExtensions`

#### CI fixes
- **#270** — `fix(ci): Blog → README Sync — push to dev instead of main`
- **#271** — `fix(ci): add pre-flight token validation and fix
permissions block in squad-mark-released`

### CI status

- ✅ **Squad CI** (`ci.yml`) — green on latest `dev` commit
- ⚠️ **Test Suite** — 1 flaky test failure: `SeedMyBlogData Concurrent
Invocations Allow Only One Run` (timing-sensitive concurrency test; race
condition in test harness, not production code). All other 47 tests
pass. Squad CI gate is the authoritative pass/fail gate.

### Notes

- Last release tag: `v1.5.0`
- `dev` is 55 commits ahead of `main`
- No open Sprint 18 issues, no open PRs
- Merge strategy: squash merge per playbook

---

## Release Checklist

- [ ] Latest `dev` Squad CI is green ✅
- [ ] Release scope reviewed (Sprint 18 milestone closed, all 4 issues
merged)
- [ ] Breaking changes documented (none — additive AppHost extension
methods only)
- [ ] Flaky test acknowledged (`SeedMyBlogData Concurrent` — timing race
in test, not prod)
- [ ] Release notes drafted (see sprint summary above)
- [ ] Aragorn approval received
- [ ] Boromir confirms branch state and workflow health
- [ ] PR CI passes before merge
- [ ] Merge to `main` with squash merge
- [ ] Tag `main` with appropriate `vX.Y.Z` after merge + CI green

Closes the Sprint 18 release gate.
Working as Boromir (DevOps)

---------

Co-authored-by: Boromir <boromir@squad.dev>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): Blog → README Sync workflow fails — direct push to main blocked by branch protection

2 participants