Skip to content
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

create PR template #853

Closed
wants to merge 2 commits into from
Closed

create PR template #853

wants to merge 2 commits into from

Conversation

katrinleinweber
Copy link
Contributor

@katrinleinweber katrinleinweber commented Jun 25, 2017

As discussed in #847. I suggest to keep the general discussion about consolidating/streamlining contribution guides there, and continue here only with specific comments about these commits.

Such as 😉 : The template is a bit longer than I hoped (reproduced below). PLMK if you consider something worth dropping or adding.

Preview of the PR template (links modified here to work within without merge)

Hello, and thanks for contributing to Exercism!

In order to help your fellow volunteers, please note the following suggestions. Feel free to [x]-check or remove them afterwards. Use Preview to activate hyperlinks ;-)

  • Please read and apply the Pull Request Guidelines.
  • Please check the contributing guide's Table of Contents and read the relevant sections.
  • Lastly, in case this PR modifies canonical-data.json, please increment its version as detailed here. You can also find more general thoughts on exercise versioning here.

You don't need to get this perfect right away. We'll help getting your pull request merged :-)

@@ -4,5 +4,6 @@ In order to help your fellow volunteers, please note the following suggestions.

- [ ] Please read and apply the [Pull Request Guidelines](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/pull-request-guidelines.md).
- [ ] Please check the [contributing guide's](https://github.com/exercism/problem-specifications/blob/master/.github/CONTRIBUTING.md#contributing) `Table of Contents` and read the relevant sections.
- [ ] Lastly, in case this PR modifies `canonical-data.json`, please increment its version as [detailed here](https://github.com/exercism/problem-specifications#test-data-versioning). You can also find more general thoughts on exercise versioning [here](https://github.com/exercism/problem-specifications/blob/master/.github/CONTRIBUTING.md#exercise-versioning).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please increment its version as detailed here

I strongly dislike the use of "here" because it doesn't make clear what is being linked to.

This is the same idea as that specified in #816 (comment).

Perhaps "please increment its version as detailed in our test data versioning guidelines"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also find more general thoughts on exercise versioning here.

The linked section references track-specific versioning (exercism/discussions#158), not problem-specifications versioning. I don't think the link belongs at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions :-) The 2nd: Done.

About the 1st: Don't all browser show the URL on hovering the mouse pointer over the link text? Because Github-URLs seem very readable to me, I preferred the very version version to duplicating something from the URL in the link text. How about: "please apply our versioning guidelines"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't all browser show the URL on hovering the mouse pointer over the link text?

I imagine so. I don't want to have to hover to find out what a link is about though.

How about: "please apply our versioning guidelines"

seems good!

@petertseng
Copy link
Member

Comment still relevant, even though it is on an outdated.

@petertseng
Copy link
Member

petertseng commented Jun 25, 2017

moving CONTRIBUTING.md is going to break all links to it:

https://github.com/search?q=org%3Aexercism+https%3A%2F%2Fgithub.com%2Fexercism%2Fx-common%2Fblob%2Fmaster%2FCONTRIBUTING.md&type=Code

(Some of those 38 results are false positives, but still a good number)

So then?

  • Leave stub file saying "the file moved"?
  • Make PRs changing all link targets?
  • If github automatically creates a redirect from the old file to the new file since it knows the rename happened, then do nothing (far as I know, the antecedent is false)?
  • Do nothing and accept the broken links?

@katrinleinweber
Copy link
Contributor Author

katrinleinweber commented Jun 26, 2017

The 5th option: not using .github/ ;-)

And @stkent: My apologies about the weird initial labels!

@petertseng
Copy link
Member

Nice idea to not use .github.

To confirm since I wasn't sure: I tested with a new repository and found that PULL_REQUEST_TEMPLATE.md in root (as opposed to .github) does populate a pull request, which is what we want.

I wouldn't have minded keeping PULL_REQUEST_TEMPLATE.md in .github though.

What is your plan with the commits? To squash them all? (If not, I request that the branch be rebased to make the Merge branch 'master' into 847-add-templates unnecessary)

Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content seems good, so I approve if it is going to be squashed.

@katrinleinweber
Copy link
Contributor Author

katrinleinweber commented Jun 27, 2017

I wouldn't have minded keeping PULL_REQUEST_TEMPLATE.md in .github though.

I thought about it, but an extra folder for a single file seemed moot. Maybe when ISSUE_TEMPLATE.md is added, and a feasible way to multiplex the changing of incoming links to CONTRIBUTING.md is found, .github/ would IMHO make sense again.

What is your plan with the commits? To squash them all?

Yes, but as suggested by the track-related PR guidelines 6., I planned to squash my original commits into one, and the "reply-like" later commits into a second one, then force-push that new pair. Or, should I just use Squash and merge here?

@petertseng
Copy link
Member

I planned to squash my original commits into one, and the "reply-like" later commits into a second one

Hmm, interesting idea. I probably have to see the end result to understand.

It might be the case that the first of those two commits moves files into .github, then the second moves them out? Some might argue that this churn is bad to keep in the history. Others say it's good because it is a record that we tried it and didn't like it. I'd have to see it to know what to think.

I am strongly against commits whose commit message is just "Address PR feedback" since they are usually not one logical change and usually don't say what the feedback was. This is not to say that your proposed plan was going to have a commit like that, but it does bring up a related point. It means that dividing the changes based on when they were made sometimes doesn't divide them along logical change boundaries. We should be careful that the division splits the commits into one logical change per commit.

For me personally, I didn't see a need to split into two commits, but it's very possible I missed a good division into two commits that makes sense (so show us!)

@petertseng
Copy link
Member

Katrin Leinweber added 2 commits June 28, 2017 20:15
* omit sub-folder until solution for incoming links is found

* focus on PR instructions on details

* reflect renaming of repo
@katrinleinweber
Copy link
Contributor Author

[…] against […] just "Address PR feedback"

Classical case of "Great minds thing alike." 😉 Strangely this would be "Zwei Dumme, ein Gedanke." in German ("two fools, one thought")... 🤔

since they are usually not one logical change and usually don't say what the feedback was.

Please have a look at d22f38b. IMHO, those minor changes are again easy to comprehend, even without the message body. I am further assuming, that the PR provides the necessary context. It would be linked via the issue #. Should I rather assume, that the PR will become irrelevant and the commit(s) alone should provide the entire rationale?

Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually don't say what the feedback was.

Definitely sufficiently addressed; commit is clear about what is happening!

I think I would personally still not split the commits up in this way because

  1. The second commit having many bullet points still implies that it is doing more than one thing.
  2. I find it unlikely that I would want to revert only the second commit (a benefit of splitting commits up). However, we are unlikely to ever want to bisect this repo, therefore this second point is actually unimportant!

(I personally would still squash into one commit. Using Squash and merge would be interesting, since it keeps the history of the two steps (original, then changes after review) in the PR history but they end up as one commit)

On a related note, given this is not critical it doesn't seem necessary for anyone to be too exacting about how the commits end up being split or not. I wouldn't want to spend too much time on it.

Then again maybe unimportant changes are the most opportune time to discuss such matters, because people will have other things on their minds for more involved changes.

Should I rather assume, that the PR will become irrelevant and the commit(s) alone should provide the entire rationale?

It's helpful to have enough information in the commit messages, since the PR and associated discussion are only available with an internet connection. Obviously it might not be possible to capture everything, but some summary. I don't think anything needs to change here since I think that's sufficiently taken care of already; would you agree?

@katrinleinweber
Copy link
Contributor Author

katrinleinweber commented Jun 29, 2017

Agreed, esp. to unimportant changes are the most opportune time to discuss such matters :-) I'll leave the PR open over the weekend in case others want to leave feedback, then Squash and merge it.

@ anyone: Please feel free to do that yourself, if anyone disagrees about waiting. I understand the risk of new merge conflicts being introduced and will work through them if necessary.

@katrinleinweber katrinleinweber changed the title create .github/ and PR template create PR template Jun 29, 2017
Insti
Insti previously requested changes Jun 30, 2017
Copy link
Contributor

@Insti Insti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @katrinleinweber, I appreciate the time and effort you have put into this, I think you've done a good job of including some of the important things to know about when submitting a pull request.

My opinions:

The changes to the README and the CONTRIBUTING guide should be a separate pull request.

I really don't like the pull request template being used as canonical documentation.

I really don't like the checkboxes in the pull request template due to the way Github treats them as todo lists, this means that we will end up with a lot of pull requests which obscures the ones that really do have pull requests.

The pull request template should include instructions to delete the template text and write a decent pull request message.

@Insti
Copy link
Contributor

Insti commented Jun 30, 2017

It seems like I'm disagreeing with @kytrinyx again :(

@katrinleinweber
Copy link
Contributor Author

Hello @Insti,

thanks for voicing your opposition. I'm open to discussion :-)

Thus: Why do you think that this PR should be split up? Hopefully not only because it touches different files? I feel that the changes across both are logically connected, so even a single commit is arguable (as @stkent has done).

I really don't like the pull request template being used as canonical documentation.

It isn't (yet). It's currently just a link list to such docu. If that should be further streamlined in the future, I'd even argue that 100% of guidelines should be moved into templates. Those (unlike other .md files) appear in the exact moment where PR/issue authors should be aware of them. And any included links to further explanations are just 2 clicks away. IMHO (informed by personal experience though, not empirical data) that's an optimum for both contributor convenience, and effectiveness for the project maintainers. Relying on files somewhere being found, is neither, IMHO.

[…] we will end up with a lot of pull requests which obscures the ones that really do have [check lists].

I valid risk, but IMHO lower than dealing with PRs that didn't adhere to PR guidelines. Also, GitHub can evolve the template mechanism in the future based on usage data.

[…] include instructions to delete the template text and […]

Do I understand correctly, that you think Feel free to […] remove them afterwards is not clear enough? If so, what do you think about […] delete these lines afterwards to focus your final PR on your content? I wouldn't go as far as to spell out the keys and finger movements that effect deletion of text from a text box to GitHub users ;-)

[…] write a decent pull request message.

That's the 1st link in the list, so any additional instructions should go there. Unless of course we set out to continue the further streamlining that you seem to have opposed.

@katrinleinweber katrinleinweber dismissed Insti’s stale review July 3, 2017 15:00

reviewer concerns addressed here and in …issues/847#issuecomment-312607477. Waiting for replies for another few days would be unduly blocking the expressed preference of other reviewers, so I'll merge.

@Insti
Copy link
Contributor

Insti commented Jul 4, 2017

Why do you think that this PR should be split up? Hopefully not only because it touches different files?

Adding a pull request template is fundamentally different from rearranging the documentation. Rearranging the documentation is a less controversial activity and can occur whether or not a pull request template is added.

I really don't like the pull request template being used as canonical documentation.

It isn't (yet). It's currently just a link list to such docu.

Isn't that what this PR is doing? The documentation of how to write a pull request has been extracted from CONTRIBUTING.md and added to a separate PULL_REQUEST_TEMPLATE.md document?

Having documentation about how to write a good pull request is a good idea.

I strongly disagree with adding a pull request template.
The benefits are far outweighed by the drawbacks.

In the Ruby track where we have been experimenting with pull request templates, my experience is that the quality of the pull requests has not improved, and the templates make contributing and reviewing harder due to all the extra checklists and text (which doesn't get deleted) present in the pull requests.

I have read every issue and pull request to this repository for the last year or so,
There have been zero instances where I have though that a pull request template would have improved the quality of the pull request.

There have been a few occasions where pull request messages have been empty or otherwise unhelpful, but these have been dealt with by replying with specific feedback about how it could be improved and the next pull request made by that person is usually much better.

Due to the nature of Exercism, many of the contributors are making their first open source contribution and helping them with specific human guidance is much nicer than a robot response.

Take a look at our [pull request guidelines](#pull-request-guidelines).
You don't need to get it perfect the first time around; we'll work with you to
get the patch merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[…] documentation of how to write a pull request has been extracted from CONTRIBUTING.md and added to a separate PULL_REQUEST_TEMPLATE.md document?

@Insti: I have extracted barely more than links (above & below this comment). The actual advice is still at the link targets. How about not deleting those lines here, but duplicating them in the PR template?

Copy link
Contributor

@Insti Insti Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you have (had) extracted it from CONTRIBUTING.md and moved it into PULL_REQUEST_TEMPLATE.md

I thought that they were still relevant in CONTRIBUTING.md to someone who is reading through that file who might not be making a pull request right now but might want to later.

I would probably suggest creating an explicit "Writing a Pull request" section in CONTRIBUTING.md that contained the relevant information (this may still be a useful change.) and then referring to THAT from the Pull Request Template.

Another possibility would be to greatly simplify the CONTRIBUTING.md file which is linked to in the yellow box, and moving all the information that is not directly related to creating a pull request to a different file.

@katrinleinweber
Copy link
Contributor Author

[…] robot response.

Is there specific wording in my template suggestion that is robotic? I partially copied what was already there and took care to word the new parts in the same friendly manner. I think that the text being inserted automatically is neither more, nor less robotic than currently the automatic display of the yellow contribution guidelines banner.

In the Ruby track where we have been experimenting with pull request templates, my experience is that the quality of the pull requests has not improved, and the templates make contributing and reviewing harder […]

OK, thanks for those details :-) I didn't know that and can now understand your criticism better. Given the other two opinions, I still think it's worth a shot. I won't have any hard feelings against reverting my commits if the experience with testing a PR template in this repo for a few weeks recommends that. Then, you'll either be proven right in another repo, or we'll have established a useful tool in this repo.

Therefore: shall we agree to merge now, but revisit this discussion in a month or two?

@Insti
Copy link
Contributor

Insti commented Jul 5, 2017

Meta: @katrinleinweber I value your contributions and appreciate that you have invested time in putting together this PR. I believe we both have the best interests of the Exercism project we just have different perspectives on how that can be achieved. ❤️

Back to Discussion:

What is the problem that this PR is trying to solve?

To me it seems like it is: "Github has Pull Request templates and we are not using them." and my answer to that is it is because we don't need them.

What if we were to not merge it and you were to monitor all pull requests for the next two months and identify those for which you thought might have been improved by a pull request template, and what percentage of all requests that is?

@petertseng
Copy link
Member

petertseng commented Jul 5, 2017

Kind of makes one wish one had a way to customise the message that displays on the Open a pull request page rather than "Before you create a pull request, please review the guidelines for contributing to this repository."

This template would have had the effect of showing the information in-line, but had the disadvantage of, by default, leaving a message directed toward the submitter in the PR body, whereas the PR body should be directed toward reviewers. Hence why it is necessary to ask the submitter to delete the message, right?

I won't be expressing an opinion/speculation on whether these instructions (independent of how they are presented) are likely to improve pull request quality, since I don't know.

@catb0t
Copy link
Contributor

catb0t commented Jul 5, 2017

@petertseng's suggestion actually might be something for @kytrinyx to bring up with the GitHub team, and we could have it perhaps ?

@kytrinyx
Copy link
Member

kytrinyx commented Jul 5, 2017

I don't have any suggestive powers at GitHub, but if I find the right people I'll bring it up.

@kytrinyx
Copy link
Member

kytrinyx commented Jul 5, 2017

One of my colleagues said:

That's definitely something I've run into also. The best practice I've settled on is that if it is something for the submitter, put it in an HTML comment <!-- Have you run Atom in Safe Mode? You might want to check that before submitting an issue -->

@katrinleinweber
Copy link
Contributor Author

I'm also asking myself, whether a PR template would prevent the yellow banner from appearing? I agree with @stkent that tweaking that banner would be most desirable. Hopefully, a GH update will deliver such improvement.

@Insti No worries <3 This is extremely educational. However, it would be more so, if you replied to my answers to some of your minor counter-arguments ;-) I agree that our main disagreement will probably only be resolved by observing PR quality over time, with our without merging this.

Which I BTW will not do; somebody else please decide that, or close this. I'll stick to smaller topics.

@kytrinyx
Copy link
Member

kytrinyx commented Jul 6, 2017

I've gone back and forth on this one, and I think that I'd like to suggest the following:

  1. close this without merging
  2. keep an eye on the pull requests in the repo over the next couple of months
  3. create canned replies for repeated requests
  4. once we see the patterns, write bots to address the most common issues

I think automation is probably a more effective approach than asking people to read stuff. Especially if we're going to complain about stuff :) People tend to not take bots personally.

@Insti
Copy link
Contributor

Insti commented Jul 6, 2017

@katrinleinweber

it would be more so, if you replied to my answers to some of your minor counter-arguments

Sure, which ones in particular?

@katrinleinweber
Copy link
Contributor Author

@Insti
Copy link
Contributor

Insti commented Jul 6, 2017

Insti: Due to the nature of Exercism, many of the contributors are making their first open source contribution and helping them with specific human guidance is much nicer than a robot response.

katrinleinweber: Is there specific wording in my template suggestion that is robotic?

No, not particularly. What you wrote was fine and friendly.

The checkboxes maybe, as every PR would need to tick them off to acknowledge that they'd done them, rather than just reading them. The PR template also applies to experienced committers who HAVE read these documents (and in many cases wrote them.)

I was using this as a general principle about how we might want to treat contributors.
Some repositories have actual bots that will respond to pull requests. And I was suggesting that we don't want to go in that direction. (However @kytrinyx's point 4 above seems to suggest the opposite, so I might need to argue against that if it becomes relevant in the future.)

@Insti
Copy link
Contributor

Insti commented Jul 6, 2017

Ok, I hope I've answered those 2 satisfactorily, let me know if there's anything else,
I am happy to answer any other questions.

@petertseng petertseng deleted the 847-add-templates branch July 6, 2017 23:36
emcoding pushed a commit that referenced this pull request Nov 19, 2018
All exercises: Update generators and regenerate tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants