life-sync-1.1.1.0: Synchronize personal configs across multiple machines.
Copyright(c) 2017-2020 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Life.Github

Description

Utilities to work with GitHub repositories using hub.

Synopsis

Repository utils

checkRemoteSync :: Branch -> IO Bool Source #

Returns true if local dotfiles repository is synchronized with remote repo.

cloneRepo :: Maybe Owner -> IO () Source #

Clones dotfiles repository assuming it doesn't exist.

createNewBranch :: Branch -> IO () Source #

Create new branch with given branch name

doesBranchExist :: Branch -> IO Bool Source #

Check if a branch exists in remote repo

insideRepo :: IO a -> IO a Source #

Executes action with repoName set as pwd.

withSynced :: Branch -> IO a -> IO a Source #

Repository manipulation commands

addToRepo :: (Path Abs t -> Path Abs t -> IO ()) -> Path Rel t -> IO () Source #

Adds file or directory to the repository and commits

createRepository :: Maybe Owner -> Repo -> IO () Source #

Creates repository on GitHub inside given folder.

removeFromRepo :: (Path Abs t -> IO ()) -> Path Rel t -> IO () Source #

Removes file or directory from the repository and commits

getUserLogin :: IO Text Source #

Get user login from the local global git config.