Skip to content

Instantly share code, notes, and snippets.

@garrettgman
Last active December 6, 2018 19:19
Show Gist options
  • Save garrettgman/ad33749185343e9e77b10117f097a2cd to your computer and use it in GitHub Desktop.
Save garrettgman/ad33749185343e9e77b10117f097a2cd to your computer and use it in GitHub Desktop.
How to make and update a pull request when you are using the web api

To add a recipe or fix a typo in the Tidyverse cookbook, use a pull request. Here's how:

Make a pull request

  1. Visit the chapter of the Tidyverse cookbook that you wish to edit.
  2. Click the icon at the top of the page that looks like this .
  3. If prompted, click the green "Fork this repository and propose changes" button, which looks like this: This will open an editable copy of the chapter file.
  4. Make your changes to the file. If you are adding a recipe, try to match the R Markdown formatting that you see in the other recipes. Realize that your text may be edited later; this is not personal---in fact, it is a luxury.
  5. Scroll down to the Propose file change box, which looks like this: Describe your changes and click "Propose file change."
  6. When prompted, click the green "Create pull Request button, which looks like this:
  7. When the box below appears, add this message to your pull request: CC BY 4.0. This applies the Creative Commons 4.0 International License to your changes, which is required to maintain a uniform license for the book. Then click "Create Pull Request." Congratulations! You have submitted your pull request. Github will ping me and I'll review your edits.

Update a pull request

If I ask you to make changes, you will need to update your pull request. To do this:

  1. Visit the webpage for your pull request. It will be listed here.
  2. Click the name of the branch associated with your pull request. It will be in the spot circled below.
  3. Navigate to the file you need to change.
  4. Click the edit icon at the top of the file to open an editable version of the file. The icon is circled below.
  5. Make your changes.
  6. Scroll down to the Commit changes box, which looks like this: Describe your changes and click "Commit Changes." Congratulations! Your changes will be automatically added to your pull request. They will appear as a second, third, etc. commit on your pull request page:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment