life-sync-1.0.1

Safe HaskellNone
LanguageHaskell2010

Life.Github

Contents

Description

Utilities to work with GitHub repositories using "hub".

Synopsis

Documentation

newtype Owner Source #

Constructors

Owner 

Fields

Instances
Show Owner Source # 
Instance details

Defined in Life.Github

Methods

showsPrec :: Int -> Owner -> ShowS #

show :: Owner -> String #

showList :: [Owner] -> ShowS #

newtype Repo Source #

Constructors

Repo 

Fields

Instances
Show Repo Source # 
Instance details

Defined in Life.Github

Methods

showsPrec :: Int -> Repo -> ShowS #

show :: Repo -> String #

showList :: [Repo] -> ShowS #

Repository utils

checkRemoteSync :: IO Bool Source #

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

cloneRepo :: Owner -> IO () Source #

Clones dotfiles repository assuming it doesn't exist.

insideRepo :: IO a -> IO a Source #

Executes action with repoName set as pwd.

withSynced :: 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 :: 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