Contributing via GitHub

Home Forums Community Summit Discussion Topics Contributing via GitHub

Tagged: , ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #654092
    Weston Ruter
    Participant

    For close to a year now we’ve had official Git mirrors for the WordPress SVN repo. As noted in that post:

    Note that these Git repositories have different hashes than anything currently mirrored on GitHub. We never did break these hashes as promised a year ago. Next steps will be to figure out how to best mirror these to GitHub (and replace what’s there), which is complicated by now having old and new repositories for core development. Additionally, I’m sure we’ll find at least one glitch in this in a matter of a few days, so consider the next week or so a beta test.

    It’s time to get the official Git mirrors on GitHub, and to allow/encourage patches to be submitted to Core via pull requests. Accepting PRs via GitHub would likely involve a new Trac plugin that could automatically discover incoming PRs on GitHub, and attach a PR’s patch to the ticket mentioned in the PR title. When the PR is updated, the patch attached to the ticket should get refreshed. Then when a PR’s particular patch is applied to core, then the PR should get closed. Nacin indicated there is a special repo type on GitHub for mirrors, which would eliminate accidentally merging a PR on GitHub by a collaborator. Patches would still get applied via SVN.

    #654136

    +1 on this, as it would allow for easy patch refreshing too, and hopefully encourage more cool tools that could automate the GitHub PR >> SVN commit process.

    #654153
    Morgan Estes
    Participant

    +1

    A couple of things to think about ahead of time:

    • Github isn’t Git, and PRs are specific to Github
    • What happens when a ticket is updated with a PR from Github and a manual patch from SVN?
    • Does a PR from Github that updates a patch automatically mean no more patches named 12345.1.diff?

    Looking forward to see the discussion move along!

    #654168
    Ryan McCue
    Participant

    +1

    Also worth mentioning that PHP created a custom integration between their bug tracker and GitHub’s pull requests to adapt to their existing workflow. It’s not inconceivable that we could copy what they have and integrate it with Trac instead.

    #654184
    Weston Ruter
    Participant

    @Morgan:

    Github isn’t Git, and PRs are specific to Github

    +1. I did mention this on the What to do about the Plugins Directory, but didn’t include it here: “I suppose .org wouldn’t want to marry to close with GitHub, even if it is the de-facto platform for open source software platform nowadays, so the specific external Git repo used by a plugin could be configurable: GitHub, BitBucket, Google Code, etc.”

    So WordPress.org could/should have mirrors on any number of Git hosts. BitBucket also has pull requests. Other hosted Git service communities probably have their own patterns for requesting pulls, even if it is just opening a ticket in their tracker. Adapters can be written for any number of service clones: mirrors in many places.

    What happens when a ticket is updated with a PR from Github and a manual patch from SVN?

    I think ideally opening a GitHub pull request would automatically create a patch file and attach it to the ticket. Whenever a new commit is pushed to the branch on GitHub, the patch would be refreshed on the ticket. This would be independent of any other patches manually added. This would allow any number of people to create patches from their respective GitHub forks, and each one would have a separate patch file attached to the Trac ticket.

    Does a PR from Github that updates a patch automatically mean no more patches named 12345.1.diff

    Basically, yes. But I think there would be a different naming convention for patches from pull requests. For instance: github-westonruter-12345.diff could be the patch which corresponds to the GitHub pull request for the westonruter account from the 12345 branch. As noted above, whenever the pull request is updated then this patch file could be updated.

    Also worth mentioning that PHP created a custom integration between their bug tracker and GitHub’s pull requests to adapt to their existing workflow. It’s not inconceivable that we could copy what they have and integrate it with Trac instead.

    Cool! Do you have a source for this?

    #654188
    Nowell VanHoesen
    Participant

    +1

    #654449
    Jen
    Member

    Suggest including Matt in this discussion.

    #654470
    Ryan McCue
    Participant

    Cool! Do you have a source for this?

    Take a look at a bug with a patch, you’ll notice it also has pull requests. Try adding a new PR to the ticket (php-src is the main repository). The code to hook these together is pretty basic, but I imagine it should be possible with Trac with a bit of magic Python. 🙂

    #654471
    Tracy Levesque
    Participant

    +1

    #654569
    Michael Beil
    Participant

    +1

    #654647
    Tom J Nowell
    Participant

    +1

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘Community Summit Discussion Topics’ is closed to new topics and replies.

October 25-26, 2014