Pull Request HowTo

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Pull Request HowTo

Post by jriegel »

This Forum is the place to offer Pull Requests to the main developers.

Some guide lines:
  • Pull from https://github.com/FreeCAD/FreeCAD
  • When you done developing, rebase your branch to the master branch of the above repos
  • Post a pull request on this forum with a description of what you've done
Review Process:
ToBeDone...
Stop whining - start coding!
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: Pull Request HowTo

Post by keithsloan52 »

Sorry to be thick but any chance you could elaborate for those of use who are not really clued in with git.
Like an example with git commands.
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Pull Request HowTo

Post by shoogen »

push your branch to a publicly available server

Code: Select all

git push https://github.com/KeithSloan/FreeCAD_sf_master.git yourbranch
create a topic which mentions the adresss of your repository (including the name of the branch)
git://github.com/KeithSloan/FreeCAD_sf_master.git yourbranch
optionally you can generate a summery of your changes to put it into your pull request

Code: Select all

git request-pull origin/master git://github.com/KeithSloan/FreeCAD_sf_master.git yourbranch
I already talked about the necessity of the rebase in another topic
abdullah wrote:4. One very last thing. I have read the sticky post for pull requests (I think by wmayer). It talks about rebasing before pull request (to make integrator life easier, which is something I really would like). Does this mean that if before posting the pull request I do:

Code: Select all

git checkout FeatureK
git rebase master
git checkout master
git merge FeatureK (fast-forward merge)
shoogen wrote:You don't have to do the merge. If the rebase finishes successfully, it the merge will be fast-forward. If not it reveals problems, that needs to be resolved. Since somebody else might commit to the blessed repository, the integrator, will probably have to rebase your branch onto a never version of the master branch, again. But the main benefit is that this will reveal the merge conflicts to you, so you can solve them before issuing the pull request.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Pull Request HowTo

Post by yorik »

Since github works well for us now, I think we can begin to use the pull requests feature of github, since it really speeds up the merge process.

However, I would ask to everybody to also add an post in this section, as before, because the forum is still the primary place where we treat them and it is good to have them all referenced here.

Maybe instead of just your branch name, add a direct link to the pull request on github... This would make the task of merging pretty fast :)

Thanks!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Pull Request HowTo

Post by yorik »

I think there is no need anymore to post here when doing a pull request on github, unless you think there will/should be some discussion about it. Werner and me patrol the github repo often enough now...
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Pull Request HowTo

Post by wmayer »

I agree. If there is not more than a link to the PR then creating a topic here is irrelevant and I find it rather annoying to always look at two places.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Pull Request HowTo

Post by bernd »

ok
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Pull Request HowTo

Post by Kunda1 »

I know this may be a little over the top, but really the fun benefit of this sub-forum was being able to see the activity happen on github because all devs would post their PRs. It would be whimsical and fun but for sure not essential, to have a way to know when someone has sent a PR to the FC repo.
Not sure how. :mrgreen:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: Pull Request HowTo

Post by blacey »

Kunda1 wrote:It would be whimsical and fun but for sure not essential, to have a way to know when someone has sent a PR to the FC repo.
Not sure how. :mrgreen:
1) You can already - just ensure the activity feed is visible in Gitter
2) I thought Kurt was developing an auto-poster that would generate the Pull-request post in the forum.

But, I definitely agree with @yorik that the additional overhead does not provide any real value - if a process step doesn't provide value, it should be eliminated ;)
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Pull Request HowTo

Post by NormandC »

Kunda1, if you get a Github account you can "watch" a git repo and configure email notifications. I get all the Git PRs in my mailbox.
Post Reply