action_utils.check_submodule_commits module

Asserts all submodules in a repository are on a commit in the default branch’s commit history for that submodule

action_utils.check_submodule_commits.parse_args()

Parse commandline args

action_utils.check_submodule_commits.repo_has_valid_submodules(org_str: str, git_repo: git.repo.base.Repo, github_client: github.MainClass.Github) bool

Run validation check on each of the given Repo’s submodules

Parameters:
  • org_str – The GitHub organization to inspect

  • repo – The Repo to inspect

  • client – Authenticated Github client

Returns:

True if all submodules passed the check, else False

action_utils.check_submodule_commits.submodule_is_valid(git_submodule: git.objects.submodule.base.Submodule, github_repo: github.Repository.Repository) bool

Determines if the given submodule is valid by looking through the git history for the default branch of the submodule

Parameters:
  • submodule – The git submodule to inspect

  • client – The GitHub Organization to use to pull commit history for the submodule

Returns:

True if the submodule’s commit is in the history of the default branch for the submodule, else False