Skip to content

Commit 5f10fa3

Browse files
authored
Added CONTRIBUTING.md (#451)
* Added CONTRIBUTING.md Signed-off-by: Helber Belmiro <[email protected]> * Added pull_request_template.md Signed-off-by: Helber Belmiro <[email protected]> --------- Signed-off-by: Helber Belmiro <[email protected]>
1 parent 18e66da commit 5f10fa3

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing guide
2+
3+
**Want to contribute? Great!** We try to make it easy, and all contributions, even the smaller ones, are more than welcome. This includes bug reports, fixes, documentation, examples... But first, read this page.
4+
5+
## Reporting an issue
6+
7+
This project uses GitHub issues to manage the issues. Open an issue directly in GitHub.
8+
9+
If you believe you found a bug, and it's likely possible, please indicate a way to reproduce it, what you are seeing, and
10+
what you would expect to see. Don't forget to indicate your Quarkus, Java, Maven/Gradle, and GraalVM versions.
11+
12+
## Tests and documentation are not optional
13+
14+
Don't forget to include tests in your pull requests. Also don't forget the documentation (reference documentation, javadoc...).
15+
16+
### RESTEasy Reactive and RESTEasy Classic
17+
18+
This extension supports RESTEasy Reactive and RESTEasy Classic. We have one profile for each implementation. By default, tests are run with RESTEasy Classic.
19+
20+
#### Using the RESTEasy Reactive profile
21+
22+
To run the tests using RESTEasy Reactive, use the `resteasy-reactive` [profile](https://github.com/quarkiverse/quarkus-openapi-generator/blob/32d9bd753724065d7217defb3085a734fea40bc8/integration-tests/pom.xml#L79), like the following:
23+
24+
```shell
25+
mvn verify -Presteasy-reactive
26+
```
27+
28+
#### Using the RESTEasy Classic profile
29+
30+
To run the tests using RESTEasy Classic, use the `resteasy-classic` [profile](https://github.com/quarkiverse/quarkus-openapi-generator/blob/32d9bd753724065d7217defb3085a734fea40bc8/integration-tests/pom.xml#L49), like the following:
31+
32+
```shell
33+
mvn verify -Presteasy-classic
34+
```
35+
36+
#### Specific tests for each implementation
37+
38+
Most of the tests are the same for both RESTEasy implementations, but a few of them require different code, like the `multipart-request` [integration test](https://github.com/quarkiverse/quarkus-openapi-generator/tree/main/integration-tests/multipart-request). For these cases, we have one test for each implementation, using the `org.junit.jupiter.api.Tag` annotation to specify the profile for each of them.
39+
40+
### Code Style
41+
42+
Maven automatically formats code and organizes imports when you run `mvn verify`. So, we recommend you do that before sending your PR. Otherwise, PR checks will fail.
43+
44+
## Quarkus 3 and Quarkus 2 support
45+
46+
This extension supports versions 3 and 2 of Quarkus and the code base is different for each Quarkus version. Therefore, we have the `main` branch supporting Quarkus 3, and the `quarkus2` branch supporting Quarkus 2. Preferably send your PRs to the `main` branch and [we will backport them to the `quarkus2` branch](#backporting-between-branches).
47+
48+
## For the maintainers
49+
50+
### Backporting between branches
51+
52+
[We have a GitHub action for backporting PRs between different branches](.github/workflows/pr-backporting.yml). To use that, you must set a label named `backport-<destination_branch_name>`.
53+
54+
Let's say you want to backport a PR from the `main` branch to the `quarkus2` branch. You would have to add a label named `backport-quarkus2` to the original PR. When that PR is merged, the GitHub actions bot will send a copy of the PR to the `quarkus2` branch.
55+
56+
See an example:
57+
58+
* [Original PR](https://github.com/quarkiverse/quarkus-openapi-generator/pull/439)
59+
* [Backport PR](https://github.com/quarkiverse/quarkus-openapi-generator/pull/445)
60+
61+
#### Known limitation
62+
63+
GitHub does not initiate checks for pull requests opened by the GitHub Actions bot. Therefore, [when we backport a PR to another branch the PR checks are not run automatically](https://github.com/quarkiverse/quarkus-openapi-generator/issues/450).
64+
65+
### Backlog
66+
67+
We have a [Kanban board](https://github.com/orgs/quarkiverse/projects/2), which is currently visible only by members of the [Quarkiverse organization](https://github.com/quarkiverse).
68+
69+
### Staling issues and PRs
70+
71+
We have a [GitHub action to automatically close issues and PRs](.github/workflows/stale_issues.yml) that didn't have interactions for a while. If you want to disable it for a specific issue or PR, you can add the `pinned` label and it will never stale.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ project: https://opencollective.com/openapi_generator/donate
1919

2020
This extension is for REST code generation for client side only. If you're looking for code generation for the server side, please take a look at the [Quarkus Apicurio Extension](https://github.com/Apicurio/apicurio-codegen/tree/main/quarkus-extension).
2121

22+
**Want to contribute? Great!** We try to make it easy, and all contributions, even the smaller ones, are more than welcome. This includes bug reports, fixes, documentation, examples... But first, read [this page](CONTRIBUTING.md).
23+
2224
## Getting Started
2325

2426
Add the following dependency to your project's `pom.xml` file:

pull_request_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Many thanks for submitting your Pull Request :heart:!
2+
3+
Please make sure that your PR meets the following requirements:
4+
5+
- [ ] You have read the [contributors guide](CONTRIBUTING.md)
6+
- [ ] Your code is properly formatted according to [our code style](CONTRIBUTING.md#code-style)
7+
- [ ] Pull Request title contains the target branch if not targeting main: `[0.9.x] Subject`
8+
- [ ] Pull Request contains link to the issue
9+
- [ ] Pull Request contains link to any dependent or related Pull Request
10+
- [ ] Pull Request contains description of the issue
11+
- [ ] Pull Request does not include fixes for issues other than the main ticket
12+
13+
<details>
14+
<summary>
15+
How to backport a pull request to a different branch?
16+
</summary>
17+
18+
In order to automatically create a **backporting pull request** please add one or more labels having the following format `backport-<branch-name>`, where `<branch-name>` is the name of the branch where the pull request must be backported to (e.g., `backport-quarkus2` to backport the original PR to the `quarkus2` branch).
19+
20+
> **NOTE**: **backporting** is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.
21+
22+
Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
23+
24+
If something goes wrong, the author will be notified and at this point a manual backporting is needed.
25+
26+
> **NOTE**: this automated backporting is triggered whenever a pull request on `main` branch is labeled or closed, but both conditions must be satisfied to get the new PR created.
27+
</details>

0 commit comments

Comments
 (0)