Jump to:

23459 Posts in 18906 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Contributing on GitHub

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

Page: 1 2
Go to End
Author Topic: 863 Views
  • Mo
    Avatar
    Community Member
    508 Posts

    Contributing on GitHub Link to this post

    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

  • martimiz
    Avatar
    Forum Moderator
    1078 Posts

    Re: Contributing on GitHub Link to this post

    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

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Contributing on GitHub Link to this post

    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

  • martimiz
    Avatar
    Forum Moderator
    1078 Posts

    Re: Contributing on GitHub Link to this post

    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

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Contributing on GitHub Link to this post

    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

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Contributing on GitHub Link to this post

    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...

  • martimiz
    Avatar
    Forum Moderator
    1078 Posts

    Re: Contributing on GitHub Link to this post

    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...

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Contributing on GitHub Link to this post

    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.

    863 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.