Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribflow can't create a pull request if the repo owner and name are incorrect #17

Open
jrw95 opened this issue Jul 14, 2013 · 2 comments

Comments

@jrw95
Copy link
Contributor

jrw95 commented Jul 14, 2013

I found this while working with video-js-swf during Brightcove Hack Week.
The bug here is that we want to bullet-proof contribflow to advise users to create their pull request manually (I was able to do this in video-js-swf when this error occurred).

I'll also file an issue with video-js-swf, that we want to be sure that the repo owner and other information is correct, so that we can use contribflow there.

contrib feature start worked as expected.

contrib feature submit failed, however:

jwhisenant-retina:video-js-swf jwhisenant$ contrib feature submit
-----> Switching to the feature/contrib-guide-update branch
$ git checkout feature/contrib-guide-update
Already on 'feature/contrib-guide-update'
-----> Updating the feature/contrib-guide-update branch with origin changes
$ git pull origin feature/contrib-guide-update
Identity added: /Users/jwhisenant/.ssh/id_rsa (/Users/jwhisenant/.ssh/id_rsa)
From github.com:BCjwhisenant/video-js-swf
 * branch            feature/contrib-guide-update -> FETCH_HEAD
Already up-to-date.
prompt: Github Username:  bcjwhisenant
prompt: Github Password:  
prompt: Please title the pull request:  pull request for contrib guide updates
prompt: Please describe the feature:  additions and updates to contrib guide
-----> undefined

I added some debugging to pullrequest,js, and it looks like this call in pr.createFromBranch is where things break down:

      github.pullRequests.create({
        user: owner,
        repo: project,
        title: result.title,
        body: result.body,
        head: org + ':' + branchName,
        base: baseBranch
      }, callback);

Debug output just before this call, from video-js-swf, shows this:

*********** SENDING INFO TO GITHUB **************
user: NONE repo: NONE title: contrib-guide-update body: contrib-guide-update head: BCjwhisenant:feature/contrib-guide-update base: master

And Github sends back a 404:

************* ERROR OCCURRED *************
err: { message: '{"message":"Not Found"}', code: 404 }
-----> undefined

A successful contrib feature submit to zencoder/contribflow has this:

*********** SENDING INFO TO GITHUB **************
user: zencoder repo: contribflow title: A small change to test a bug body: A small change to test a bug head: BCjwhisenant:feature/contrib-bug-test base: master
-----> Pull request submitted!
@jrw95
Copy link
Contributor Author

jrw95 commented Jul 14, 2013

FWIW, here's my .git/config file from video-js-swf:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = false
[remote "origin"]
        url = git@github.com:BCjwhisenant/video-js-swf.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
[remote "upstream"]
        url = https://github.com/videojs/video-js-swf.git
        fetch = +refs/heads/*:refs/remotes/upstream/*
[branch "feature/contrib-guide-update"]
        remote = origin
        merge = refs/heads/feature/contrib-guide-update

@jrw95
Copy link
Contributor Author

jrw95 commented Jul 14, 2013

I have a fix for this in my local repo. Looking at how/if it's practical to write tests that fake a 404, 500, and 503 error code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant