From 05d6e99153ed6d94eb30f46c57609371918a41f3 Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Mon, 13 Nov 2023 17:06:03 +0100 Subject: [PATCH] docs: update "Submit a Pull Request" page (#17712) * update "Submit a Pull Request" page * minor clarifications * keep Conventional Commits info in step 2 * message format is enforced when PR is created Co-authored-by: Milos Djermanovic * pull request number Co-authored-by: Milos Djermanovic --------- Co-authored-by: Milos Djermanovic --- docs/src/contribute/pull-requests.md | 29 +++++++++++----------------- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/docs/src/contribute/pull-requests.md b/docs/src/contribute/pull-requests.md index 44f2378d8dc..57811860375 100644 --- a/docs/src/contribute/pull-requests.md +++ b/docs/src/contribute/pull-requests.md @@ -63,7 +63,7 @@ Longer description here if necessary Fixes #1234 ``` -The first line of the commit message (the summary) must have a specific format. This format is checked by our build tools. +The first line of the commit message (the summary) must have a specific format. This format is checked by our build tools. Although the commit message is not checked directly, it will be used to generate the title of a pull request, which will be checked when the pull request is submitted. The `tag` is one of the following: @@ -91,8 +91,6 @@ fix: Semi rule incorrectly flagging extra semicolon chore: Upgrade Esprima to 1.2, switch to using comment attachment ``` -The commit message format is important because these messages are used to create a changelog for each release. The tag and issue number help to create more consistent and useful changelogs. - ### Step 3: Rebase onto upstream Before you send the pull request, be sure to rebase onto the upstream source. This ensures your code is running on the latest available code. @@ -116,8 +114,6 @@ If there are any failing tests, update your code until all tests pass. With your code ready to go, this is a good time to double-check your submission to make sure it follows our conventions. Here are the things to check: -* Make sure your commit is formatted correctly. -* The pull request must have a description. The description should explain what you did and how its effects can be seen. * The commit message is properly formatted. * The change introduces no functional regression. Be sure to run `npm test` to verify your changes before submitting a pull request. * Make separate pull requests for unrelated changes. Large pull requests with multiple unrelated changes may be closed without merging. @@ -145,27 +141,24 @@ Now you're ready to send the pull request. Go to your ESLint fork and then follo In order to submit code or documentation to an ESLint project, you’ll be asked to sign our CLA when you send your first pull request. (Read more about the Open JS Foundation CLA process at .) +The pull request title is autogenerated from the summary of the first commit, but it can be edited before the pull request is submitted. + +The description of a pull request should explain what you did and how its effects can be seen. + +When a pull request is merged, its commits will be squashed into one single commit. The first line of the squashed commit message will contain the title of the pull request and the pull request number. +The pull request title format is important because the titles are used to create a changelog for each release. The tag and the issue number help to create more consistent and useful changelogs. + ## Following Up Once your pull request is sent, it's time for the team to review it. As such, please make sure to: -1. Monitor the status of the Travis CI build for your pull request. If it fails, please investigate why. We cannot merge pull requests that fail Travis for any reason. +1. Monitor the status of the GitHub Actions CI build for your pull request. If it fails, please investigate why. We cannot merge pull requests that fail the CI build for any reason. 1. Respond to comments left on the pull request from team members. Remember, we want to help you land your code, so please be receptive to our feedback. 1. We may ask you to make changes, rebase, or squash your commits. -### Updating the Commit Message - -If your commit message is in the incorrect format, you'll be asked to update it. You can do so via: - -```shell -git commit --amend -``` - -This will open up your editor so you can make changes. After that, you'll need to do a forced push to your branch: +### Updating the Pull Request Title -```shell -git push origin issue1234 -f -``` +If your pull request title is in the incorrect format, you'll be asked to update it. You can do so via the GitHub user interface. ### Updating the Code