From a818b352daec91bd88abeed15cfa82c4ee17b5af Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 14:58:33 +0100 Subject: [PATCH 1/9] chore: Create PR template (no-changelog) --- .github/pull_request_template.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bd399104db8d6..2a902d6b26622 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1 +1,24 @@ -Github issue / Community forum post (link here to close automatically): +## Summary +Provide details about your pull request and what it adds, fixes, or changes. Photos and videos are recommended. + +... + +#### How to test the change: +1. ... + +## Issues fixed +Include links to Github issue or Community forum post or **Linear ticket**: + +... + +> Important in order to close automatically and provide context to reviewers + + +## Review / Merge checklist +> A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. +> +> *(internal)* You can use Slack commands to trigger [e2e tests](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#a39f9e5ba64a48b58a71d81c837e8227) or [deploy test instance](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#f6a177d32bde4b57ae2da0b8e454bfce) or [deploy early access version on Cloud](https://www.notion.so/n8n/Cloudbot-3dbe779836004972b7057bc989526998?pvs=4#fef2d36ab02247e1a0f65a74f6fb534e). + +- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog.** +- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. +- [ ] Tests included. From 124bc3b18478c0f76891f0f5b6db84ae45c26d2d Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 15:03:01 +0100 Subject: [PATCH 2/9] chore: Update template --- .github/pull_request_template.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2a902d6b26622..12a38c21a8d3e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,5 @@ ## Summary -Provide details about your pull request and what it adds, fixes, or changes. Photos and videos are recommended. +Provide details about your pull request and what it adds, fixes, or changes. Photos and videos are recommended. ... @@ -8,17 +8,15 @@ Provide details about your pull request and what it adds, fixes, or changes. Pho ## Issues fixed Include links to Github issue or Community forum post or **Linear ticket**: +> Important in order to close automatically and provide context to reviewers ... -> Important in order to close automatically and provide context to reviewers - ## Review / Merge checklist -> A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. -> -> *(internal)* You can use Slack commands to trigger [e2e tests](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#a39f9e5ba64a48b58a71d81c837e8227) or [deploy test instance](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#f6a177d32bde4b57ae2da0b8e454bfce) or [deploy early access version on Cloud](https://www.notion.so/n8n/Cloudbot-3dbe779836004972b7057bc989526998?pvs=4#fef2d36ab02247e1a0f65a74f6fb534e). - - [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog.** - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. + > A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. + > + > *(internal)* You can use Slack commands to trigger [e2e tests](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#a39f9e5ba64a48b58a71d81c837e8227) or [deploy test instance](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#f6a177d32bde4b57ae2da0b8e454bfce) or [deploy early access version on Cloud](https://www.notion.so/n8n/Cloudbot-3dbe779836004972b7057bc989526998?pvs=4#fef2d36ab02247e1a0f65a74f6fb534e). \ No newline at end of file From b181cda75c3bb81542b906519ba36db8ee317bd3 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 15:07:56 +0100 Subject: [PATCH 3/9] chore: fix spacing --- .github/pull_request_template.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 12a38c21a8d3e..74cc9fa5f7ab0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,15 +1,14 @@ ## Summary Provide details about your pull request and what it adds, fixes, or changes. Photos and videos are recommended. - ... #### How to test the change: 1. ... + ## Issues fixed Include links to Github issue or Community forum post or **Linear ticket**: > Important in order to close automatically and provide context to reviewers - ... From 78fe4baecca67266b825efc3f4596072aef22f2e Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 15:08:52 +0100 Subject: [PATCH 4/9] chore: fix spacing --- .github/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 74cc9fa5f7ab0..24bda5d79e4b8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,6 +9,7 @@ Provide details about your pull request and what it adds, fixes, or changes. Pho ## Issues fixed Include links to Github issue or Community forum post or **Linear ticket**: > Important in order to close automatically and provide context to reviewers + ... From 542757ed402a2c66aa3d8051908bfe49156a9132 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 15:25:00 +0100 Subject: [PATCH 5/9] docs: add no-changelog note --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 24bda5d79e4b8..f04879c815b70 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,7 +14,7 @@ Include links to Github issue or Community forum post or **Linear ticket**: ## Review / Merge checklist -- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog.** +- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. From 0702f4a46efc25cd861b50564395214fab3c8268 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 16:14:16 +0100 Subject: [PATCH 6/9] docs: add PR title conventions --- .github/pull_request_template.md | 2 +- .github/pull_request_title_conventions.md | 112 ++++++++++++++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 .github/pull_request_title_conventions.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f04879c815b70..bed2441d65644 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,7 +14,7 @@ Include links to Github issue or Community forum post or **Linear ticket**: ## Review / Merge checklist -- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** +- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([convetions](./pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. diff --git a/.github/pull_request_title_conventions.md b/.github/pull_request_title_conventions.md new file mode 100644 index 0000000000000..f6f762048f311 --- /dev/null +++ b/.github/pull_request_title_conventions.md @@ -0,0 +1,112 @@ +# PR Title Convention + +We have very precise rules over how Pull Requests (to the `master` branch) must be formatted. This format basically follows the [Angular Commit Message Convention](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit). It leads to easier to read commit history and allows for automated generation of release notes: + +A PR title consists of these elements: + +``` +(): + │ │ │ + │ │ └─⫸ Summary: In imperative present tense. + | | Capitalized + | | No period at the end. + │ │ + │ └─⫸ Scope: API|core|editor|* Node + │ + └─⫸ Type: build|ci|docs|feat|fix|perf|refactor|test +``` + +- PR title + - type + - scope (*optional*) + - summary +- PR description + - body (optional) + - blank line + - footer (optional) + +The structure looks like this: + +### **Type** + +Must be one of the following: + +- `feat` - A new feature +- `fix` - A bug fix +- `perf` - A code change that improves performance +- `test` - Adding missing tests or correcting existing tests +- `docs` - Documentation only changes +- `refactor` - A code change that neither fixes a bug nor adds a feature +- `build` - Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) +- `ci` - Changes to our CI configuration files and scripts (e.g. Github actions) + +If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However if there is any BREAKING CHANGE (see Footer section below), the commit will always appear in the changelog. + +### **Scope (optional)** + +The scope should specify the place of the commit change as long as the commit clearly addresses one of the following supported scopes. (Otherwise, omit the scope!) + +- `API` - changes to the *public* API +- `core` - changes to the core / private API / backend of n8n +- `editor` - changes to the Editor UI +- `* Node` - changes to a specific node or trigger node (”`*`” to be replaced with the node name, not its display name), e.g. + - mattermost → Mattermost Node + - microsoftToDo → Microsoft To Do Node + - n8n → n8n Node + +### **Summary** + +The summary contains succinct description of the change: + +- use the imperative, present tense: "change" not "changed" nor "changes" +- capitalize the first letter +- *no* dot (.) at the end +- do *not* include Linear ticket IDs etc. (e.g. N8N-1234) +- suffix with “(no-changelog)” for commits / PRs that should not get mentioned in the changelog. + +### **Body (optional)** + +Just as in the **summary**, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior. + +### **Footer (optional)** + +The footer can contain information about breaking changes and deprecations and is also the place to [reference GitHub issues](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), Linear tickets, and other PRs that this commit closes or is related to. For example: + +``` +BREAKING CHANGE: + + + + +Fixes # +``` + +or + +``` +DEPRECATED: + + + + +Closes # +``` + +A Breaking Change section should start with the phrase "`BREAKING CHANGE:` " followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions. + +> 💡 A breaking change can additionally also be marked by adding a “`!`” to the header, right before the “`:`”, e.g. `feat(editor)!: Remove support for dark mode` +> +> This makes locating breaking changes easier when just skimming through commit messages. + +> 💡 The breaking changes must also be added to the [packages/cli/BREAKING-CHANGES.md](https://github.com/n8n-io/n8n/blob/master/packages/cli/BREAKING-CHANGES.md) file located in the n8n repository. + +Similarly, a Deprecation section should start with "`DEPRECATED:` " followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path. + +### **Revert commits** + +If the commit reverts a previous commit, it should begin with `revert:` , followed by the header of the reverted commit. + +The content of the commit message body should contain: + +- information about the SHA of the commit being reverted in the following format: `This reverts commit `, +- a clear description of the reason for reverting the commit message. \ No newline at end of file From 2d6bdfe799ff86539f62e28a8db58674bf0ad4e1 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 16:20:38 +0100 Subject: [PATCH 7/9] docs: add PR title conventions url correclty --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bed2441d65644..bf8d8d4f2b3be 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,7 +14,7 @@ Include links to Github issue or Community forum post or **Linear ticket**: ## Review / Merge checklist -- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([convetions](./pull_request_title_conventions.md)) +- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([convetions](./blob/master/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. From d233d7a2b75c3aa3b7954ddb62635bd6f1c0a72b Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 16:24:07 +0100 Subject: [PATCH 8/9] docs: typos and link fix --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bf8d8d4f2b3be..a947e6525b04e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,7 +14,7 @@ Include links to Github issue or Community forum post or **Linear ticket**: ## Review / Merge checklist -- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([convetions](./blob/master/pull_request_title_conventions.md)) +- [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. From f47d7a7be7f7bed8499931f443d312a2a8d216ed Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Fri, 1 Dec 2023 16:26:43 +0100 Subject: [PATCH 9/9] docs: fix space --- .github/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a947e6525b04e..804b35675f687 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,6 @@ ## Summary Provide details about your pull request and what it adds, fixes, or changes. Photos and videos are recommended. + ... #### How to test the change: