-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add PR template #146
Add PR template #146
Conversation
.github/PULL_REQUEST_TEMPLATE.md
Outdated
|
||
- [ ] Does your PR title ends with #xyz where xyz is the issue number you are trying to resolve? | ||
|
||
- [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? |
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.
should we enable branch protection instead of requesting this?
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.
You can protect the master branch against force push, but this simply tells the contributor to rebase against the latest master branch. This is there to ensure that the PR can be merged without conflicts.
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 master
branch in JanusGraph is already protected against forced pushes, and @kottmann makes a good point that this is orthogonal — we need to make sure it will be a clean merge.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
- [ ] Is your initial contribution a single, squashed commit? | ||
|
||
### For code changes: | ||
- [ ] Have you ensured that the full suite of tests is executed via mvn clean install at the root janusgraph folder? |
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.
-1 CI will catch this, it's automated
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 general I believe it is good to run the test locally before sending a PR. I will remove this line.
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.
Travis does not currently run core tests in all modules reliably and doesn't run TinkerPop tests at all. Where relevant I think PRs should include a description of the modules tested and which suites were run. Otherwise relevant modules should be tested as part of the PR review.
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 recently delivered via PR #106 a development process doc. I wonder how what is here relates to that doc.
A side question. Where the development process doc would show up to users? Is there a link to it?
https://github.com/JanusGraph/janusgraph/blob/master/docs/development.txt
@jerryjch You need to explain to contributors how things are done here. Most projects have this document on their website and not in their reference documentation. Currently - for someone new- that is the CONTRIBUTING.md file, I would strongly suggest to consolidate this or reference from there to the development.txt file. Thew new .github/CONTRIBUTING.md (which the user is pointed to during the creation of his PR) currently points to the old CONTRIBUTING.md which I renamed to getting involved. I think the PR template aligns nicely with your development.txt. So it repeats things and has some additional items (e.g. about LICENSE). |
Ok @kottmann , sounds reasonable. |
Anything I should change here? |
+1 LGTM @jerryjch do you have a vote on this? |
.github/PULL_REQUEST_TEMPLATE.md
Outdated
- [ ] Is there an issue associated with this PR? Is it referenced | ||
in the commit message? | ||
|
||
- [ ] Does your PR title ends with #xyz where xyz is the issue number you are trying to resolve? |
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.
Instead of putting it in the title, please put the issue # in the body. I've edited a few issues that do the former to do the latter, and here's why:
-
if the issue # is in the title, it looks confusing, because GitHub also appends the issue # to the title, so it looks like
this PR addresses issue #A #B
where #A is the issue you're addressing and #B is the auto-assigned number for this PR. -
the
#A
in the title is not auto-linked, so you can't click on it to visit the issue -
the issue
#A
does not automatically get a reference to the fact that PR #B is going to address it
In contrast, if you put addresses issue #A
into the PR body, all of the above caveats are reversed.
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.
Hmm, I looked at one of my private repositories and didn't see what you describe here.
If the issue is in the title/subject line it is shown in the commit history only once. If it is in the body the title doesn't contain the issue number. We have to be careful, this speaks about the git commit message not the title of the PR on Github.
The issue number in the title is also click-able and linked.
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 talking about this:
Does your PR title ends with #xyz where xyz is the issue number you are trying to resolve?
I am saying that putting the issue # at the end of a PR title is confusing, because of the reasons above: it's not auto-linked, and GitHub appends the PR # to the end, so there are two numbers in the title: the issue it's addressing, and the PR itself.
I am suggesting that instead of putting the issue # in the PR title, we put it in the PR description instead, which addresses all of the above issues. Having it in the commit also makes sense, but that's not what I'm referring to.
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.
Ok, I misunderstood you here, after my last change it now says "PR body" instead of "PR title".
.github/PULL_REQUEST_TEMPLATE.md
Outdated
|
||
- [ ] Does your PR title ends with #xyz where xyz is the issue number you are trying to resolve? | ||
|
||
- [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? |
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.
Please add code formatting to master: master
.github/PULL_REQUEST_TEMPLATE.md
Outdated
### For all changes: | ||
- [ ] Is there an issue associated with this PR? Is it referenced | ||
in the commit message? | ||
|
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.
Drop blank line?
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.
A line should end on a line feed. Are you sure you want it dropped? A few tools work a tiny bit nicer when there is a new line at the end of the file, e.g. no git "No newline at end of file" message in diffs, adding a line won't change the last line, etc.
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 is not the end of a file, there are other items in this list below. Also, I noticed in a different list, there were no blank lines between items, so I figured we may want to be consistent.
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.
Right, then let me fix this.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
in the commit message? | ||
|
||
- [ ] Does your PR title ends with #xyz where xyz is the issue number you are trying to resolve? | ||
|
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.
Drop blank line?
.github/PULL_REQUEST_TEMPLATE.md
Outdated
- [ ] Is your initial contribution a single, squashed commit? | ||
|
||
### For code changes: | ||
- [ ] Have you written or updated unit tests to verify your 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.
or -> and/or
Could be both add new ones and update existing ones.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered? | ||
|
||
### Note: | ||
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon 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.
s/travis-ci/Travis CI/
README.md
Outdated
@@ -31,5 +31,5 @@ The [project homepage](http://janusgraph.org) contains more information on Janus | |||
|
|||
## Contributing | |||
|
|||
Please see [`CONTRIBUTING.md`](CONTRIBUTING.md) for more information, including |
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.
Why are we renaming CONTRIBUTING.md
to GETTING_INVOLVED.md
?
If there's a file called CONTRIBUTING
or CONTRIBUTING.md
at the root of the repo, GitHub handles it specially by auto-linking it.
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 CONTRIBUTING.md file is the one shown to the user when submitting a PR, I renamed the existing one to GETTING_INVOLVED.md and added a new CONTRIBUTING.md (part of this PR). Maybe have a look at both versions and see if you think it makes sense as well.
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.
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.
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.
https://github.com/blog/2111-issue-and-pull-request-templates specifically notes that you can keep the PR and issue template files in .github
subdir to keep the root of the repo leaner by having fewer files there.
I would like to propose:
CONTRIBUTING.md
stays at the root of the repo because it's generally useful to everyone- PR and issue template files go into
.github
because they're GitHub-specific workflow items
In the https://github.com/JanusGraph/janusgraph/blob/master/docs/development.txt, we have: |
@jerryjch PR 159 is a bad example, he didn't squash the commits, the commit message is not containing the issue number, and his subject line (first line of commit message) is too long. @mbrukman I couldn't see the behaviour on Github regarding the issue number in the title like you described it. Issue number was only shown once and behaved like expected. Anyway, just decide how you prefer it, in case you want to issue number in the body I will change the development.txt with this PR as well to get it unified. |
Ok, I should have been more clear. I meant the "Issue 155: ..." format on PR #159 |
@mbrukman now all your feedback should be addressed. |
.github/PULL_REQUEST_TEMPLATE.md
Outdated
- [ ] Is there an issue associated with this PR? Is it referenced in the commit message? | ||
- [ ] Does your PR body contains #xyz where xyz is the issue number you are trying to resolve? | ||
- [ ] Has your PR been rebased against the latest commit within the target branch (typically ```master```)? | ||
- [ ] Is your initial contribution a single, squashed commit? |
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.
Is this saying it's necessary to have a single squashed commit for all PRs? I think it is sometimes helpful to separate out commits. Examples include multiple authors collaborating on a PR, separating documentation and formatting updates from feature updates and more generally for larger features where the work has been broken up into meaningful commits.
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.
Considering the difficulty we had merging a large CR in the past (we made sure to give @dylanht credit), it does make sense to allow multiple commits sometimes. Seems that it would make sense for hosted branches (major feature branches) more than PR by individuals.
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.
took a look
.github/PULL_REQUEST_TEMPLATE.md
Outdated
- [ ] Is there an issue associated with this PR? Is it referenced in the commit message? | ||
- [ ] Does your PR body contains #xyz where xyz is the issue number you are trying to resolve? | ||
- [ ] Has your PR been rebased against the latest commit within the target branch (typically ```master```)? | ||
- [ ] Is your initial contribution a single, squashed commit? |
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.
Considering the difficulty we had merging a large CR in the past (we made sure to give @dylanht credit), it does make sense to allow multiple commits sometimes. Seems that it would make sense for hosted branches (major feature branches) more than PR by individuals.
README.md
Outdated
@@ -31,5 +31,5 @@ The [project homepage](http://janusgraph.org) contains more information on Janus | |||
|
|||
## Contributing | |||
|
|||
Please see [`CONTRIBUTING.md`](CONTRIBUTING.md) for more information, including |
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.
@kottmann It looks like there are just a couple remaining issues on this. If it's alright with you I can add another commit to your branch to address the remaining requests. |
@sjudeng this also needs to be rebased |
@mbrukman, @amcp can you review this again? GitHub does allow the files to be rooted in .github to avoid clutter (see this post) but I moved everything back to the project root for now and we can revisit whether to move things under .github separately. @amcp I merged to avoid needing to force push and overwrite the original commit. @kottmann feel free to rebase and squash. |
@sjudeng let me squash and rebase what is here now |
PULL_REQUEST_TEMPLATE.md
Outdated
|
||
### For all changes: | ||
- [ ] Is there an issue associated with this PR? Is it referenced in the commit message? | ||
- [ ] Does your PR body contains #xyz where xyz is the issue number you are trying to resolve? |
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.
s/contains/contain/
"Does ... contain"
PULL_REQUEST_TEMPLATE.md
Outdated
### For all changes: | ||
- [ ] Is there an issue associated with this PR? Is it referenced in the commit message? | ||
- [ ] Does your PR body contains #xyz where xyz is the issue number you are trying to resolve? | ||
- [ ] Has your PR been rebased against the latest commit within the target branch (typically ```master```)? |
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.
For single-line code font, please use a single backtick, not triple (that's only for multiline).
PULL_REQUEST_TEMPLATE.md
Outdated
### For code changes: | ||
- [ ] Have you written and/or updated unit tests to verify your changes? | ||
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? | ||
- [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file in janusgraph folder? |
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 we're being specific, should this be s/LICENSE/LICENSE.txt/ ?
Similarly for s/NOTICE/NOTICE.txt/ on the next line.
PULL_REQUEST_TEMPLATE.md
Outdated
### For code changes: | ||
- [ ] Have you written and/or updated unit tests to verify your changes? | ||
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? | ||
- [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file in janusgraph folder? |
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.
By "in janusgraph folder", does this mean "root of this repository"? I understand git clone
would create the janusgraph
folder, but that's a user specified name, so it may be ambiguous, but root of the repo probably isn't.
Similarly on the next line.
PULL_REQUEST_TEMPLATE.md
Outdated
@@ -0,0 +1,23 @@ | |||
Thank you for contributing to JanusGraph. |
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.
To avoid adding yet more files to the root of the repo, what about moving this file to a .github
subdirectory, since this is a GitHub-specific workflow? We might also add an ISSUE_TEMPLATE.md
in the future, so this will help keep the root of the repo leaner.
https://github.com/blog/2111-issue-and-pull-request-templates says both top-level files and files in .github
are supported.
I would recommend keeping CONTRIBUTING.md
at the root of the repo since it's independent of GitHub and applicable to everyone.
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.
@mbrukman It was originally in .github but was moved back as part of review (see this comment and this comment). I'm okay with changing it back if that makes more sense.
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.
Sorry, missed the original thread at the time it was pointed out, and looks like it wasn't quite resolved with a consensus. Added a comment on that thread as well with my proposal.
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.
Should I move the PULL_REQUEST_TEMPLATE.md back into the .github folder?
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.
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.
Committer of one or more commits is not listed as a CLA signer, either individual or as a member of an organization. |
@kottmann — the CLA bot is really pedantic, and you're using a combination of "Joern Kottmann" and "Jörn Kottmann" as your name as "author" and "committer", but only one of them is listed in the CLA signers file. I'm happy to add the second spelling of your name to the CLA file to fix this problem going forward, if you'd like. Alternatively, you'll have to be really careful about using a single spelling of your name everywhere, which is probably more trouble than it's worth, given that both of those are equally valid. |
@mbrukman sorry for that, please add the second spelling to the file, to speed things up here I changed author and comitter to "Joern Kottmann". |
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.
Minor comment about the new path (as a result of moving the file). Thanks!
CONTRIBUTING.md
Outdated
@@ -159,6 +163,8 @@ Go to the [JanusGraph repository](https://github.com/JanusGraph/janusgraph) and | |||
you should see that it will offer you a chance to compare your recently-pushed | |||
branch to the current `master` of JanusGraph and subit a PR at the same time. | |||
|
|||
Review the [PR check list](PULL_REQUEST_TEMPLATE.md) for criteria for acceptable contributions. |
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 should now point to the new location of the file under .github
.
@kottmann If you push another update can you add |
[skip ci]
Add PR template
Add PR template
Addresses issue #139.