Skip to content

Commit ed3fcae

Browse files
committed
Add a section about AI usage in contributions.
Also fixed various grammar and style complaints by IntelliJ.
1 parent 7cbe071 commit ed3fcae

File tree

1 file changed

+42
-22
lines changed

1 file changed

+42
-22
lines changed

CONTRIBUTING.adoc

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
First off, thank you for taking the time to contribute!
44
👍 🎉
5+
56
[[code-of-conduct]]
67
== Code of Conduct
78

@@ -11,15 +12,17 @@ Please report unacceptable behavior to [email protected].
1112

1213
[[using-github-issues]]
1314
== Using GitHub Issues
15+
1416
We use GitHub issues to track bugs and enhancements.
15-
If you have a general usage question please ask on https://stackoverflow.com[Stack Overflow].
17+
If you have a general usage question, please ask on https://stackoverflow.com[Stack Overflow].
1618
The Spring Data team and the broader community monitor the https://stackoverflow.com/tags/spring-data[`spring-data`] tag.
1719

1820
If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible.
1921
Ideally, that would include a small sample project that reproduces the problem.
2022

2123
== Reporting Security Vulnerabilities
22-
If you think you have found a security vulnerability in Spring Data please *DO NOT* disclose it publicly until we've had a chance to fix it.
24+
25+
If you think you have found a security vulnerability in Spring Data, please *DO NOT* disclose it publicly until we've had a chance to fix it.
2326
Please don't report security vulnerabilities using GitHub issues, instead head over to https://spring.io/security-policy and learn how to disclose them responsibly.
2427

2528
[[how-to-contribute]]
@@ -28,7 +31,7 @@ Please don't report security vulnerabilities using GitHub issues, instead head o
2831
[[security-vulnerabilities]]
2932
=== Reporting Security Vulnerabilities
3033

31-
If you think you have found a security vulnerability in Spring Data please **DO NOT** disclose it publicly until we’ve had a chance to fix it.
34+
If you think you have found a security vulnerability in Spring Data, please **DO NOT** disclose it publicly until we’ve had a chance to fix it.
3235
Please don’t report security vulnerabilities using GitHub issues, instead head over to https://pivotal.io/security and learn how to disclose them responsibly.
3336

3437
[[discuss]]
@@ -47,10 +50,10 @@ For the impatient, if you want to submit a quick pull request (polishing, trivia
4750

4851
1. API changes require discussion, use cases, etc.
4952
Code comes later.
50-
Create a issue in the GitHub issue tracker and stop here.
53+
Create an issue in the GitHub issue tracker and stop here.
5154
In every other case continue with step 2.
5255
2. Make sure you use the code formatters provided https://github.com/spring-projects/spring-data-build/tree/main/etc/ide[here] and have them applied to your changes.
53-
Don't submit any formatting related changes.
56+
Don't submit any formatting-related changes.
5457
3. Make sure you submit test cases (unit or integration tests) that back your changes.
5558
4. Try to reuse existing test sample code (domain classes).
5659
Try not to amend existing test cases but create new ones dedicated to the changes you're making to the codebase.
@@ -64,7 +67,7 @@ void yourTestMethod() { … }
6467
----
6568
+
6669
6. Make sure you added yourself as author in the headers of the classes you touched.
67-
Amend the date range in the Apache license header if needed.
70+
Amend the date range in the Apache License header if needed.
6871
For new types, add the license header (copy from another file and set the current year only).
6972
7. Make sure you follow the <<commit-messages>> guidelines.
7073
8. Make sure you provide your full name and an email address registered with your GitHub account.
@@ -95,8 +98,8 @@ For more details read https://asciidoctor.org/docs/editing-asciidoc-with-live-pr
9598

9699
The commit message should follow the following style:
97100

98-
* First line contains the summary starting with a capital letter.
99-
* Finish summary with a dot.
101+
* The first line contains the summary starting with a capital letter.
102+
* Finish the summary with a dot.
100103
* In the description, don't use single line breaks.
101104
No manual wrapping.
102105
Separate paragraphs by a blank line.
@@ -115,6 +118,20 @@ Closes #?? (optionally close tickets)
115118
Related tickets #??? (optionally refer to related tickets)
116119
----
117120

121+
=== Use of AI
122+
123+
It is ok to use AI to help you shape your contribution.
124+
We (hopefully) can't tell the difference anyway.
125+
You are still responsible for everything you commit, push, submit, or otherwise contribute to this project.
126+
127+
Unfortunately, we lately encountered an increased amount of contribution where we could tell the difference.
128+
These suffered from extreme cases of "AI slop".
129+
Descriptions that could have been a handful sentences stretched for pages and pages.
130+
Sifting through such documents to find the relevant information is extremely tiring and frustrating.
131+
132+
We will close and reject such contributions with a simple comment and will not engage in further discussion.
133+
You may, however, create a new PR or issue in a terser format.
134+
118135
[[advanced]]
119136
== Advanced
120137

@@ -123,17 +140,18 @@ This section contains some advanced information, mainly targeted at developers o
123140
[[advanced.general]]
124141
=== General
125142

126-
* Fix bugs in main first, if it's reasonable to port the fix back into a bugfix branch, try to do so with cherry picking.
143+
* Fix bugs in `main` first, if it's reasonable to port the fix back into a bugfix branch, try to do so with cherry-picking.
127144
* Try to keep the lifespan of a feature branch as short as possible.
128145
For simple bug fixes they should only be used for code review in pull requests.
129-
* On longer running feature branches, don't pull changes that were made to main in the meantime.
130-
Instead, rebase the feature branch onto current main, sorting out issues and making sure the branch will fast-forward merge eventually.
146+
* On longer running feature branches, don't pull changes that were made to `main` in the meantime.
147+
Instead, rebase the feature branch onto the current `main`, sorting out issues and making sure the branch will fast-forward merge eventually.
131148

132149
[[advanced.dependency-management]]
133150
=== Dependency management
134151

135152
* When upgrading dependencies of a project, make sure you apply the following rules:
136-
** For service releases of a release train only upgrades to bugfix versions are allowed. I.e. if a GA release of a release train included a dependency in version 2.6.2, you must only upgrade to 2.6.x versions.
153+
** For service releases of a release train, only upgrades to bugfix versions are allowed.
154+
I.e., if a GA release of a release train included a dependency in version 2.6.2, you must only upgrade to 2.6.x versions.
137155
Upgrading to 2.7 is *not allowed*.
138156
** During the milestone phase of a new release train, upgrade to the latest version of a dependency unless compatibility with a former version is required.
139157
Upgrades to new major versions are allowed, too, but consider ways to support multiple major versions for one release train to allow a smoother transition.
@@ -143,12 +161,13 @@ Upgrades to new major versions are allowed, too, but consider ways to support mu
143161

144162
We use JMH for micro-benchmarks.
145163

146-
Our benchmarks are located in the `src/jmh/java` directory so that we compile these as part of our main build. To run benchmarks during development we leverage JUnit 5 and the https://github.com/mp911de/microbenchmark-runner[Microbenchmark Runner].
164+
Our benchmarks are located in the `src/jmh/java` directory so that we compile these as part of our main build.
165+
To run benchmarks during development, we leverage JUnit 6 and the https://github.com/mp911de/microbenchmark-runner[Microbenchmark Runner].
147166
Enable the `jmh` Maven Profile, add `@Testable` to the benchmark you want to run (of the benchmark class) and run it as it was a JUnit test right from your IDE.
148167

149168
NOTE: Microbenchmark Runner is not a tool for running final benchmarks, rather it helps to quickly run benchmarks during development to reduce turnaround time.
150169

151-
Benchmarks aren't ran during the build.
170+
Benchmarks aren't run during the build.
152171

153172
JMH's Benchmark Generator (Annotation Processor) must be enabled in each module with the Maven Compiler, see the following example:
154173

@@ -178,18 +197,19 @@ Once the issue has been reviewed, the team may ask for further information if ne
178197
When a fix is ready, the issue is closed and may still be re-opened until the fix is released.
179198
After that the issue will typically no longer be reopened.
180199
In rare cases if the issue was not at all fixed, the issue may be re-opened.
181-
In most cases however any follow-up reports will need to be created as new issues with a fresh description.
200+
In most cases, however, any follow-up reports will need to be created as new issues with a fresh description.
182201
* Make sure you don't commit without referring to a GitHub issue.
183202
If we have a rather general task to work on, create a GitHub issue for it and commit against that one.
184-
* Try to resolve a GitHub issue in a single commit. I.e. don't have separate commits for the fix and the test cases.
203+
* Try to resolve a GitHub issue in a single commit.
204+
I.e., don't have separate commits for the fix and the test cases.
185205
When polishing pull requests requires some more effort, have a separate commit to clearly document the polishing (and attribute the efforts to you).
186206
* We usually use feature branches to work on GitHub issues and potentially let multiple people work on a feature.
187-
There's a https://github.com/spring-projects/spring-data-build/tree/main/etc/scripts[new-issue-branch script] available that sets up a feature branch for you, and adds a commit changing the Maven version numbers so that the branch builds can still publish snapshot artifacts but don't interfere with each other.
207+
There's a https://github.com/spring-projects/spring-data-build/tree/main/etc/scripts[new-issue-branch script] available that sets up a feature branch for you and adds a commit changing the Maven version numbers so that the branch builds can still publish snapshot artifacts but don't interfere with each other.
188208
* Follow the commit message style described in <<quickstart>>.
189209
Especially the summary line should adhere to the style documented there.
190210
* After pushing fixes to the remote repository, mark the GitHub issues as resolved in and set the earliest milestone that ships the fix according to which branches you pushed to.
191211
* Avoid merge commits as they just tend to make it hard to understand what comes from where.
192-
Using the GitHub issue number in the commit message will allow us to keep track for commits belonging together.
212+
Using the GitHub issue number in the commit message will allow us to keep track of commits belonging together.
193213

194214
[[advanced.code-style]]
195215
=== Source Code style
@@ -206,14 +226,14 @@ For methods consisting of more than one line of code, have a blank line after th
206226
=== Handling pull requests
207227

208228
* Be polite.
209-
It might be the first time someone contributes to an OpenSource project so we should forgive violations to the contribution guidelines.
229+
It might be the first time someone contributes to an OpenSource project, so we should forgive violations to the contribution guidelines.
210230
Use some gut feeling to find out in how far it makes sense to ask the reporter to fix stuff or just go ahead and add a polishing commit yourself.
211231
* All commits must include a __Signed-off-by__ trailer at the end of each commit message to indicate that the contributor agrees to the Developer Certificate of Origin.
212232
For additional details, please refer to the blog post https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring[Hello DCO, Goodbye CLA: Simplifying Contributions to Spring].
213233
Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.
214234
If you forget to do so, you'll be reminded when you submit a pull request.
215235
* Before merging stuff back into `main`, make sure you rebase the branch.
216-
We generally do not allow merge commits, so a merge should always be fast-forward.
236+
We generally do not allow merge commits, so a merge should always be fast-forwarded.
217237
The GitHub issue number and the timestamps give enough tracking information already.
218238
* The simplest way to merge back a pull request submitted by someone external is ``curl``ing the patch into `git am`.
219239
You can then polish it by either adding a commit or amending the provided commit.
@@ -224,10 +244,10 @@ Make sure you keep the original author when amending.
224244
curl $PULL_REQUEST_URL.patch | git am --ignore-whitespace
225245
----
226246

227-
* If you merge back a feature branch and multiple developers contributed to that, try to rearrange to commits and squash the into a single commit per developer.
247+
* If you merge back a feature branch and multiple developers contributed to that, try to rearrange to commits and squash them into a single commit per developer.
228248
Combine the commit messages and edit them to make sense.
229249
* Before pushing the changes to the remote repository, amend the commit(s) to be pushed and add a reference to the pull request to them.
230-
This will cause the pull request UI in GitHub show and link those commits.
250+
This will cause the pull request UI in GitHub to show and link those commits.
231251

232252
[source]
233253
----

0 commit comments

Comments
 (0)