Skip to content

Commit 4f51930

Browse files
committed
feat: Introduce PR checklist
Update contribution guidelines
1 parent 2e9ba7a commit 4f51930

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

‎.github/pull_request_template.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44

55
# Additional Notes
66

7+
# Contributor Checklist
8+
9+
- [ ] Format the title [according the contribution guidelines](/CONTRIBUTING.md#title-format)
10+
- [ ] Assign the `type:` and (`comp:` or `inst:`) labels in addition to [any usefull labels](/CONTRIBUTING.md#labels)
11+
- [ ] Squash your commits prior merging or merge using GitHub's [Squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits)
12+
- [ ] Don't use `close`, `fix` or any [linking keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) when referencing an issue.
13+
Use `solves` instead, and assign the PR [milestone](https://github.com/DataDog/dd-trace-java/milestones) to the issue
14+
- [ ] Update the [public documentation](https://docs.datadoghq.com/tracing/trace_collection/library_config/java/) in case of new configuration flag or behavior
15+
716
Jira ticket: [PROJ-IDENT]
817

918
<!--

‎CONTRIBUTING.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,48 @@ command line should be Java 8.
8888
to `Add New` -> `Gradle` -> `Environmental Variables`
8989

9090
</details>
91+
92+
## Pull Request Guidelines
93+
94+
### Title Format
95+
96+
Pull request titles should briefly describe the proposed changes in a way that makes sense for the users.
97+
They should be a sentence starting with an infinitive verb, and avoid using prefixes like `[PROD]` or `PROD - ` in favor of [labels](#labels).
98+
99+
>[!CAUTION]
100+
> Don't title:
101+
> * _Another bug fix_: it doesn't describe the change
102+
> * _Span sampling bug fix_: it doesn't start with an infinite verb
103+
> * _Fix off-by-one error from rule parsing_: it doesn't make sense for the user
104+
> * _[CORE] Fix span sampling rule parsing_: it doesn't use label for component tagging
105+
> * _Fix span sampling rule parsing when using both remote config and property config_: it doesn't fit and will be cut during changelog generation
106+
107+
>[!TIP]
108+
> Do instead: _Fix span sampling rule parsing_
109+
110+
>[!NOTE]
111+
> If the changes don't make sense for the users, add the [`tag: no release note` label](#labels).
112+
113+
### Labels
114+
115+
GitHub labels applies to issues and pull requests.
116+
They are used to identify the related components using [the `comp: ` category](https://github.com/DataDog/dd-trace-java/labels?q=comp%3A) or instrumentations using [the `inst: ` category](https://github.com/DataDog/dd-trace-java/labels?q=inst%3A).
117+
118+
Both pull requests and issues should be labelled with at least a component or an instrumentation, in addition to the type of changes using [the `type: ` category](https://github.com/DataDog/dd-trace-java/labels?q=type).
119+
120+
>[!TIP]
121+
> Always add a `comp:` or `inst:` label, and a `type:` label.
122+
123+
Labels are not only used to categorize but also alter the continuous integration behavior:
124+
125+
* `tag: no release note` to exclude a pull request from the next release changelog. Use it when changes are not relevant to the users like:
126+
* Internal features changes
127+
* Refactoring pull requests
128+
* CI and build tools improvements
129+
* Minor changes like typo
130+
* [The `run-tests:` category](https://github.com/DataDog/dd-trace-java/labels?q=run-tests%3A) to run continuous integration tests on a specific JVM in case of JVM specific changes
131+
* `run-tests: flaky` to run the flaky tests on continuous integration as they are disabled by default
132+
133+
>[!NOTE]
134+
> For reference, the [full list of all labels available](https://github.com/DataDog/dd-trace-java/labels).
135+
> If you feel one is missing, let [the maintainer team](https://github.com/orgs/DataDog/teams/apm-java) know!

0 commit comments

Comments
 (0)