Thanks to Dion Hulse (@dd32), it’s now easier to share patch directly from your BuddyPress GitHub fork to a specific BuddyPress Trac ticket 🙌. It’s a great improvement and I believe it can potentially attract more people to contribute to BuddyPress code.
How does it work?
First if you haven’t created your BuddyPress fork on GitHub, log in to your GitHub account, head over to the https://github.com/buddypress/buddypress.git repository and click on the “Fork” button !
You’ll get a new repository on your GitHub account to work from to contribute to BuddyPress, here’s mine for instance: https://github.com/imath/buddypress.git
Clone it locally, create a new branch to add your changes, commit and push your changes on your branch, go to your fork’s page on GitHub and click on the link to create a Pull Request. You’ll be directed to the page where you’ll be able to link your PR to an existing BuddyPress Trac ticket.
<!-- insert a link to the BuddyPress Trac ticket here --> text and replace it with the Trac Ticket link, for example https://buddypress.trac.wordpress.org/ticket/8647. Of course, if the ticket doesn’t exist yet, you can always create a new one from there.
NB: BuddyPress core committers, do not merge PRs from the BuddyPress GitHub repository, the feature’s goal is to ease code review, we still need to commit changes from our SVN repository.
Click on the “Create pull request” green button and go to your BuddyPress Trac ticket’s page.
As shown in the above screenshot, your pull request will be included into the “Pull Requests” section of the corresponding Trac Ticket. From there BuddyPress contributors can enjoy the GitHub code review features clicking on the View PR’s link or get the patch using the “View patch” link.
To get more information about this feature which is also available on the WordPress Trac, you can read this documentation page of the WordPress Contributor’s handbook.
Getting the most out of this feature
As you may have noticed, we also have some information about automatic checks applied to pull requests. We currently haven’t set these from a GitHub action, but it would be interesting to include PHP Unit tests and why not WordPress code standards checks, see #7228.