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

doc: clarify expectations for PR commit messages #30922

Closed
wants to merge 1 commit into from
Closed

doc: clarify expectations for PR commit messages #30922

wants to merge 1 commit into from

Conversation

DerekNonGeneric
Copy link
Contributor

@DerekNonGeneric DerekNonGeneric commented Dec 12, 2019

Prior to this commit, new contributors were suggested
to use a utility to validate commit messages. Although
not inaccurate, this utility produces misleading results.

  • Remove reference to core-validate-commit
Checklist

The last line in section Step 4: Commit of the Contributing Pull Requests guide suggests using a utility to validate commit messages, namely core-validate-commit. The following is what results when running the tool against a commit that has followed the guide (and even went too far by adding its PR-URL).

disambig

As can be seen in the snip above, the utility produces misleading results that may inadvertently lead new contributors to think that they, themselves are required to include this metadata in their PR's commit message when in reality, omitting this metadata will not cause the CI checks to fail. See how this leads to the confusion experienced here: #30216 (comment).

Although this PR is removing reference to this tool entirely from this document, I hope that it leads to a constructive discussion about a preferred way of making this clarification (if it is deemed that this is not ideal).

/cc @MylesBorins

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Dec 12, 2019
Copy link
Member

@MylesBorins MylesBorins left a comment

Choose a reason for hiding this comment

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

Lgtm

@MylesBorins
Copy link
Member

Fast track?

Prior to this commit, new contributors were suggested
to use a utility to validate commit messages. Although
not inaccurate, this utility produces misleading results.

* Remove reference to `core-validate-commit`
Comment on lines -195 to -197
See [core-validate-commit](https://github.com/nodejs/core-validate-commit) -
A utility that ensures commits follow the commit formatting guidelines.

Copy link
Member

Choose a reason for hiding this comment

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

If we want to keep a reference to core-validate-commit then we should instruct to run with --no-validate-metadata as we do in Travis for pull requests.

npx -q core-validate-commit --no-validate-metadata "${FIRST_COMMIT}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it make sense to set up a make task (phony target) specifically for this scenario?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, the make test target should include a commit tester... though I suspect there are some complications, like only linting the new commit messages, not every one in the history of node.js,and perhaps dealing with fixup commits, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sam-github, are you saying that this check should take place when running the command mentioned in Step 6: Test? If so, simply validating the most recent commit should be all that is necessary as prior commits can be safely assumed to be valid (having already landed in upstream master). It's probably important to keep this discussion within the scope of ensuring a successful process for those following this guide.

@codecov-io
Copy link

Codecov Report

Merging #30922 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #30922   +/-   ##
=======================================
  Coverage   88.31%   88.31%           
=======================================
  Files         184      184           
  Lines       62722    62722           
=======================================
  Hits        55391    55391           
  Misses       7331     7331

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 357a992...4242fba. Read the comment docs.

@gireeshpunathil
Copy link
Member

Keeping the fully qualified reference helps making sure the PR is in good shape, w.r.t commit message; but puts more effort on the contributor's side - especially increases the entry barrier for new comers (needing to install the core-validate-commit module etc.). Preferring content over processes and keeping an aim to foster fast onboarding, I am fine with removing the reference altogether.

@Trott
Copy link
Member

Trott commented Dec 13, 2019

I'm opposed to fast-tracking this. There's no rush and we might as well get it right the first time.

@Trott
Copy link
Member

Trott commented Dec 13, 2019

I'm OK with removing this, but I'd prefer we leave it an add a note that end-users will probably want to run it with --no-validate-metadata to avoid the problem described here.

@Trott
Copy link
Member

Trott commented Dec 13, 2019

Although I find Gireesh's argument compelling, so maybe removing it is really the way to go?

especially increases the entry barrier for new comers (needing to install the core-validate-commit module etc.). Preferring content over processes and keeping an aim to foster fast onboarding, I am fine with removing the reference altogether.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Dec 14, 2019

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 14, 2019
BridgeAR pushed a commit that referenced this pull request Dec 15, 2019
Prior to this commit, new contributors were suggested
to use a utility to validate commit messages. Although
not inaccurate, this utility produces misleading results.

* Remove reference to `core-validate-commit`

PR-URL: #30922
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@BridgeAR
Copy link
Member

Landed in b428140 🎉

@BridgeAR BridgeAR closed this Dec 15, 2019
MylesBorins pushed a commit that referenced this pull request Dec 17, 2019
Prior to this commit, new contributors were suggested
to use a utility to validate commit messages. Although
not inaccurate, this utility produces misleading results.

* Remove reference to `core-validate-commit`

PR-URL: #30922
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 17, 2019
targos pushed a commit that referenced this pull request Jan 14, 2020
Prior to this commit, new contributors were suggested
to use a utility to validate commit messages. Although
not inaccurate, this utility produces misleading results.

* Remove reference to `core-validate-commit`

PR-URL: #30922
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
Prior to this commit, new contributors were suggested
to use a utility to validate commit messages. Although
not inaccurate, this utility produces misleading results.

* Remove reference to `core-validate-commit`

PR-URL: #30922
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants