Skip to content

Commit 5f105bb

Browse files
authored
docs: add linking issues guidance to contributing (#818)
1 parent 6addf47 commit 5f105bb

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,31 @@ Format: `type(scope): description`
522522
> [!NOTE]
523523
> The subject must start with a lowercase letter. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
524524
525+
### PR descriptions
526+
527+
If your pull request directly addresses an open issue, use the following inside your PR description.
528+
529+
```text
530+
Resolves | Fixes | Closes: #xxx
531+
```
532+
533+
Replace `#xxx` with either a URL to the issue, or the number of the issue. For example:
534+
535+
```text
536+
Fixes #123
537+
```
538+
539+
or
540+
541+
```text
542+
Closes https://github.com/npmx-dev/npmx.dev/issues/123
543+
```
544+
545+
This provides the following benefits:
546+
547+
- it links the pull request to the issue (the merge icon will appear in the issue), so everybody can see there is an open PR
548+
- when the pull request is merged, the linked issue is automatically closed
549+
525550
## Pre-commit hooks
526551

527552
The project uses `lint-staged` with `simple-git-hooks` to automatically lint files on commit.

0 commit comments

Comments
 (0)