Skip to content

Commit 14169ab

Browse files
authored
[infra] Contribution and PR docs (dart-lang#3099)
1 parent f08a85b commit 14169ab

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
Thanks for filing a pull request!
3+
-->
4+
5+
## Description
6+
7+
*Replace this paragraph with a description of what this PR is changing or adding, and **why**. The 'why' is the most important part of the description.*
8+
9+
## Related Issues
10+
11+
*List which issues are fixed by this PR. Use the syntax `Fixes #1234`.*
12+
13+
## PR Checklist
14+
15+
- [ ] I’ve reviewed the [contributor guide](https://github.com/dart-lang/native/blob/main/CONTRIBUTING.md) and applied the relevant portions to this PR.
16+
- [ ] I've run `dart tool/ci.dart --all` locally and resolved all issues identified. This ensures the PR is formatted, has no lint errors, and ran all code generators. This applies to the packages part of the toplevel `pubspec.yaml` workspace.
17+
- [ ] All existing and new tests are passing. I added new tests to check the change I am making.
18+
- [ ] The PR is actually solving the issue. PRs that don't solve the issue will be closed. Please be respectful of the maintainers' time. If it's not clear what the issue is, feel free to ask questions on the GitHub issue before submitting a PR.
19+
- [ ] I have updated `CHANGELOG.md` for the relevant packages. (Not needed for small changes such as doc typos).
20+
- [ ] I have [updated the pubspec package version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change) if necessary.

‎CONTRIBUTING.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ You generally only need to submit a CLA once, so if you've already submitted one
1616
(even if it was for a different project), you probably don't need to do it
1717
again.
1818

19+
## Solving Issues
20+
21+
Each PR should aim to solve a specific issue. If the issue's requirements are
22+
unclear, please ask for clarification on the GitHub issue before submitting a PR.
23+
24+
PRs that do not actually solve the issue will be closed. Please be respectful of
25+
the maintainers' time.
26+
1927
## Code Reviews
2028

2129
All submissions, including submissions by project members, require review. We
@@ -31,6 +39,34 @@ The Dart source code in this repo follows the:
3139

3240
You should familiarize yourself with those guidelines.
3341

42+
## Continuous Integration (CI)
43+
44+
Before submitting a PR, ensure that you have run the CI script locally:
45+
46+
```bash
47+
dart tool/ci.dart --all
48+
```
49+
50+
CI scripts in this repository do not run on pull requests from external
51+
contributors until a maintainer approves the run. To reduce roundtrip times
52+
and ensure your PR is ready for review, it is important to run the CI script
53+
locally before pushing.
54+
55+
This script will run:
56+
- Static analysis (`dart analyze`)
57+
- Code formatting check (`dart format`)
58+
- Code generation scripts
59+
- Tests (`dart test`)
60+
- API surface checks (`dart_apitool`)
61+
62+
## Changelog and Versioning
63+
64+
Most changes should add an entry to the `CHANGELOG.md` of the affected packages.
65+
Small changes such as documentation typos do not require a changelog entry.
66+
67+
When making a functional change, you may also need to [update the pubspec package
68+
version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change).
69+
3470
## File headers
3571

3672
All files in the Dart project must start with the following header; if you add a
@@ -52,6 +88,9 @@ We pledge to maintain an open and welcoming environment. For details, see our
5288

5389
## Tests
5490

91+
Every PR that adds a feature or fixes a bug should include corresponding tests.
92+
All existing and new tests must pass.
93+
5594
Packages `hooks`, `code_assets`, `data_assets`, `hooks_runner`, and
5695
`native_toolchain_c` roll into the Dart SDK. The tests of these packages are run
5796
on the Dart SDK in [a different

0 commit comments

Comments
 (0)