Skip to content

Commit

Permalink
docs: update "Submit a Pull Request" page (#17712)
Browse files Browse the repository at this point in the history
* 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 <milos.djermanovic@gmail.com>

* pull request number

Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>

---------

Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
  • Loading branch information
fasttime and mdjermanovic committed Nov 13, 2023
1 parent eb2279e commit 05d6e99
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions docs/src/contribute/pull-requests.md
Expand Up @@ -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:

Expand Down Expand Up @@ -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<a name="step3"></a>

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.
Expand All @@ -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.
Expand Down Expand Up @@ -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 <https://cla.openjsf.org/>.)

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

Expand Down

0 comments on commit 05d6e99

Please sign in to comment.