Skip to content

Git Provider

Hooks that run git commands and manage meta repos.

Hooks

Type Description Return
git_clone Hook to create clone a repo. Wraps git python clone.Source API None
meta_repo Hook to create meta repo, ie a repo that has many other repos within it. See meta repo definition. Describe the repo structure with a map and when this hook is called, it allows the users to operate git commands on that repo structure. None

Requirements

  • GitPython

Examples

git_clone

Clone a repo - wraps gitpython clone_from

compact->: git_clone https://github.com/robcxyz/tackle-provider
expanded:
  ->: git_clone
  url: https://github.com/robcxyz/tackle-pypackage
  to_path: output/path

meta_repo

Create a meta repo out of many other repos. Allows flexible references to repos on github.

this:
  ->: meta_repo
  git_org: robcxyz
  repo_tree:
    services:
      thing: robcxyz/tackle-pypackage
      users: https://github.com/robcxyz/tackle-pypackage
    foo:
      bar:
        main:
          src: https://github.com/robcxyz/tackle-pypackage
        thing:
          src: https://github.com/robcxyz/tackle-pypackage
          branch: dev
        gh:
          src: tackle-pypackage
          branch: master
        gh-branch:
          src: robcxyz/tackle-pypackage
          branch: dev