[ci] Create long‑lived maintenance branch after release published - #886
Conversation
|
Warning Rate limit exceededAndrei Kvapil (@kvaps) has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 58 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughThis change modifies two GitHub Actions workflow files related to release management. In the pull-requests-release workflow, a new step is added to ensure that a maintenance branch named Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as pull-requests-release.yaml
participant GitHub Repo
participant Tag
participant Branch
Workflow->>Tag: Detects tag matching vX.Y.Z
Workflow->>GitHub Repo: Check if release-X.Y branch exists
alt Branch exists
Workflow->>Workflow: Log branch already exists
else Branch does not exist
Workflow->>GitHub Repo: Create release-X.Y branch at current commit
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
66c4364 to
590f14a
Compare
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/pull-requests-release.yaml (1)
84-89: Restrict regex to avoid unintended matchesThe current regex
/^v(\d+)\.(\d+)\.\d+/will match prerelease tags likev1.2.3-rc1, leading to early branch creation. If you only want maintenance branches for GA releases, anchor the pattern (/^v(\d+)\.(\d+)\.\d+$/) or add a guard based on a prerelease suffix.
🛑 Comments failed to post (1)
.github/workflows/pull-requests-release.yaml (1)
92-99: 🛠️ Refactor suggestion
Handle API errors explicitly before branch creation
Catching all errors in
catch (_) { … }may suppress genuine API failures (e.g., permission issues) and inadvertently create branches. Consider distinguishing a 404 (branch not found) from other errors:-} catch (_) { +} catch (error) { + if (error.status !== 404) throw error;📝 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.try { await github.rest.repos.getBranch({ owner: context.repo.owner, repo: context.repo.repo, branch }); console.log(`Branch '${branch}' already exists`); } catch (error) { if (error.status !== 404) throw error;
Signed-off-by: Andrei Kvapil kvapss@gmail.com
Summary by CodeRabbit