Repository navigation
ci: open upstream sync PRs for the latest stable release - #6
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (3)
🧰 Additional context used🪛 zizmor (1.30.1).github/workflows/upstream-sync.yml[warning] 40-45: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 22-22: overly broad permissions (excessive-permissions): contents: write is overly broad at the workflow level (excessive-permissions) [error] 23-23: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level (excessive-permissions) [warning] 22-22: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment (undocumented-permissions) 🔇 Additional comments (4)
📝 SummarySummary by CodeRabbit
WalkthroughThe workflow now syncs stable release tags into ChangesStable release sync
Ignore rules
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant UpstreamSyncWorkflow
participant Git
participant GitHubCLI
participant ArmAutomergeScript as arm-automerge.sh
UpstreamSyncWorkflow->>Git: Check release commit against master
Git-->>UpstreamSyncWorkflow: Return ancestry result
UpstreamSyncWorkflow->>Git: Merge release into tag-specific branch
Git-->>UpstreamSyncWorkflow: Return merge result
UpstreamSyncWorkflow->>GitHubCLI: Create pull request
UpstreamSyncWorkflow->>ArmAutomergeScript: Pass clean-merge pull request and method
ArmAutomergeScript->>GitHubCLI: Check base branch rules and auto-merge state
GitHubCLI-->>ArmAutomergeScript: Return rules and auto-merge state
ArmAutomergeScript->>GitHubCLI: Enable auto-merge when needed
Merge Risk: ⚪ Minimal · up to No additional merge-blocking issue was established. The documented token and branch-rule prerequisites must be configured before the sync can operate. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
✨ Simplify code
Warning 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. I’m a rabbit with a release to greet, Comment |
There was a problem hiding this comment.
The PR rewrites the upstream sync workflow to track the latest stable Seerr release instead of develop, opens a PR on upstream-sync/<tag> with conflict markers committed when the merge conflicts, skips releases already merged or with an open PR, and arms auto-merge (merge commit) on clean merges when branch protection exists. It also fixes .gitignore by removing v3.4.1 conflict markers and adding fork-specific ignores. Two defects in the new code: the auto-merge arming script checks for required_status_checks in ruleset types instead of rule types, so it will never arm even with proper rulesets; and the workflow has a duplicate cron line.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve
| method="$2" | ||
|
|
||
| base="$(gh pr view "$pr" --json baseRefName --jq .baseRefName)" | ||
| types="$(gh api "repos/${GH_REPO}/rules/branches/${base}" --jq '[.[].type]')" |
There was a problem hiding this comment.
The Rulesets API returns each ruleset's type (e.g., pull_request), not the rule types inside it. required_status_checks is a rule type, not a ruleset type, so this check will never pass. You need to inspect .rules[].type within each ruleset, e.g., gh api ... --jq '[.[] | .rules[].type] | unique'.
| git add -A | ||
| git commit --no-edit | ||
| fi | ||
| git push --force origin "$branch" |
There was a problem hiding this comment.
Force-pushing the sync branch will overwrite any manual conflict resolution if the workflow re-runs after a PR was closed without merging. The existing-open-PR check (line 73) prevents this while the PR is open, but not after it is closed. Consider skipping the force-push when the branch already exists on the remote and the PR is closed, or accept this as expected behaviour.
There was a problem hiding this comment.
The PR rewrites upstream-sync.yml to track stable releases instead of develop, open PRs with conflict markers committed, and arm auto-merge on clean merges. It adds arm-automerge.sh to gate auto-merge behind branch rulesets, and fixes .gitignore by removing conflict markers. Three defects: arm-automerge.sh checks ruleset types instead of rule types so required_status_checks will never pass; force-pushing the sync branch overwrites manual conflict resolution after a PR is closed; .gitignore omits config/ and committag.json despite the description claiming they are included.
Not approved: the check on these comments could not run, so they are unverified.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict comment
Description
upstream-sync.ymlnever opened a PR. It merged upstreamdevelopand exited quietly on any conflict, and every sync since v3.4.1 conflicts. It now follows the same flow as the qbittorrent-warpauto_update.yaml:develop.upstream-sync/<tag>branch and opens the PR. A conflicting merge is committed with its markers so the PR shows them, instead of being dropped..github/scripts/arm-automerge.shrefuses to arm unlessmasterhas a ruleset requiring a PR and status checks, so nothing merges unchecked.AUTOUPDATE_TOKENPAT with theworkflowscope. The built-in token cannot push upstream changes to.github/workflows/, and PRs it opens do not trigger CI..gitignoreonmasterstill had conflict markers from the v3.4.1 sync, so git read the marker lines as patterns. It now uses upstream's list plus the fork'sconfig/,committag.json,.env, and*.tsbuildinfoentries.How Has This Been Tested?
actionlintandshellcheckpass on the workflow and the script, andprettier --checkpasses.bin/check-pr-template.mjsrules (Description, How Has This Been Tested, checked contribution box).git status --ignoredafter a full install and test run lists onlynode_modules/,config/,.husky/_/, andtsconfig.tsbuildinfo.Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extractNoticed, not fixed
masterhas no ruleset or branch protection, so clean syncs will open a PR but not arm auto-merge until one exists.AUTOUPDATE_TOKENsecret yet, so the workflow fails at its first step until it is added.