8000 docs: update contribution guide and pull request template (#6664) · biomejs/biome@cb63f8c · GitHub
[go: up one dir, main page]

Skip to content

Commit cb63f8c

Browse files
ematipicoarendjr
andauthored
docs: update contribution guide and pull request template (#6664)
Co-authored-by: Arend van Beelen jr. <arend@arendjr.nl>
1 parent eb62b71 commit cb63f8c

File tree

2 files changed

+38
-14
lines changed

2 files changed

+38
-14
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111

1212
<!-- Link any relevant issues if necessary or include a transcript of any Discord discussion. -->
1313

14+
<!-- If you create a user-facing change, please write a changeset: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#writing-a-changeset (your changeset is often a good starting point for this summary as well) -->
15+
1416
## Test Plan
1517

1618
<!-- What demonstrates that your implementation is correct? -->
19+
20+
## Docs
21+
22+
<!-- If you're submitting a new rule or action (or an option for them), the documentation is part of the code. Make sure rules and actions have example usages, and that all options are documented. -->
23+
24+
<!-- For other features, please submit a documentation PR to the `next` branch of our website: https://github.com/biomejs/website/. Link the PR here once it's ready. -->

CONTRIBUTING.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,12 @@ We are using [action-semantic-pull-request](https://github.com/amannn/action-sem
365365
When creating a new pull request, it's preferable to use a conventional commit-formatted title, as this title will be used as the default commit message on the squashed commit after merging.
366366
See the [dedicated section](#commit-messages) about conventional commit format.
367367

368-
Please use the template provided.
368+
When creating a PR, follow the following instructions:
369+
- if you fix a bug (code or documentation), send a PR to the maintenance branch `main`.
370+
- if you add a **new nursery rule**, send a PR to the maintenance branch `main`. Nursery rules don't follow semantic versioning.
371+
- if you promote a rule from nursery, send a PR to the `next` branch.
372+
- if you implement a new feature that affects end users, send a PR to the `next` branch.
373+
- if you implement a new feature that _doesn't affect end users_, send a PR to the maintenance `main` branch.
369374

370375
### Changelog
371376

@@ -408,26 +413,29 @@ We are very strict about `major` changes in the `@biomejs/biome` package. To bet
408413
- `minor`: new features available to the users.
409414
- `major`: a change that breaks a user API.
410415

416+
When choosing `minor` or `major`, make sure your PR targets the `next` branch instead of `main`.
417+
411418
#### Writing a changeset
412419

413420
The description of the changeset should follow the these guidelines:
414421

422+
- Our changesets should be about _user-facing_ changes. Internal changes don't
423+
need changesets.
415424
- Use the past tense when describing what you did, e.g. "Added new feature", "Fixed edge case".
416425
- Use the present tense when describing Biome behavior, e.g. "Biome now supports ...".
417-
- If you fixed a bug, please add the link to the issue, e.g. "Fixed [#4444](https://github.com/biomejs/biome/issues/4444)".
426+
- If you fixed a bug, please start with a link to the issue, e.g. "Fixed [#4444](https://github.com/biomejs/biome/issues/4444): ...".
418427
- If you reference a rule, please add the link to the rule on the website, e.g. "Added the rule [`useAwesomeThing`](https://biomejs.dev/linter/rules/use-awesome-thing/)" (even if the website isn't updated yet, the URL is pretty predictable...).
419428
- Similarly, if you reference an assist, please add the link to the assist on the website, e.g. "Added the assist [`awesomeAction`](https://biomejs.dev/assist/actions/awesome-action/)".
420-
- Whenever applicable, add a code block to show your new changes. For example, for a new
421-
rule you might want to show an invalid case, for the formatter you might want to show
422-
how the new formatting changes, and so on.
423-
- End each sentence with fullstops.
429+
- Whenever applicable, add a code block to show your new changes. For example, for a new rule you should show an invalid case, while for the formatter you should show how the new formatting changes, and so on.
430+
- End every sentence with a full stop (`.`).
424431

425432
If in doubt, take a look at existing or past changesets.
426433

427434
### Documentation
428435

429-
If your PR requires some update on the website (new features, breaking changes, etc.), you should create a new PR once the previous PR is successfully merged.
430-
When adding new features, the documentation should be part of a new PR, which will be merged right before the release.
436+
If your PR involves new features, or changes to existing features, documentation must be updated as well. For rules, assists, and their options, this is done using inline [rustdoc](https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html) documentation.
437+
438+
When other documentation updates are required, such as new formatter options, a PR should be created against the `next` branch of [our website](https://github.com/biomejs/website/). When doing so, please link the documentation PR from the PR that introduces the feature.
431439

432440
### Versioning
433441

@@ -446,24 +454,32 @@ Even minor versions are dedicated to official releases, e.g. `*.6.*`.
446454

447455
### Regular releases
448456

449-
When releasing a new version of a Biome, follow these steps:
457+
When releasing a new **minor** or **major** version of a Biome, follow these steps:
458+
459+
1. [ ] Create a PR from `next` to `main`. Make sure that code conflicts are fixed and the new features have relative docs PR.
460+
461+
1. [ ] Merge `next` to `main`.
450462

451463
1. [ ] **Update to the same `version` in all crates** if you publish crates, if applicable. (`Cargo.toml` and `crates/**/Cargo.toml`)
452464

453465
1. [ ] Linter rules have a `version` metadata directly defined in their implementation.
454-
This field is set to `next` for newly created rules.
466+
This field is set to `"next"` for newly created rules.
455467
This field must be updated to the new version.
456468

457-
1. [ ] Merge the PR `ci: release`, and the release workflow will run. Once these workflows finish compiling the final artefact, **they need to be approved manually** by a member of the **Core Contributors**.
469+
1. [ ] Merge the `ci: release` PR, and the release workflow will run. Once these workflows finish compiling the final artefact, **they need to be approved manually** by a member of the **Core Contributors**.
458470

459-
1. [ ] In the [website repository](https://github.com/biomejs/website), merge `next` into `main` with a PR. Usually, `next` contains the docs of new rules/actions. As well as the docs of new options.
460-
461-
1. [ ] Open a new PR in the [website repository](https://github.com/biomejs/website) to update the website with the new version number:
471+
1. [ ] Update the generated documentation in the `next` branch of the [website](https://github.com/biomejs/website):
462472
`BIOME_VERSION=<version> pnpm run codegen:all`.
463473
This will also copy the configuration schema in the right place.
464474

475+
1. [ ] Merge the website's `next` branch into `main` with a PR. Once merged, the documentation will automatically deploy.
476+
465477
1. [ ] After releasing a major version number, you may want to update the `update-preview-version.mjs` script to make sure that future previews indicate a version number with a higher patch version than is currently indicated in the `package.json` manifests.
466478

479+
1. [ ] Make sure you create new `next` branches for both the main repository and the website.
480+
481+
**patch** releases only require a merging of the `ci: release` PR, and should leave the `next` branches untouched.
482+
467483
## Resources
468484

469485
We have several resources explaining about Biome. They will help you understand the project and codebase.

0 commit comments

Comments
 (0)
0