Skip to content

[SL-ONLY] Add gitmodules workflow release_2.10 - #1187

Merged
Michael Duggan (miduggan24) merged 3 commits into
release_2.10-1.6.1from
gitmodules_workflow_2.10
Sep 10, 2026
Merged

Michael Duggan (miduggan24) merged 3 commits into
release_2.10-1.6.1from
gitmodules_workflow_2.10

Conversation

@miduggan24

Copy link
Copy Markdown
Contributor

Summary

.gitmodules is 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.

.gitmodules is up to date on this branch, but eventual release -> main merge would overwrite .gitmodules file with this branch config

introduce workflow to validate .gitmodules entry matches current branch, failing if the check doesn't succeed ensuring release -> main merge doesn't overwrite this config

Related issues

NOJIRA

Testing

future dependabot PR will validate (working in other repos)

PR CI validate submodule entry check

@miduggan24 Michael Duggan (miduggan24) changed the title Add gitmodules workflow release_2.10 [SL-ONLY] Add gitmodules workflow release_2.10 Sep 9, 2026
@silabs-matter-ci-bot silabs-matter-ci-bot Bot added the sl-only This TAG indicates that this commit is a silabs-specific commit that cannot be upstreamed to CSA. label Sep 9, 2026
@miduggan24
Michael Duggan (miduggan24) marked this pull request as ready for review September 9, 2026 16:00
@miduggan24
Michael Duggan (miduggan24) requested a review from a team as a code owner September 9, 2026 16:00
@cursor

cursor Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Read-only CI validation only; no runtime or submodule checkout changes beyond failing the workflow on mismatch.

Overview
Adds a GitHub Actions workflow that runs on push and pull_request to main and release_* branches.

The job checks that third_party/silabs/matter_support has a branch entry in .gitmodules and that it matches the target branch (PR base ref or push branch name). CI fails with a clear message if the entry is missing or mismatched.

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 .gitmodules configuration.

Reviewed by Cursor Bugbot for commit 8c61422. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

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.

Create PR

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.

Comment thread .github/workflows/validate-gitmodules-branches.yaml Outdated
@miduggan24
Michael Duggan (miduggan24) merged commit 720c950 into release_2.10-1.6.1 Sep 10, 2026
92 of 93 checks passed
@miduggan24
Michael Duggan (miduggan24) deleted the gitmodules_workflow_2.10 branch September 10, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sl-only This TAG indicates that this commit is a silabs-specific commit that cannot be upstreamed to CSA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants