Skip to content

wick3dr0se/github-api-curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghc - GitHub API cURL

A cURL wrapper that parses GitHub REST API v3. Making things like git CLI automation possible without git installed

github

Install

setup ghc on system

curl https://raw.githubusercontent.com/wick3dr0se/github-api-curl/master/install.sh -O && bash install.sh

Arguments

possible arguments to ghc

  • issue list issues
    • create create an issue
    • list list repository issues
  • pull pull a repository
  • push push a file to repository
  • repo stat repository information
  • user stat user information

issue

view a repository issue

accepts user, repo & issue number
ghc issue <user> <repo> <issue>

create

create a repository issue

accepts repo, title & body
ghc issue create <repo> <title> '<body>'

ghc issue cre <title> '<body>'

list

list repository issues

accepts user, repo & issue number
ghc issue list <user> <repo> <issue>

pull

clones/pulls a github repository without .git

accepts user, repo & branch arguments
ghc pull <user> <repo> <branch>

ghc pull <user>/<repo>/<branch>

push

commits and pushes a file

accepts a repo, file & commit message
ghc push <file> '<commit message>'

ghc push <repo>/<file> '<commit message>'

repo

gets user's repository information

accepts user & repo
ghc repo <user> <repo>

contributors

list repository contributors

accepts user & repo
ghc repo contributors <user> <repo>

ghc repo contrib <repo>

create

creates a repository

accepts a repo & description
ghc repo create <repo> <description>

ghc repo cre <repo>

delete

deletes a repository

accepts a repo
ghc repo delete <repo>

ghc repo del <repo>

PAT requires delete_repo scope

user

gets user information

accepts a user
ghc user <user>