Git Product home page Git Product logo

git-spindle's Introduction

Archived, abandoned
===================

git-spindle was once born because GitLab and BitBucket didn't have usable CLI's, and GitHub's cli
left much to be desired. These days GitHub's `gh` beats git-spindle by a mile, and for GitLab
there's `glab`. Even atlassian now ships a cli for bitbucket, though personally I don't care about
bitbucket at all anymore.

So it's time for git-spindle to retire. It was fun while it lasted, and if there's some code in here
you find useful, feel free to steal it as you see fit.


Integrating git with central services
=====================================

Many central git hosting services, such as GitHub and GitLab, provide an API to
perform actions such as creating repositories and filing pull requests.
git-spindle is a collection of git subcommands to make using these services
easier.

For example, to fork and clone a repository on GitHub, one can now simply use

    git hub clone seveas/whelk

With this git subcommand, you can perform various github actions, such as
creating or forking a repository from the command line.

To install the latest released version on Ubuntu:

    sudo add-apt-repository ppa:dennis/python
    sudo add-apt-repository ppa:dennis/devtools
    sudo apt-get update
    sudo apt-get install git-spindle

To install the latest released version on Windows:

    Install git from http://git-for-windows.github.io/
    Install python 3.5 or newer from https://www.python.org/downloads/
    Run the following 2 commands in a command prompt:
    py -mensurepip
    py -mpip install git-spindle

To install the latest released version on other systems, assuming python and
pip are installed:

    pip install git-spindle

Usage:

