Repository navigation
[SL-ONLY] Add gitmodules workflow release_2.10 - #1187
Conversation
PR SummaryLow Risk Overview The job checks that This guards against release → main merges (or Dependabot updates) accidentally leaving the submodule pinned to a release branch when the repo branch expects a different Reviewed by Cursor Bugbot for commit 8c61422. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Exact branch match fails for release branch naming
- Modified the workflow to allow release branches to use a prefix match with optional version suffix while maintaining exact match for main branch.
Or push these changes by commenting:
@cursor push 602db8cf8c
Preview (602db8cf8c)
diff --git a/.github/workflows/validate-gitmodules-branches.yaml b/.github/workflows/validate-gitmodules-branches.yaml
--- a/.github/workflows/validate-gitmodules-branches.yaml
+++ b/.github/workflows/validate-gitmodules-branches.yaml
@@ -40,8 +40,16 @@
if [ -z "$branch" ]; then
echo "${submodule}: missing branch entry in .gitmodules"
exit 1
- elif [ "$branch" != "$target_branch" ]; then
- echo "${submodule}: branch is '${branch}', expected '${target_branch}'"
- exit 1
+ elif [ "$target_branch" = "main" ]; then
+ if [ "$branch" != "$target_branch" ]; then
+ echo "${submodule}: branch is '${branch}', expected '${target_branch}' on main"
+ exit 1
+ fi
+ else
+ # For release branches, allow the submodule branch to use a version suffix
+ if [[ ! "$branch" =~ ^${target_branch}(-.*)?$ ]]; then
+ echo "${submodule}: branch is '${branch}', expected to start with '${target_branch}'"
+ exit 1
+ fi
fi
echo "gitmodules branch validation passed for target branch '${target_branch}'"You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8c61422. Configure here.
720c950
into
release_2.10-1.6.1


Summary
.gitmodulesis configured to use release branch on main due to merge issues on release -> main forward merge. this cause dependabot to open PRs pulling in release branch submodule rather than correct main branch submodule..gitmodulesis up to date on this branch, but eventual release -> main merge would overwrite.gitmodulesfile with this branch configintroduce workflow to validate
.gitmodulesentry matches current branch, failing if the check doesn't succeed ensuring release -> main merge doesn't overwrite this configRelated issues
NOJIRA
Testing
future dependabot PR will validate (working in other repos)
PR CI validate submodule entry check