From a295d6b904d1d57106037b71aa42f4198629dbe7 Mon Sep 17 00:00:00 2001 From: Shireen Missi Date: Thu, 19 Dec 2024 10:00:54 +0000 Subject: [PATCH 1/2] Add Community PR Guidelines --- CONTRIBUTING.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f19be15e9595..a92c892c3ca40 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,7 @@ Great that you are here and you want to contribute to n8n - [Actual n8n setup](#actual-n8n-setup) - [Start](#start) - [Development cycle](#development-cycle) + - [Community PR Guidelines](#community-pr-guidelines) - [Test suite](#test-suite) - [Unit tests](#unit-tests) - [E2E tests](#e2e-tests) @@ -191,6 +192,51 @@ automatically build your code, restart the backend and refresh the frontend ``` 1. Commit code and [create a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) +--- + +### Community PR Guidelines + +#### **1. Change Request/Comment** + +Please address the requested changes or provide feedback within 14 days. If there is no response or updates to the pull request during this time, it will be automatically closed. The PR can be reopened once the requested changes are applied. + +#### **2. General Requirements** + +- **Follow the Style Guide:** + - Ensure your code adheres to n8n's coding standards and conventions (e.g., formatting, naming, indentation). Use linting tools where applicable. +- **TypeScript Compliance:** + - Do not use `ts-ignore` . + - Ensure code adheres to TypeScript rules. +- **Avoid Repetitive Code:** + - Reuse existing components, parameters, and logic wherever possible instead of redefining or duplicating them. + - For nodes: Use the same parameter across multiple operations rather than defining a new parameter for each operation (if applicable). +- **Testing Requirements:** + - PRs **must include tests**: + - Unit tests + - Workflow tests for nodes (example [here](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes/Switch/V3/test)) + - UI tests (if applicable) +- **Typos:** + - Use a spell-checking tool, such as [**Code Spell Checker**](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker), to avoid typos. + +#### **3. PR Specific Rules** + +- **Small PRs Only:** + - Focus on a single feature or fix per PR. +- **Naming Convention:** + - Follow [n8n's PR Title Conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md#L36). +- **New Nodes:** + - PRs that introduce new nodes will be **auto-closed** unless they are explicitly requested by the n8n team and aligned with an agreed project scope. However, you can still explore [building your own nodes](https://docs.n8n.io/integrations/creating-nodes/) , as n8n offers the flexibility to create your own custom nodes. +- **Typo-Only PRs:** + - Typos are not sufficient justification for a PR and will be rejected. + +#### **4. Workflow Summary for Non-Compliant PRs** + +- **No Tests:** If tests are not provided, the PR will be auto-closed after **14 days**. +- **Non-Small PRs:** Large or multifaceted PRs will be returned for segmentation. +- **New Nodes/Typo PRs:** Automatically rejected if not aligned with project scope or guidelines. + +--- + ### Test suite #### Unit tests From aceb7fffb3867918a2b28bb2074fef6c1a79f75a Mon Sep 17 00:00:00 2001 From: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:04:31 +0000 Subject: [PATCH 2/2] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a92c892c3ca40..9ed101af7d57b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,7 +218,7 @@ Please address the requested changes or provide feedback within 14 days. If ther - **Typos:** - Use a spell-checking tool, such as [**Code Spell Checker**](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker), to avoid typos. -#### **3. PR Specific Rules** +#### **3. PR Specific Requirements** - **Small PRs Only:** - Focus on a single feature or fix per PR.