Skip to content

Creating Pull Requests

Geoff Goehle edited this page Jun 17, 2014 · 7 revisions

If you have been following the advice at Coding and Workflow then creating a pull request should be relatively simple.

  1. Make sure your feature branch can be merged cleanly. In other words, pull it's tracking branch (git pull), fix any conflicts, commit the results, and push to your git repository.

  2. Go to the webwork2 repository page in your personal account, select your feature branch from the branch dropdown and click the green button.

  3. Click "Edit" on the pull request bar and change the base of openwebwork/webwork2 to the tracking branch of your feature. I.E. If your feature was created using git checkout -b my-feature-branch origin/develop then make sure you select "develop" as the base for openwebwork.

  4. Review your pull request. In particular take a close look at the file changes.

    • Are all of the changes relevant to your feature? Did anything unexpected sneak in?
    • Do you have any "configuration" changes or changes with hard-coded path? Any site specific code?
    • Are there a reasonable number of changes? Will it be easy for a reviewer to look over your submission?
      Note: If your are adding js libraries to WeBWorK and they are making your pull request hard to read, one solution is to create a new feature branch, just add the js libraries, and submit that pull first. It should be accepted and merged relatively quickly. Afterwards your feature branch will have a much smaller set of changes.
  5. Pick a title for your pull request and write a description. Your description should describe the major changes included in the pull request as well as fairly detailed instructions on how to test to see if the changes are working. The better your description is and the clearer your instructions are the more likely someone will be able to test and merge your pull request in a timely manner.

  6. Double check that the pull request is for the correct branch and submit. Now scroll down to the bottom of the pull request page and check that it can be merged. (The merge button should be green, not grey.) If it can't be merged, pull the target branch into the feature branch, fix any conflicts, and push the changes to your personal git repository.
    Note: It is likely you will need/want to change your pull request after it has been submitted. If you push new commits to your personal git repository they will automatically be integrated into your pull request.

  7. If your pull request is for a hotfix that is being submitted to master then there an extra step. You also need to make a separate pull request from your feature branch to release/x.y. After your hotfix has been accepted and merged into master someone will also merge your hotfix into the release branch. You may be asked to pull release/x.y into your feature branch and fix any conflicts at this time.

After your pull request has been merged you can delete your feature branch. Your changes are part of openwebwork now. All that's left is to sit back and wait for someone to break something. You can sign up for an account with the WeBWorK bug tracking service at http://bugs.webwork.maa.org. Once you have an account you can get bug reports emailed to you by visiting preferences, going to the email preferences tab and clicking "Enable All Mail".