Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > Chef Cookbooks Developer Guide > Developer > Source Control Management Systems > GitHub > Make a Pull Request on GitHub

Make a Pull Request on GitHub

Table of Contents

Objective

To make a "pull request" on GitHub to the owner of an existing cookbook repository so that your code modifications can be merged into the original repository. 

Table of Contents

Overview

One of the key benefits of using a source control management system like GitHub is the ability to share code contributions in the open source community. If you are using ServerTemplates published by RightScale, we encourage you to contribute any helpful additions back to our repository. For example, perhaps you fixed a problem or made some improvements or additions to one of our repositories that you would like us to incorporate into  our main (master) branch so that other users can benefit from your contributions.

Note: In order to submit code submissions to a RightScale repository, you must complete the RightScale Contributors Agreement.

Although, there are several different ways that you can send us your code contributions, the best way for RightScale to merge your changes is by making a pull request by following the steps outlined below. As a general best practice, it's important to only make a pull request for an isolated change instead of making one that includes multiple changes that are unrelated. Generate separate pull requests for each bug fix, feature enhancement, etc.

diag-Fork-Clone-Repo-v2.png

Steps

  1. Log into your GitHub account. (https://github.com)
     
  2. Go to the repository that you want to submit your changes to by making a pull request. For example, if you want to submit an enhancement request that you want RightScale to incorporate into its 'rightscale_cookbooks' repository, navigate to https://github.com/rightscale/rightscale_cookbooks.

  3. Click the Fork button to fork the repository, which creates an editable copy of the repository in your own GitHub account. Note: The forked version will contain all of the repositories contents including branches, commits, etc.
    screen-ForkRepo-v1.png
     
  4. Clone the forked repository on your Chef development machine.
     
  5. Create a feature branch from 'master' and add your changes to the forked repository, which is your own editable copy.
    • git checkout -b my-feature-branch
      
  6. Add and commit your changes to your branch. Be sure to leave a helpful commit message that describes the new feature or change that you made to the codebase.
    • (git commit -am 'Leave helpful description here')
  7. Push the committed changes to the branch.
    • git push origin my-feature-branch
      
  8. You may have a development branch from which you can select the related commits. Remember, you should only add the code modifications that apply to a specific type of feature change.

    diag-PullRequest2RightScale-v1.png
     
  9. From your forked repository, select your branch, which contains the changes that you're going to submit and click the Pull Request button. The original repository that you originally forked from will be highlighted below the current repository's name. (e.g. rightscale/rightscale_cookbooks)
    screen_GitHub-Pull-Request_v3.png
     
  10. Provide a brief description that explains your contribution and why you are making the pull request. Make sure you add "CONTRIB:" in the title of the pull request. Click the Send pull request button to complete the submission. 
    screen_Send-Pull-Request-v5.png
     
  11. The owner of the original repository will receive your pull request notification. The owner can then test and choose whether or not to merge the changes into the original repository.
     
  12. Repeat these steps to make additional pull requests for other code contributions.

 

You must to post a comment.
Last modified
22:06, 16 May 2013

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.