github

This plugin gets a users public repositories from the github API and clones them if needed. Else it will go through all cloned repositories and do a git pull.

Dependencies

  • git

Configuration

A list of required configuration keys:

  • username: Needs to be a valid github username
  • destination

Here’s an example:

logs:
  dir: /var/log/dothebackup
  keep: 10
backup:
  mygithubrepos:
    type: github
    enabled: yes
    username: xsteadfastx
    destination: /media/backup/github

API

Github.

dothebackup.plugs.github.get_repos(username)[source]

Create a GET request on the github api to get all repos from a user.

Parameters:username (str) – github username
Return type:List[Dict[str, Union[int, str, Dict[~KT, ~VT]]]]
Returns:Full JSON dictionary of user repos from github
dothebackup.plugs.github.main(config)[source]

Command builder.

Parameters:config (Dict[str, Union[str, List[str], bool]]) – config snippet for this plugin
Return type:List[List[str]]
Returns:Commands to create the backup