From 6a4ccc0f05905d011010f9ab7798d3f9915d82ab Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 11 May 2017 14:45:46 +0200 Subject: [PATCH] Add a PR review section to CONTRIBUTING.md --- CONTRIBUTING.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6b853ff4..9460c9f71 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,6 +16,7 @@ bug reports and features requests or writing code to add enhancements or fix bug 7. [Source Code Patches](#contributing-patches-source-code) 8. [Documentation Patches](#contributing-patches-documentation) 9. [Contribute CheckCommand Definitions](#contributing-patches-itl-checkcommands) +10. [Review](#contributing-review) ## Introduction @@ -439,3 +440,58 @@ hub pull-request In case developers ask for changes during review, please add them to the branch and push those changes. +## Review + +### Pull Request Review + +This is only important for developers who will review pull requests. If you want to join +the development team, kindly contact us. + +- Ensure that the style guide applies. +- Verify that the patch fixes a problem or linked issue, if any. +- Discuss new features with team members. +- Test the patch in your local dev environment. + +If there are changes required, kindly ask for an updated patch. + +Once the review is completed, merge the PR via GitHub. + +#### Pull Request Review Fixes + +In order to amend the commit message, fix conflicts or add missing changes, you can +add your changes to the PR. + +A PR is just a pointer to a different Git repository and branch. +By default, pull requests allow to push into the repository of the PR creator. + +Example for [#4956](https://github.com/Icinga/icinga2/pull/4956): + +At the bottom it says "Add more commits by pushing to the fix/persistent-comments-are-not-persistent branch on TheFlyingCorpse/icinga2." + +First off, add the remote repository as additional origin and fetch its content: + +``` +git remote add theflyingcorpse https://github.com/TheFlyingCorpse/icinga2 +git fetch --all +``` + +Checkout the mentioned remote branch into a local branch (Note: `theflyingcorpse` is the name of the remote): + +``` +git checkout theflyingcorpse/fix/persistent-comments-are-not-persistent -b fix/persistent-comments-are-not-persistent +``` + +Rebase, amend, squash or add your own commits on top. + +Once you are satisfied, push the changes to the remote `theflyingcorpse` and its branch `fix/persistent-comments-are-not-persistent`. +The syntax here is `git push :`. + +``` +git push theflyingcorpse fix/persistent-comments-are-not-persistent:fix/persistent-comments-are-not-persistent +``` + +In case you've changed the commit history (rebase, amend, squash), you'll need to force push. Be careful, this can't be reverted! + +``` +git push -f theflyingcorpse fix/persistent-comments-are-not-persistent:fix/persistent-comments-are-not-persistent +```