thlorenz / gitify

Tool to create a remote github repository and add and push content to it.
MIT License
6 stars 4 forks source link

Add more git options + hub support #2

Closed Raynos closed 10 years ago

Raynos commented 10 years ago

This solves https://github.com/thlorenz/gitify/issues/1

I want to get the git init-repo.js flow double checked by a coworker before this is ready for merge.

Raynos commented 10 years ago

I tried to make the commits atomic.

This change is probably easier to review commit by commit.

Raynos commented 10 years ago

@thlorenz fixed a bug and added a --set-upstream flag.

This is ready for review / merge at this point :)

thlorenz commented 10 years ago

Cool, will have a look and merge this tomorrow at the latest, thanks.

thlorenz commented 10 years ago

I merged this into options-hub branch, tests pass and all seems well. Unfortunately when trying this I got an error telling me repo exists already (although foo is not a repo I own already) - see below.

So things to do before merging into master:

~/dev/js/projects/tmp/foo
➝  gitify
loaded config from:  /Users/thlorenz/.config/gitify.js
{ err:
   { message: 'Validation Failed',
     documentation_url: 'https://developer.github.com/v3/repos/#create',
     errors: [ [Object] ] },
  statusCode: 422 }
[ { resource: 'Repository',
    code: 'custom',
    field: 'name',
    message: 'name already exists on this account' } ]
thlorenz commented 10 years ago

I also cannot run your example:

Even if turning of hub always, I still get:

loaded config from:  /Users/thlorenz/.config/gitify.js

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)

shell returned 8
thlorenz commented 10 years ago

Somehow though your example still created a repo, but still errored as I showed above.

However my example still works. But the cli seems hosed somehow.

thlorenz commented 10 years ago

Hey any news on this? Do you still need this merged (after it's fixed)?

Raynos commented 10 years ago

@thlorenz we have an internal copy paste in one of our projects, we'll open source it eventually.

Once we get to that point I'll make a fresh PR into gitify since it's diverged.

I'll also write better tests :)

thlorenz commented 10 years ago

Cool sounds good. Thanks.