File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 18
18
with :
19
19
submodules : true
20
20
21
- - name : Check submodules
21
+ - # Only PRs where all the submodules are on the main branch of their respective repositories
22
+ # are allowed to merge to main.
23
+ #
24
+ # The script can be run locally to confirm that the submodules are on the main branch.
25
+ #
26
+ # Note, the main branch of submodule repositories have a name other than "main".
27
+ # For example: "master" or "develop".
28
+ name : Check submodules
22
29
env :
23
30
GH_TOKEN : ${{ github.token }}
24
31
run : ./scripts/ci/require-submodules-on-main-branch.sh
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
+ #
3
+ # This script checks that all submodules are on the main branch when the main branch of the repository is main.
4
+ #
5
+ # The script exits with a non-zero exit code if any submodules are not on the main branch.
2
6
7
+ # TODO: Use this initialisation of main_branch once the repository is made public
3
8
# main_branch=$(gh repo view --json defaultBranchRef | jq -r .defaultBranchRef.name)
9
+
4
10
main_branch=main
5
11
mismatches=0
6
12
toplevel=" $( git rev-parse --show-toplevel) "
You can’t perform that action at this time.
0 commit comments