You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[plan] Handle submodule updates gracefully in push_signed_commits.cjs by falling back to git push #26256
Fix push_signed_commits.cjs to gracefully handle submodule entries instead of silently corrupting them.
Context
Reported in issue #26156. Submodule updates appear in git diff --name-status as regular entries, but they point to a commit object (not a blob) in the tree, and are directories in the working area. The current code will fail or produce incorrect output when encountering them.
Additionally, the GitHub GraphQL createCommitOnBranch mutation does not support submodules.
Bug Details
Submodules show up in git diff-tree output like regular files but are of type commit in the tree
Reading content via git show <sha>:<path> on a submodule path will succeed but return a commit SHA, not file content
Trying to add this as a file addition will silently create a wrong file or fail
Fix
In the diff-parsing loop, detect submodule entries by checking the mode in git diff-tree output. When using git diff-tree -r --name-status, also request the mode with --format or use the full diff output format.
Switch to git diff-tree -r -z --raw <sha> to get mode information alongside status, then:
Detect submodule entries (mode 160000)
When a submodule change is detected, log a warning and fall back to git push for the entire series (since createCommitOnBranch doesn't support submodules)
// mode 160000 = gitlink (submodule)if(srcMode==="160000"||dstMode==="160000"){core.warning(`pushSignedCommits: submodule change detected in ${filePath}, falling back to git push`);thrownewError("submodule change detected");}
Files to Modify
actions/setup/js/push_signed_commits.cjs
Acceptance Criteria
Submodule changes are detected via file mode 160000 in diff output
A clear warning is logged when a submodule change is detected
The code falls back to git push instead of silently producing wrong commits
Activity
github-actions commentedon Apr 14, 2026
🍪 Issue Monster has assigned this to Copilot!
I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot coding agent.
The Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