(For detailed information, go to https://git-spindle.seveas.net)

Add an account to the configuration:
  git hub add-account [--host=<host>] <alias>
Add a user as collaborator:
  git hub add-collaborator <user>...
Add a deploy key:
  git hub add-deploy-key [--read-only] <key>...
Add a repository hook:
  git hub add-hook <name> [<setting>...]
Adds keys to your public keys:
  git hub add-public-keys [<key>...]
Add user's fork as a named remote. The name defaults to the user's loginname:
  git hub add-remote [--ssh|--http|--git] <user> [<name>]
Applies a pull request as a series of cherry-picks:
  git hub apply-pr <pr-number>
Open the GitHub page for a repository in a browser:
  git hub browse [--parent] [<repo>] [<section>]
Show a timeline of a user's activity:
  git hub calendar [<user>]
Display the contents of a file on GitHub:
  git hub cat <file>...
Check the github pages configuration and content of your repo:
  git hub check-pages [<repo>] [--parent]
Clone a repository by name:
  git hub clone [--ssh|--http|--git] [--triangular [--upstream-branch=<branch>]] [--parent] [git-clone-options] <repo> [<dir>]
List collaborators of a repository:
  git hub collaborators [<repo>]
Configure git-spindle, similar to git-config:
  git hub config [--unset] <key> [<value>]
Create a repository on github to push to:
  git hub create [--private] [--org=<org>] [--description=<description>]
Create a personal access token that can be used for git operations:
  git hub create-token [--store]
Lists all keys for a repo:
  git hub deploy-keys [<repo>]
Edit a hook:
  git hub edit-hook <name> [<setting>...]
Fetch refs from a user's fork:
  git hub fetch [--ssh|--http|--git] <user> [<refspec>]
Fork a repo and clone it:
  git hub fork [--ssh|--http|--git] [--triangular [--upstream-branch=<branch>]] [<repo>]
List all forks of this repository:
  git hub forks [<repo>]
Create a new gist from files or stdin:
  git hub gist [--description=<description>] <file>...
Show all gists for a user:
  git hub gists [<user>]
Show hooks that have been enabled:
  git hub hooks
Show gitignore patterns for one or more languages:
  git hub ignore [<language>...]
Show the IP addresses for github.com services in CIDR format:
  git hub ip-addresses [--git] [--hooks] [--importer] [--pages]
Show issue details or report an issue:
  git hub issue [<repo>] [--parent] [<issue>...]
List issues in a repository:
  git hub issues [<repo>] [--parent] [<filter>...]
Display github log for yourself or other users. Or for an organisation or a repo:
  git hub log [--type=<type>] [--count=<count>] [--verbose] [<what>]
Display the contents of a directory on GitHub:
  git hub ls [<dir>...]
Mirror a repository, or all repositories for a user:
  git hub mirror [--ssh|--http|--git] [<repo>]
Create a graphviz graph of followers and forks:
  git hub network [<level>]
Protect a branch against deletions, force-pushes and failed status checks:
  git hub protect [--enforcement-level=<level>] [--contexts=<contexts>] <branch>
List active branch protections:
  git hub protected
Lists all keys for a user:
  git hub public-keys [<user>]
Opens a pull request to merge your branch to an upstream branch:
  git hub pull-request [--issue=<issue>] [--yes] [<yours:theirs>]
Get the README for a repository:
  git hub readme [<repo>]
Create a release:
  git hub release [--draft] [--prerelease] <tag> [<releasename>]
List all releases:
  git hub releases [<repo>]
Remove a user as collaborator:
  git hub remove-collaborator <user>...
Remove deploy key by id:
  git hub remove-deploy-key <key>...
Remove a hook:
  git hub remove-hook <name>
Render a markdown document:
  git hub render [--save=<outfile>] <file>
List all repos of a user, by default yours:
  git hub repos [--no-forks] [<user>]
Let the octocat speak to you:
  git hub say [<msg>]
Set the remote 'origin' to github.:
  git hub set-origin [--ssh|--http|--git] [--triangular [--upstream-branch=<branch>]]
Display current and historical GitHub service status:
  git hub status
Remove branch protections from a branch:
  git hub unprotect <branch>
Display GitHub user info:
  git hub whoami
Display GitHub user info:
  git hub whois <user>...

Add an account to the configuration:
  git lab add-account [--host=<host>] <alias>
Add a project member:
  git lab add-member [--access-level=guest|reporter|developer|master|owner] <user>...
Adds keys to your public keys:
  git lab add-public-keys [<key>...]
Add user's fork as a named remote. The name defaults to the user's loginname:
  git lab add-remote [--ssh|--http] <user> [<name>]
Applies a merge request as a series of cherry-picks:
  git lab apply-merge <merge-request-number>
Open the GitLab page for a repository in a browser:
  git lab browse [--parent] [<repo>] [<section>]
Show a timeline of a user's activity:
  git lab calendar [<user>]
Display the contents of a file on GitLab:
  git lab cat <file>...
Clone a repository by name:
  git lab clone [--ssh|--http] [--triangular [--upstream-branch=<branch>]] [--parent] [git-clone-options] <repo> [<dir>]
Configure git-spindle, similar to git-config:
  git lab config [--unset] <key> [<value>]
Create a repository on gitlab to push to:
  git lab create [--private|--internal] [--group=<group>] [--description=<description>]
Fetch refs from a user's fork:
  git lab fetch [--ssh|--http] <user> [<refspec>]
Fork a repo and clone it:
  git lab fork [--ssh|--http] [--triangular [--upstream-branch=<branch>]] [<repo>]
Show issue details or report an issue:
  git lab issue [<repo>] [--parent] [<issue>...]
List issues in a repository:
  git lab issues [<repo>] [--parent] [<filter>...]
Display GitLab log for a repository:
  git lab log [<repo>]
Display the contents of a directory on GitLab:
  git lab ls [<dir>...]
List repo memberships:
  git lab members [<repo>]
Opens a merge request to merge your branch to an upstream branch:
  git lab merge-request [--yes] [<yours:theirs>]
Mirror a repository, or all your repositories:
  git lab mirror [--ssh|--http] [<repo>]
Protect a branch against force-pushes:
  git lab protect <branch>
List protected branches:
  git lab protected
Lists all keys for a user:
  git lab public-keys [<user>]
Remove a user's membership:
  git lab remove-member <user>...
List all your repos:
  git lab repos [--no-forks]
Set the remote 'origin' to gitlab.:
  git lab set-origin [--ssh|--http] [--triangular [--upstream-branch=<branch>]]
Remove force-push protection from a branch:
  git lab unprotect <branch>
Display GitLab user info:
  git lab whoami
Display GitLab user info:
  git lab whois <user>...

Add an account to the configuration:
  git bb add-account <alias>
Add a deploy key:
  git bb add-deploy-key <key>...
Add privileges for a user to this repo:
  git bb add-privilege [--admin|--read|--write] <user>...
Adds keys to your public keys:
  git bb add-public-keys [<key>...]
Add user's fork as a named remote. The name defaults to the user's loginname:
  git bb add-remote [--ssh|--http] <user> [<name>]
Applies a pull request as a series of cherry-picks:
  git bb apply-pr <pr-number>
Open the GitHub page for a repository in a browser:
  git bb browse [--parent] [<repo>] [<section>]
Display the contents of a file on BitBucket:
  git bb cat <file>...
Clone a repository by name:
  git bb clone [--ssh|--http] [--triangular [--upstream-branch=<branch>]] [--parent] [git-clone-options] <repo> [<dir>]
Configure git-spindle, similar to git-config:
  git bb config [--unset] <key> [<value>]
Create a repository on bitbucket to push to:
  git bb create [--private] [--team=<team>] [--description=<description>]
Lists all keys for a repo:
  git bb deploy-keys [<repo>]
Fetch refs from a user's fork:
  git bb fetch [--ssh|--http] <user> [<refspec>]
Fork a repo and clone it:
  git bb fork [--ssh|--http] [--triangular [--upstream-branch=<branch>]] [<repo>]
List all forks of this repository:
  git bb forks [<repo>]
Invite users to collaborate on this repository:
  git bb invite [--read|--write|--admin] <email>...
Show issue details or report an issue:
  git bb issue [<repo>] [--parent] [<issue>...]
List issues in a repository:
  git bb issues [<repo>] [--parent] [<filter>...]
Display the contents of a directory on BitBucket:
  git bb ls [<dir>...]
Mirror a repository, or all repositories for a user:
  git bb mirror [--ssh|--http] [<repo>]
List repo privileges:
  git bb privileges [<repo>]
Lists all keys for a user:
  git bb public-keys [<user>]
Opens a pull request to merge your branch to an upstream branch:
  git bb pull-request [--yes] [<yours:theirs>]
Remove deploy key by id:
  git bb remove-deploy-key <key>...
Remove a user's privileges:
  git bb remove-privilege <user>...
List all repos of a user, by default yours:
  git bb repos [--no-forks] [<user>]
Set the remote 'origin' to github.:
  git bb set-origin [--ssh|--http] [--triangular [--upstream-branch=<branch>]]
Create a new snippet from files or stdin:
  git bb snippet [--description=<description>] <file>...
Show all snippets for a user:
  git bb snippets [<user>]
Display BitBucket user info:
  git bb whoami
Display GitHub user info:
  git bb whois <user>...

Copyright (C) 2012-2020 Dennis Kaarsemaker <[email protected]>

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program.  If not, see <http://www.gnu.org/licenses/>.

git-spindle's People

Contributors

abridgett avatar aroig avatar bobxychen avatar brandonzimmerman avatar danielj7 avatar dgryski avatar dragonwize avatar jwilk avatar mattiasb avatar methane avatar robsonpeixoto avatar seveas avatar sigmavirus24 avatar smartass101 avatar tilboerner avatar tolry avatar vampire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-spindle's Issues

Failed when EDITOR="subl -w"

Traceback (most recent call last):
  File "/usr/local/bin/git-hub", line 1011, in <module>
    main()
  File "/usr/local/bin/git-hub", line 125, in main
    commands[command](opts)
  File "/usr/local/bin/git-hub", line 651, in pull_request
    getattr(shell, check(shell.git('var', 'GIT_EDITOR')).stdout.strip())(temp_file, redirect=False)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/whelk.py", line 58, in __getattr__
    return self._getattr(name, defer=False)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/whelk.py", line 66, in _getattr
    return super(Shell, self).__getattribute__(name)
AttributeError: 'Shell' object has no attribute 'subl -w'

Git-hub never worked for me

I have never seen it working. I just tried git hub create and got this traceback:

Traceback (most recent call last):
  File "C:/MSYS2/mingw32/bin/git-hub", line 1251, in <module>
    main()
  File "C:/MSYS2/mingw32/bin/git-hub", line 174, in main
    commands[command](opts)
  File "C:/MSYS2/mingw32/bin/git-hub", line 286, in create
    root = check(shell.git('rev-parse', '--show-toplevel')).stdout.strip()
  File "C:/MSYS2/mingw32/lib/python2.7/site-packages/whelk/__init__.py", line 176, in __call__
    sp = Popen([str(self.name)] + [str(x) for x in self.args], **(self.sp_kwargs))
  File "C:/MSYS2/mingw32/lib/python2.7/subprocess.py", line 667, in __init__
    raise ValueError("close_fds is not supported on Windows "
ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr

GHE Create Repo Error

When trying to create a repo using Github Enterprise the following error is thrown:

~/testrepo (master)
$ git hub create -d "test"
Traceback (most recent call last):
File "c:\Python27\Scripts\git-hub", line 5, in
GitHub().main()
File "c:\Python27\lib\site-packages\gitspindle__init__.py", line 214, in main
host = self.repository(opts, True)
File "c:\Python27\lib\site-packages\gitspindle__init__.py", line 158, in repository
return host
UnboundLocalError: local variable 'host' referenced before assignment

Add a check-pages command

  • Is the pages branch there?
  • Does it have an index.html or whatever jekyll wants?
  • If a CNAME exists, do DNS checks

Caching

We should cache some user/org/repo info

Command idea: git {hub,lab} ls

Options:
--{ref,commit}=ref (default: repo.default)
-r
-l (abbreviated sha, permissions)
-rr (recurse submodules, iff the submodule is on github/gitlab)

Give nicer error when trying to use a nonexistent repo:

Traceback (most recent call last):
File "/usr/bin/git-hub", line 5, in
GitHub().main()
File "/usr/lib/python2.7/dist-packages/gitspindle/init.py", line 215, in main
func(opts)
File "/usr/lib/python2.7/dist-packages/gitspindle/github.py", line 477, in issue
#""" % (repo.owner.login, repo.name)
AttributeError: 'NoneType' object has no attribute 'owner'

git hub calendar does not work

When I try:

git hub calendar

I get this:

lowks@lowkster:~/Downloads> git hub calendar
Traceback (most recent call last):
  File "/usr/bin/git-hub", line 1251, in <module>
    main()
  File "/usr/bin/git-hub", line 174, in main
    commands[command](opts)
  File "/usr/bin/git-hub", line 1141, in calendar
    data = requests.get('https://github.com/users/%s/contributions_calendar_data' % user).json()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 763, in json
    return json.loads(self.text, **kwargs)
  File "/usr/lib64/python2.7/site-packages/simplejson/__init__.py", line 488, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib64/python2.7/site-packages/simplejson/decoder.py", line 389, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

GitHub releases

Do something useful with github releases:

  • Create them based on a tag 'git hub release v1.0'
  • Get info for all/any release
  • Upload assets (git hub release v1.0 dist/*v1.0.tar.gz?)

"git hub network " breaks for me

<dgryski@kaepora[utils]> git hub network
Looking at user dgryskiTraceback (most recent call last):
  File "/home/dgryski/bin/git-hub", line 914, in <module>
    main()
  File "/home/dgryski/bin/git-hub", line 117, in main
    commands[command](opts)
  File "/home/dgryski/bin/git-hub", line 658, in network
    for repo in gh.iter_repos(login, type='owner'):
  File "/usr/local/lib/python2.7/dist-packages/github3/decorators.py", line 37, in auth_wrapper
    return func(self, *args, **kwargs)
TypeError: iter_repos() got multiple values for keyword argument 'type'

Use credential helpers

Right now passwords/tokens are stored in ~/.gitspindle. We should use
credential helpers when available.

git-hub token creation

For 2fa users, tokens can be used for git actions. Maybe git-spindle can make this easy to use?

issue and pull-request can lose messages on error

When e.g. issues are disabled and the user forgot to use --parent, filing the
issue will fail. We should not discard what the user typed, and maybe even
offer to file an issue on the parent repo. Or even detect beforehand whether
issues are supported at all.

Add support to make pull-request between without fork

Hi,

I'd like to create a pull-request between to branches without use fork like it:

git hub clone robsonpeixoto/virtualhost.sh
git checkout -b feature/auto-update
# do commits ....
git push origin feature/auto-update
git pull-request master:feature/auto-update 

My pull-request will be reviewed by other developer and he will approve or not the pull-request.

Thanks!

Dependency 'whelk' fails to install

Hi, I get this when I try to install hub (with pip):

aclark@Alexs-MacBook-Pro:~/ > pip install hub
Downloading/unpacking hub
  Running setup.py egg_info for package hub

Downloading/unpacking github3.py>=0.1b0 (from hub)
  Running setup.py egg_info for package github3.py

Downloading/unpacking whelk>=1.1 (from hub)
  Using download cache from /Users/aclark/Developer/download-cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fany%2Fw%2Fwhelk%2Fwhelk-1.1.linux-i686.tar.gz
  Running setup.py egg_info for package whelk
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
    IOError: [Errno 2] No such file or directory: '/var/folders/13/tp4qgs6x6fb17xbmf49vrqxc0000gn/T/pip-build/whelk/setup.py'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

IOError: [Errno 2] No such file or directory: '/var/folders/13/tp4qgs6x6fb17xbmf49vrqxc0000gn/T/pip-build/whelk/setup.py'

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/13/tp4qgs6x6fb17xbmf49vrqxc0000gn/T/pip-build/whelk
Storing complete log in /Users/aclark/.pip/pip.log

Looks like a packaging error.

Use the underlying git authentication instead of passwords

I feel very uncomfortable to provide my password. Please allow using whatever authentication mechanism is already configured in git. I use the PuTTY agent with GIT_SSH=plink so any git command will use that when needed, except for hub.

Doesn't detect config parse errors properly

If git config -f config_file failes due to parse errors, git-spindle will
prompt for a username instead of telling the user they f'ed up their config.
Probably the same when we do other git config things.

shell completion

Git has really nice shell completion for bash (and zsh?). It would be nice to have that for git-spindle as well.

I'm rather busy these days but I might get time to work on this at some point in the future.

'git lab whoami' fails with "ValueError: too many values to unpack"

I am seeing 'git lab whoami' fail in the following way:

$ git lab whoami
James Byrne (id 8)
Profile   https://gitlab.com/u/james.byrne
Email     [email protected]
Traceback (most recent call last):
  File "/usr/local/bin/git-lab", line 5, in <module>
    GitLab().main()
  File "/usr/local/lib/python2.7/dist-packages/gitspindle/__init__.py", line 233, in main
    func(opts)
  File "/usr/local/lib/python2.7/dist-packages/gitspindle/gitlab.py", line 606, in whoami
    self.whois(opts)
  File "/usr/local/lib/python2.7/dist-packages/gitspindle/gitlab.py", line 638, in whois
    algo, key = pkey.key.split()
ValueError: too many values to unpack

The issue appears to be that my public key (i.e. the value of pkey.key) has the three fields but the code is only expecting two. The value of pkey.key looks like this (with the bulk of the key replaced by '...'):

ssh-rsa AAB3...Q2tt [email protected]

Does not work in MinTTY

Not sure why but when I for instance run git hub whoami and it needs to ask me for the username/password, then the prompt is never shown in MinTTY. I only knew it was asking me for input because I tried it on cmd.exe.

Crashes in add-remote

Using add-remote outside a repo causes an exception. Probably other commands do too.

Fork fails for projects you are a member of

If there is a project belonging to another user (e.g. otheruser/project_a) which I am a member of and I try and fork it with git lab fork, it fails like this:

$ git lab fork otheruser/projecta
Repository already exists

The problem is that it is finding that I have a project with the same name, but this shouldn't prevent me doing a fork as it belongs to a different user. I have worked around this by modifying the fork function in gitlab.py like this:

-        if repo.name in [x.name for x in self.gl.Project()]:
-            err("Repository already exists")
+        my_repo = self.find_repo(self.my_login, repo.name)
+        if my_repo:
+            err("Repository already exists")

This seems to solve the problem, but is there a better solution?

I broke set-origin again

dennis@spirit:~/code$ git hub clone git-jokes
Cloning into 'git-jokes'...
remote: Counting objects: 115, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 115 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (115/115), 40.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (33/33), done.
Checking connectivity... done.
Traceback (most recent call last):
File "/usr/bin/git-hub", line 5, in
GitHub().main()
File "/usr/lib/python2.7/dist-packages/gitspindle/init.py", line 215, in main
func(opts)
File "/usr/lib/python2.7/dist-packages/gitspindle/github.py", line 336, in clone
self.set_origin(opts)
File "/usr/lib/python2.7/dist-packages/gitspindle/github.py", line 968, in set_origin
if self.git('config', 'remote.origin.url').stdout.strip() != repo.url:
AttributeError: 'Repository' object has no attribute 'url'

no attribute 'token'

hey,

I used to run a pretty old version of git-hub.
I upgraded today, to the latest master. (I uninstalled the old version first).

When I start git hub for the first time, I get this error:
git hub
GitHub password:
Traceback (most recent call last):
File "/usr/local/bin/git-hub", line 5, in
GitHub().main()
File "/usr/local/lib/python2.7/dist-packages/gitspindle/github.py", line 26, in init
self.gh = self.github()
File "/usr/local/lib/python2.7/dist-packages/gitspindle/github.py", line 59, in github
token = auth.token
AttributeError: 'NoneType' object has no attribute 'token'

More details: I use two-factor auth, so entering my password is useless. Instead, I created an API token, and I am using that as my password. I enter an API token as a password all the time (for git push to https remotes, for example).

Does anything look wrong to you on the top of your head?

Support local git lab instances.

It would be great to be able to use git-spindle with local gitlab instances (gitlab.com seems to be hardcoded).

The CLI could be changed to the following:

$ git lab merge-request <server> [<branch1:branch2>]

where <server> would be a gitlab endpoint defined in ~/.gitspindle.

Managing access control

git-* should support acl management:

  • invites (bitbucket)
  • repo access
  • org membership (gh/gl)
  • deploy keys
  • Branch protections (gitlab)

Man pages

It would be great to have man pages supplied with git-spindle so that looking up detailed info on a command like pull-request is just a git hub pull-request --help away.

422 VAlidation Failed when try to run 'git hub whoami'

When I try the 'git hub whoami'

I got the error as below

Traceback (most recent call last):
  File "/usr/local/bin/git-hub", line 1167, in <module>
    main()
  File "/usr/local/bin/git-hub", line 172, in main
    commands[command](opts)
  File "/usr/local/bin/git-hub", line 639, in whoami
    gh = github()
  File "/usr/local/bin/git-hub", line 214, in github
    "Github Git integration on %s" % socket.gethostname(), "http://seveas.github.com/git-hub")
  File "/usr/local/lib/python2.7/dist-packages/github3/github.py", line 114, in authorize
    json = self._json(self._post(url, data=data), 201)
  File "/usr/local/lib/python2.7/dist-packages/github3/models.py", line 86, in _json
    if self._boolean(response, status_code, 404) and response.content:
  File "/usr/local/lib/python2.7/dist-packages/github3/models.py", line 107, in _boolean
    raise GitHubError(response)
github3.models.GitHubError: 422 Validation Failed

git-* repos errors out when not having any repos

Traceback (most recent call last):
File "/home/dennis/code/git-spindle/bin/git-lab", line 5, in
GitLab().main()
File "/home/dennis/code/git-spindle/lib/gitspindle/init.py", line 229, in main
func(opts)
File "/home/dennis/code/git-spindle/lib/gitspindle/gitlab.py", line 544, in repos
maxlen = max([len(x.name) for x in repos])
ValueError: max() arg is an empty sequence

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.