Skip to content

ci: Configure auto-merge for monthly reports workflow#589

Merged
castrojo merged 2 commits intomainfrom
chore/close-v1.1-milestone
Jan 27, 2026
Merged

ci: Configure auto-merge for monthly reports workflow#589
castrojo merged 2 commits intomainfrom
chore/close-v1.1-milestone

Conversation

@castrojo
Copy link
Contributor

Summary

Configures the monthly-reports workflow to create PRs with auto-merge enabled instead of pushing directly to main.

Changes

File Modified: .github/workflows/monthly-reports.yml

Key Updates:

  • Changed pull-requests: readpull-requests: write permission
  • Replaced direct push with PR-based workflow:
    • Creates feature branch monthly-report/YYYY-MM
    • Pushes changes to branch
    • Creates PR with automated description
    • Enables auto-merge with gh pr merge --auto --merge

Benefits

Security Improvement: Respects branch protection rules (no bypass)
Audit Trail: PRs provide reviewable record of automated changes
Quality Gates: Merge queue ensures status checks pass before merge
Rollback Capability: PRs can be closed/reverted if issues detected
Governance Compliance: Follows repository's pull request workflow

How It Works

  1. Workflow runs monthly (first Monday, 10:00 UTC)
  2. Generates report and commits to feature branch
  3. Creates PR with automated description
  4. Enables auto-merge on the PR
  5. PR automatically merges after:
    • All status checks pass (ALLGREEN strategy)
    • Merge queue clears (~5-minute wait)
    • No merge conflicts

Research

Based on comprehensive research documented in .planning/research/automerge-workflow-research.md

Option A selected: Native gh pr merge --auto approach

  • Simple, secure, maintainable
  • No additional tokens or apps needed
  • Works seamlessly with existing merge queue

Testing

Manual trigger command:
```bash
gh workflow run monthly-reports.yml
```

Next automated run: First Monday of next month

Related

Replace direct push to main with PR-based workflow that enables auto-merge.
This improves security by respecting branch protection rules and provides
an audit trail for automated reports.

Changes:
- Update permissions: pull-requests read → write
- Create feature branch: monthly-report/YYYY-MM
- Commit changes to feature branch
- Push branch and create PR with gh CLI
- Enable auto-merge with gh pr merge --auto --merge

The PR will automatically merge after status checks pass and merge queue
clears, respecting all repository protection rules.

Implementation follows Option A from .planning/research/automerge-workflow-research.md
Update ROADMAP.md to reflect completed status:
- Changed milestone status from 'In Progress' to 'COMPLETE'
- Updated milestone description (biweekly → monthly, project board → repositories)
- Marked Phase 2 as complete with deliverables verified
- Added research document from auto-merge investigation

All phases delivered:
- Phase 1: Automated Report System ✅
- Phase 2: Navigation & Discovery ✅
- Phase 3: Documentation & Refinement ✅

v1.1 milestone is production-ready.
@castrojo castrojo merged commit f6c2fc4 into main Jan 27, 2026
2 checks passed
@castrojo castrojo deleted the chore/close-v1.1-milestone branch January 27, 2026 12:54
@castrojo castrojo added github_actions kind/automation CI/CD workflows, scripts, and automation tooling labels Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions kind/automation CI/CD workflows, scripts, and automation tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant