Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Contributing on GitHub


Go to End
Reply


14 Posts   1043 Views

Avatar
Mo

Community Member, 514 Posts

15 August 2012 at 3:10am

Hi All,

I think I have pretty much got my head around contributing code back on GitHub, but there is one thing that is really confusing me, the docs state I have to prefix a new branch with an issue number.

So I created a new issue in GitHub, setup a branch with that issue number then pushed it, created a pull request and now there is a new issue created associated with that pull request.

I am guessing this is not how it is supposed to happen? If so, how am I supposed to get the issue number before creating the branch?

Apologies if it is a bit of a noob question, the docs don't really seem to make it clear.

Mo

Avatar
martimiz

Forum Moderator, 1133 Posts

15 August 2012 at 5:09am

Hi Mo

As I understood it, what you do is create a ticket, then use the ticketnumber to create the branch and also add it to the commit title/pull request title. Next, to come full circle, revisit the ticket and mention you created a pull request. At least that feels somewhat logic to me.

But I could be absolutely wrong, although I did try and they did merge... :-)

Martine

Avatar
Mo

Community Member, 514 Posts

15 August 2012 at 7:04pm

Hmm,

What do you mean by 'add it to the commit title/pull request title'? You mean make the title something like 'Issue #xx description of issue'?

Other than that, everything else I have done using the same workflow as you have outlined.

Cheers,

Mo

Avatar
martimiz

Forum Moderator, 1133 Posts

15 August 2012 at 8:00pm

Please note I'm not saying we should do it like this - it 's just how I sort of interpreted things :-)

I'm thinking along the lines of 'FIX: something something (#1234)', to link everything together.

Cheers, Martine

Avatar
Mo

Community Member, 514 Posts

15 August 2012 at 9:42pm

Well, I didn't think you were, but your interpretation seems to be pretty much the same as mine...

So, I guess I just need to add #ISSUE-NUMBER to the title somewhere, and GitHub picks this up automatically?

I will try and close down my pull request, and re-open using this technique, see if it works...

Cheers,

Mo

Avatar
Mo

Community Member, 514 Posts

15 August 2012 at 9:46pm

I just checked, and my pull request did have Issue #44 in its title.

What is more, I had that in my commit message, and GitHub picked up in the open issue that I had committed code against this issue, but the pull request still opened a new issue.

Very confused...

Avatar
martimiz

Forum Moderator, 1133 Posts

15 August 2012 at 11:08pm

I'm sorry, maybe I wasn't clear on that - I didn't refer to an issue on github, I meant ticket on open.silverstripe.org...

Avatar
Mo

Community Member, 514 Posts

16 August 2012 at 12:24am

Oh right, so I have to go and open an issue on open.silverstripe.org, not on GitHub?

I don't think it actually stipulates that on the docs, although I could be wrong :-s.

Go to Top