Exhub v0.1.0 Exhub View Source

Exhub is an Elixir wrapper around the Github 'hub' CLI tool. Right now you can use it to create repositories on Github from a local repository, and delete remote repositories.

Link to this section Summary

Functions

Creates a repository on Github. Must be run from inside a git repository.

Deletes a repository on Github.

Deletes multiple repositories on Github.

Link to this section Functions

Link to this function

create_repo(repo_name, opts \\ [])

View Source

Creates a repository on Github. Must be run from inside a git repository.

repo_name can be just a name or organization/name

opts include

  • :private :: bool() the repository will be private on Github
  • :description :: string() The Github project description
  • :remote_name :: string() Sets the name of the remote branch in .git/config

Example

Exhub.create_repo("github", [
private: true, 
description: "An elixir wrapper around the Github 'hub' CLI tool",
remote_name: "github"
])

Deletes a repository on Github.

repo_name can be just a name or organization/name

Example

Exhub.delete_repo("old_repo")

Deletes multiple repositories on Github.

each repo_name can be just a name or organization/name

Example

delete_repos(["old_repo_1", "myorg/old_repo_2"])