-
Notifications
You must be signed in to change notification settings - Fork 181
main: update release calendar logic #1258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughIntroduces a GitHub Actions workflow (.github/workflows/release-calendar.yml) that schedules and manually triggers staging and production release PR creation. It performs event/day guards, ensures labels, checks existing PRs and branch divergence, creates dated release branches, and generates PR bodies via Python, using gh CLI for branch/PR operations. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User as User (workflow_dispatch)
participant Cron as Scheduler (cron)
participant GHA as GitHub Actions
participant GH as GitHub API/gh CLI
participant Py as Python PR Body Gen
rect rgb(245,245,255)
note over Cron,GHA: Trigger
Cron->>GHA: Friday 17:00 UTC (staging) / Sunday 17:00 UTC (production)
User-->>GHA: workflow_dispatch (job_to_run=staging|production)
end
rect rgb(245,255,245)
note over GHA: Guards
GHA->>GHA: Check event type, day-of-week, inputs
GHA->>GHA: Decide staging vs production flow
end
alt Staging flow
GHA->>GH: Search existing PR release/staging-YYYY-MM-DD -> staging
GH-->>GHA: Exists? (yes/no)
opt If none
GHA->>GH: Ensure labels (release, automated, staging)
GHA->>GH: Create branch from dev (release/staging-YYYY-MM-DD) and push
GHA->>Py: Generate pr_body.md (staging)
Py-->>GHA: pr_body.md
GHA->>GH: Open PR to staging with labels/body
end
else Production flow
GHA->>GHA: Skip on push events
GHA->>GH: Check if staging ahead of main
GH-->>GHA: Ahead? (yes/no)
opt If ahead and no existing PR
GHA->>GH: Ensure labels (release, automated, production)
GHA->>GH: Create branch from staging (release/production-YYYY-MM-DD) and push
GHA->>Py: Generate pr_body.md (production checklist, commits ahead)
Py-->>GHA: pr_body.md
GHA->>GH: Open PR to main with labels/body
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release-calendar.yml(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
.github/workflows/**/*.{yml,yaml}: In GitHub workflows, use the shared composite actions in .github/actions for dependency caching instead of calling actions/cache directly
Use the cache-yarn composite action for Yarn dependency caching in workflows
Use the cache-bundler composite action for Ruby gems caching in workflows
Use the cache-gradle composite action for Gradle caching in workflows
Use the cache-pods composite action for CocoaPods caching in workflows
Files:
.github/workflows/release-calendar.yml
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: type-check
- GitHub Check: test-common
- GitHub Check: type-check
- GitHub Check: test-common
| permissions: | ||
| contents: read | ||
| pull-requests: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grant write permissions to push release branches.
Both release jobs run git push, but the workflow narrows contents permission to read, so the pushes will fail. Update the workflow permissions to include contents: write before merging.
Apply this diff:
permissions:
- contents: read
+ contents: write
pull-requests: write
issues: write # Required for creating labels📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| permissions: | |
| contents: read | |
| pull-requests: write | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write # Required for creating labels |
🤖 Prompt for AI Agents
.github/workflows/release-calendar.yml around lines 45 to 47: the workflow
currently sets permissions.contents to read while release jobs perform git push,
causing pushes to fail; change the permissions block so contents is set to write
(e.g., contents: write) while keeping pull-requests: write, ensuring the
workflow has push access for release branches.
|
let's not use feature branches to merge to |
Summary by CodeRabbit