From 43e51adc3de00e2a639919ea85d4dca3e46cb694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20Yaz=C4=B1c=C4=B1?= Date: Tue, 20 May 2025 09:40:00 +0200 Subject: [PATCH 1/2] Development-related documentation improvements --- .github/pull_request_template.md | 2 +- README.adoc | 6 ++++++ src/site/antora/modules/ROOT/pages/development.adoc | 8 +++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1cea95c461a..95b2dedd8b8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,4 +6,4 @@ * `./mvnw verify` succeeds (if it fails due to code formatting issues reported by Spotless, simply run `./mvnw spotless:apply` and retry) * Non-trivial changes contain an entry file in the `src/changelog/.2.x.x` directory * Tests for the changes are provided -* [Commits are signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) (optional, but highly recommended) +* [**All commits must be signed!**](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) diff --git a/README.adoc b/README.adoc index 9fd8d827991..d7d9bd39f6d 100644 --- a/README.adoc +++ b/README.adoc @@ -21,3 +21,9 @@ https://github.com/apache/logging-log4j2/security/code-scanning[image:https://gi Apache Log4j is a versatile, industrial-grade Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. For further information (support, download, etc.) see https://logging.apache.org/log4j[the project website]. + +[#development] +== Development + +Looking for *build instructions*, branching scheme, and other developer resources? +See https://logging.apache.org/log4j/2.x/development.html[the Development page] at the website. diff --git a/src/site/antora/modules/ROOT/pages/development.adoc b/src/site/antora/modules/ROOT/pages/development.adoc index edc861ede6b..9c35dd393ae 100644 --- a/src/site/antora/modules/ROOT/pages/development.adoc +++ b/src/site/antora/modules/ROOT/pages/development.adoc @@ -83,12 +83,10 @@ Pitch it in a {logging-services-url}/support.html#discussions-maintainer[maintai [#committer] == I am a committer. How shall I push my changes? -. Is it something trivial? -Go ahead and push it. +As per https://lists.apache.org/thread/rx2hgc5mwql06yzwz2j8wkp8z6nmdcqk[the PMC resolution on 2025-04-10], all changes must be submitted in a pull request and undergo peer review. + +Make sure a changelog entry is attached, and `./mvnw verify site` succeeds. -. Otherwise, submit a pull request. -Make sure a changelog entry is attached and `./mvnw verify site` succeeds. -+ [TIP] ==== You are strongly advised to spar with another maintainer first (see {logging-services-url}/support.html#discussions-maintainer[maintainer discussion channels]) before starting to code. From 0ee4732de79184090cfd7437f038ba8d9bda38f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20Yaz=C4=B1c=C4=B1?= Date: Tue, 3 Jun 2025 10:01:15 +0200 Subject: [PATCH 2/2] Revamped PR template --- .github/pull_request_template.md | 43 +++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 95b2dedd8b8..7409260f97b 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,9 +1,40 @@ -[A clear and concise description of what the pull request is for along with a reference to the associated issue IDs, if they exist.] +**INSERT HERE** a clear and concise description of what the pull request is for along with a reference to the associated issue IDs, if they exist. + +> [!IMPORTANT] +> Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` otherwise. ## Checklist -* Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` otherwise -* `./mvnw verify` succeeds (if it fails due to code formatting issues reported by Spotless, simply run `./mvnw spotless:apply` and retry) -* Non-trivial changes contain an entry file in the `src/changelog/.2.x.x` directory -* Tests for the changes are provided -* [**All commits must be signed!**](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) +Before we can review and merge your changes, please go through the checklist below. If you're still working on some items, feel free to submit your pull request as a draft—our CI will help guide you through the remaining steps. + +### ✅ Required checks + +- [ ] **License**: I confirm that my changes are submitted under the [Apache License, Version 2.0](https://apache.org/licenses/LICENSE-2.0). +- [ ] **Commit signatures**: All commits are signed and verifiable. (See [GitHub Docs on Commit Signature Verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)). +- [ ] **Code formatting**: The code is formatted according to the project’s style guide. +
+ How to check and fix formatting + + - To **check** formatting: `./mvnw spotless:check` + - To **fix** formatting: `./mvnw spotless:apply` + + See [the build instructions](https://logging.apache.org/log4j/2.x/development.html#building) for details. +
+- [ ] **Build & Test**: I verified that the project builds and all unit tests pass. +
+ How to build the project + + Run: `./mvnw verify` + + See [the build instructions](https://logging.apache.org/log4j/2.x/development.html#building) for details. +
+ +### 🧪 Tests (select one) + +- [ ] I have added or updated tests to cover my changes. +- [ ] No additional tests are needed for this change. + +### 📝 Changelog (select one) + +- [ ] I added a changelog entry in `src/changelog/.2.x.x`. (See [Changelog Entry File Guide](https://logging.apache.org/log4j/tools/log4j-changelog.html#changelog-entry-file)). +- [ ] This is a trivial change and does not require a changelog entry.