-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(doc): add pull request template #465
Conversation
@spencern @machikoyasuda your thoughts and reviews are welcome |
@zenweasel - What do you think about combining #450 issue with this one? This addition adds a checklist for what both the PR author and the Reviewer should do in specific scenarios. You can add anything else in this section: https://github.com/reactioncommerce/reaction-docs/pull/465/files#diff-1b21683f4fb6eabc842c6aa25ccb5411L48 After this PR is merged, we should update the template in https://github.com/reactioncommerce/reaction/blob/master/.github/pull_request_template.md |
@machikoyasuda Yes, #450 should be combined with this one and we should update the template in the main PR repo. Is this the docs that is linked to when you create a PR? |
@zenweasel Yes, the template and a link back to these docs should be in the PR template. |
@zenweasel @mikemurray The plan is to update https://github.com/reactioncommerce/reaction/blob/master/.github/pull_request_template.md with the content from https://github.com/reactioncommerce/reaction-docs/pull/465/files#diff-1b21683f4fb6eabc842c6aa25ccb5411R34 so that users would see it when they create a PR in We should also link this in https://github.com/reactioncommerce/reaction/blob/master/CONTRIBUTING.md from core too, as it is linked in the README: https://github.com/reactioncommerce/reaction#contribute So.. post-deploy to do list:
|
@machikoyasuda Just wanted to make sure we were updating this stuff.... |
@zenweasel That blue |
@machikoyasuda got it, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much more specific than our current template.
Found some phrasings that are difficult to understand a few other issues - capitalizing Reaction, etc.
developer/contributing.md
Outdated
|
||
## Issue | ||
|
||
Description of the issue this PR is solving, why it's happening and how it can be reproduced. This may differ from the original ticket as you now have more information at your disposal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally like the Oxford comma here.
why it's happening, and how it can be reproduced.
Maybe add a third sentence here to encourage additional information being included? A great PR will include additional information gathered during the process of resolving the ticket that might be helpful to reviewers or other users who might encounter the same problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the solution section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should specifically say something like "you must include all information here so that the PR reviewer can review this PR without reading the original issue". So no "see issues for test instructions"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where best to put this but something like "Failure to follow this template may result in your PR being closed without comment"
developer/contributing.md
Outdated
|
||
## Solution | ||
|
||
Summarize the your solution to the problem, as well as any things you may have tried along the way that may not have worked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part is really important, but it's a hard to follow (the your
, any things
)
What do you think about:
Summarize your solution to the problem. Please include short descriptions of any solutions you tested before arriving at your final solution. This will help reviewers know why you decided to solve this problem in this particular way and will speed up the review process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
developer/contributing.md
Outdated
|
||
## Breaking changes | ||
|
||
- If you have a breaking changes, list them here, otherwise list none. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to give some examples (here or linked) as to what constitutes a breaking change. I'm not sure we have this documented somewhere, but it would be valuable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change example: reactioncommerce/reaction#3331
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
developer/contributing.md
Outdated
|
||
1. Add steps to test this PR | ||
1. Be detailed enough that someone can work through it | ||
1. Avoid being too granular |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to be able to link to a few great example PRs as well, if not from the template itself, then from the contributing guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
catch 22, we'd have to use the template in a PR before we could link it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can combine Be detailed enough so someone can work through it, while not being too granular.
developer/contributing.md
Outdated
|
||
###### Reviewer | ||
|
||
Read over the original ticket, and understand the impact this PR will have on the codebase. If the PR doesn't follow the above template, reject and point the other to this doc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the above template
=> our template
?
point the other to this doc
=> point to this doc
or point the owner to this doc
?
developer/contributing.md
Outdated
|
||
###### PR author | ||
|
||
List any breaking changes that come with this PR. If you have none, then simply put `none`. Examples of breaking changes include changing file names, moving files around, deleting files, renaming functions or exports, or significantly changing code to where previous versions of the app may not work as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be a good enough example list for now. Should we include this in the template? Not sure how verbose the template should be. @machikoyasuda any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth instructing the PR author to ensure that she has migrations or deprecation warnings for any breaking changes that were added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would specifically call out Schema changes as an example of a breaking change
developer/contributing.md
Outdated
|
||
###### Reviewer | ||
|
||
If there are breaking changes, make you'll need to make sure any necessary migrations or guards have been put into place so existing apps do not break. Try testing this PR on an existing version of reaction you may already have data for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reaction
should always be capitalized as a proper noun.
Try testing this PR on an existing version of reaction you may already have data for
is a little difficult to follow.
maybe something like
`Test applying this patch to an existing install of Reaction with existing users, orders, carts, etc. Specifically, test any parts of the app where the breaking change is involved and any data set that is involved in a migration.
developer/contributing.md
Outdated
|
||
###### Reviewer | ||
|
||
Run through the author's steps to verify that it works as they've tested it. Then run through the app on your own as you would test it. Run through the app as many times as you feel comfortable before issuing an approval or a request for changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before issuing an approval or a request for changes
=> before approving or requesting changes`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few notes plus I would suggest reorganizing the last section to keep author and reviewer lists separate.
developer/contributing.md
Outdated
|
||
## Issue | ||
|
||
Description of the issue this PR is solving, why it's happening and how it can be reproduced. This may differ from the original ticket as you now have more information at your disposal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should specifically say something like "you must include all information here so that the PR reviewer can review this PR without reading the original issue". So no "see issues for test instructions"
developer/contributing.md
Outdated
|
||
## Issue | ||
|
||
Description of the issue this PR is solving, why it's happening and how it can be reproduced. This may differ from the original ticket as you now have more information at your disposal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where best to put this but something like "Failure to follow this template may result in your PR being closed without comment"
developer/contributing.md
Outdated
|
||
###### Reviewer | ||
|
||
Read over the original ticket, and understand the impact this PR will have on the codebase. If the PR doesn't follow the our template, reject and point the author of the PR to this doc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by this section. Can we just have one PR Author and one PR Review section rather than these alternating ones? Am I the only one bothered by this? One is a list of drop-dead requirements and one is a list of "things to consider", I'm not sure if they are really equivalent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhere (I can't tell where in this current format) we need to have a checklist of things code reviewers should consider.
- Performance (does the code use best practices for minimizing the load on client and server hardware)
- Concurrency (are data transactions multi-user safe? Am I prevented from accidentally overwriting someone else changes?)
- Security (are permissions being checked everywhere appropriate? Are error messages being sanitized before they reach the client. Are we checking inputs properly wherever we accept client input?)
These are not a comprehensive lists. But we should start compiling them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zenweasel agreed, though those things should not be in the template, they should be in the docs. I would not consider that to be a blocking issue for this PR but something worth adding.
developer/contributing.md
Outdated
###### Reviewer | ||
|
||
Use this information as the basis for your review. If something is not clear here, Reject the PR and ask for clarity. While the original issue may have useful information, the PR should be the most up to date representation if ideas. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "of ideas"
developer/contributing.md
Outdated
|
||
###### PR author | ||
|
||
List the steps needed for testing your change in this section. Assume that testers already know how to start the app, and do the basic setup tasks. Beyond that, the steps should guide users through the feature or fix you've implemented in this PR. Include additional steps if multiple paths are available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Also point out areas where your change may have broken existing functionality and list those areas as well. A good test plan created by the Author is one of the keys to maintaining quality and it's in your interest to make your test plan as complete as possible"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In super big letters "If your PR fails the basic test instructions your PR may be closed and may receive no further consideration". In other words, if you give me one thing to test on your PR, and even that doesn't work, I am not wasting any more time on your PR
developer/contributing.md
Outdated
|
||
###### PR author | ||
|
||
Summarize your solution to the problem. Please include short descriptions of any solutions you tested before arriving at your final solution. This will help reviewers know why you decided to solve this problem in this particular way and will speed up the review process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just "Summarize how you fixed the problem. Please include short descriptions of other things you tried before arriving at your final solution. "
Just to cut down on the repetition of the word "solution"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If you have introduced new dependencies, explain why and how you determined that said dependency was the best solution to the problem."
developer/contributing.md
Outdated
|
||
###### Reviewer | ||
|
||
Use this information to help determine path to test this PR. Research any included packages or techniques that may have been used that you're not familiar with. Ask questions if you're confused. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "determine the path"
Updated based on review requests
Adds a pull request template and details to help improve the quality of PR's into core Reaction.