From 336bd55175ca55790de01c4ea6a2bd4e7b0e76a4 Mon Sep 17 00:00:00 2001 From: igorski-r7 Date: Wed, 31 Dec 2025 16:04:19 +0100 Subject: [PATCH 1/3] Added/Updated PR templates --- .github/PULL_REQUEST_TEMPLATE/core.md | 28 +++++++ .github/pull_request_template.md | 101 ++++++++++++++------------ 2 files changed, 84 insertions(+), 45 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/core.md diff --git a/.github/PULL_REQUEST_TEMPLATE/core.md b/.github/PULL_REQUEST_TEMPLATE/core.md new file mode 100644 index 0000000000..71f455a3c9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/core.md @@ -0,0 +1,28 @@ +## ๐Ÿงฉ Type of Change + +- [ ] Feature +- [ ] Bug fix +- [ ] Other + +## ๐Ÿง  Background & Motivation + + +*Provide a short explanation of the motivation and the problem being solved.* + +## โœจ What Changed + + +*Describe the core implementation and high-level impact.* + +## ๐Ÿงช Testing + +Include details of your testing process, such as: +- Unit tests +- Manual testing steps +- Any relevant screenshots or logs diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b2511973a5..1c5d7afcb5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,60 +1,71 @@ -## Proposed Changes +## ๐Ÿ“ Description -### Description + +*Provide a short description of the changes made in this pull request.* -Describe the proposed changes: +## ๐Ÿงช Testing - - + +*Describe the testing process, including any unit tests or manual testing steps taken.* -## PR Requirements +### โœ… Checklist +- [ ] Unit tests added/updated ([generation guide](https://docs.rapid7.com/insightconnect/unit-test-generation) | [writing guide](https://docs.rapid7.com/insightconnect/unit-test-primer)) +- [ ] Manually tested in InsightConnect (if applicable) -Developers, verify you have completed the following items by checking them off: +### ๐Ÿ” Plugin Validation -### Testing +Please run the following commands and provide the output. **For action/trigger tests and runs, include outputs for all actions/triggers that were created or modified in this PR.** -#### Unit Tests +
+Plugin Validation Output (insight-plugin validate) -Review our documentation on [generating](https://docs.rapid7.com/insightconnect/unit-test-generation) and [writing](https://docs.rapid7.com/insightconnect/unit-test-primer) plugin unit tests +``` +# Paste output here +``` -- [ ] Unit tests written for any new or updated code +
-#### In-Product Tests +
+Connection Test Results (insight-plugin run -T tests/example.json --debug --jq) -If you are an InsightConnect customer or have access to an InsightConnect instance, the following in-product tests should be done: +``` +# Paste output here for the connection test of the plugin +# It doesn't matter which action/trigger you use, as long as -T flag is specified +``` +
+ +
+Action/Trigger Test Results (insight-plugin run -R tests/example.json --debug --jq) + +``` +# Paste output here for all created/modified actions/triggers +``` + +
+ +### ๐Ÿ–ผ๏ธ In-Product Verification (if applicable) + +If you have access to an InsightConnect instance, please provide: - [ ] Screenshot of job output with the plugin changes - [ ] Screenshot of the changed connection, actions, or triggers input within the InsightConnect workflow builder -### Style - -Review the [style guide](https://docs.rapid7.com/insightconnect/style-guide/) - -- [ ] For dependencies, pin [OS package](https://docs.rapid7.com/insightconnect/style-guide/#dockerfile) and [Python package](https://docs.rapid7.com/insightconnect/style-guide/#requirements.txt) versions -- [ ] For security, set least privileged account with ``USER nobody`` in the ``Dockerfile`` when possible -- [ ] For size, use the [slim SDK images](https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide) when possible: ``rapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num}`` and ``rapid7/insightconnect-python-3-38-plugin:{sdk-version-num}`` -- [ ] For error handling, use of [PluginException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations/#plugin-exceptions) and [ConnectionTestException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations#connection-exceptions) -- [ ] For logging, use [self.logger](https://docs.rapid7.com/insightconnect/sdk-guide/#logging) -- [ ] For docs, use [changelog style](https://docs.rapid7.com/insightconnect/style-guide/#changelog) -- [ ] For docs, validate markdown with ``insight-plugin validate`` which calls ``icon_validate`` to lint ``help.md`` - -### Functional Checklist -- [ ] Work fully completed -- [ ] Functional - - [ ] Any new actions/triggers include JSON [test files](https://docs.rapid7.com/insightconnect/style-guide/#tests) in the `tests/` directory created with `insight-plugin samples` - - [ ] Tests should all pass unless it's a negative test. Negative tests have a naming convention of `tests/$action_bad.json` - - [ ] Unsuccessful tests should fail by raising an exception causing the plugin to die and an object should be returned on successful test - - [ ] Add functioning test results to PR, sanitize any output if necessary - * Single action/trigger `insight-plugin run -T tests/example.json --debug --jq` - * All actions/triggers shortcut `insight-plugin run -T all --debug --jq` (use PR format at end) - - [ ] Add functioning run results to PR, sanitize any output if necessary - * Single action/trigger `insight-plugin run -R tests/example.json --debug --jq` - * All actions/triggers shortcut `insight-plugin run --debug --jq` (use PR format at end) - -### Assessment - -You must validate your work to reviewers: - -1. Run `insight-plugin validate` and make sure everything passes -2. Run the assessment tool: `insight-plugin run -A`. For single action validation: `insight-plugin run tests/{file}.json -A` -3. Copy (`insight-plugin ... | pbcopy`) and paste the output in **a new post** on this PR -4. Add required screenshots from the In-Product Tests section +## โœ… Code Quality Checklist + +Please review our [style guide](https://docs.rapid7.com/insightconnect/style-guide/) and check all that apply: +- [ ] Dependencies pinned in `Dockerfile` ([OS packages](https://docs.rapid7.com/insightconnect/style-guide/#dockerfile)) and `requirements.txt` ([Python packages](https://docs.rapid7.com/insightconnect/style-guide/#requirements.txt)) +- [ ] `USER nobody` set in `Dockerfile` for least privileged account +- [ ] Uses [slim SDK images](https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide) when possible (e.g., `rapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num}`) +- [ ] Uses [PluginException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations/#plugin-exceptions) / [ConnectionTestException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations#connection-exceptions) for errors +- [ ] Uses `self.logger` for [logging](https://docs.rapid7.com/insightconnect/sdk-guide/#logging) +- [ ] Changelog updated ([style guide](https://docs.rapid7.com/insightconnect/style-guide/#changelog)) +- [ ] Work fully completed and functional + +## ๐Ÿ’ฌ Additional Notes + + +*Add any additional context or information about the pull request here.* + +--- + +**Thanks for contributing! ๐ŸŽ‰** From 43992286b1607c0ab897c8c3674d30ec7e5533f8 Mon Sep 17 00:00:00 2001 From: igorski-r7 Date: Fri, 9 Jan 2026 10:15:26 +0100 Subject: [PATCH 2/3] Updated template names | Aligned templates --- .github/PULL_REQUEST_TEMPLATE/contrib.md | 89 +++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE/core.md | 28 ------- .github/pull_request_template.md | 99 ++++++++---------------- 3 files changed, 120 insertions(+), 96 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/contrib.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/core.md diff --git a/.github/PULL_REQUEST_TEMPLATE/contrib.md b/.github/PULL_REQUEST_TEMPLATE/contrib.md new file mode 100644 index 0000000000..86e6bbb7fd --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/contrib.md @@ -0,0 +1,89 @@ +## ๐Ÿงฉ Type of Change + +- [ ] Feature +- [ ] Bug fix +- [ ] Other + +## ๐Ÿง  Background & Motivation + + + + +## โœจ What Changed + + + + +## ๐Ÿงช Testing + + + +### โœ… Checklist +- [ ] Unit tests added/updated ([generation guide](https://docs.rapid7.com/insightconnect/unit-test-generation) | [writing guide](https://docs.rapid7.com/insightconnect/unit-test-primer)) +- [ ] Manually tested in InsightConnect (if applicable) + +### ๐Ÿ” Plugin Validation + +Please run the following commands and provide the output. **For action/trigger tests and runs, include outputs for all actions/triggers that were created or modified in this PR.** + +
+Plugin Validation Output (insight-plugin validate) + +``` +# Paste output here +``` + +
+ +
+Connection Test Results (insight-plugin run -T tests/example.json --debug --jq) + +``` +# Paste output here for the connection test of the plugin +# It doesn't matter which action/trigger you use, as long as -T flag is specified +``` + +
+ +
+Action/Trigger Test Results (insight-plugin run -R tests/example.json --debug --jq) + +``` +# Paste output here for all created/modified actions/triggers +``` + +
+ +### ๐Ÿ–ผ๏ธ In-Product Verification (if applicable) + +If you have access to an InsightConnect instance, please provide: +- [ ] Screenshot of job output with the plugin changes +- [ ] Screenshot of the changed connection, actions, or triggers input within the InsightConnect workflow builder + +## โœ… Code Quality Checklist + +Please review our [style guide](https://docs.rapid7.com/insightconnect/style-guide/) and check all that apply: +- [ ] Dependencies pinned in `Dockerfile` ([OS packages](https://docs.rapid7.com/insightconnect/style-guide/#dockerfile)) and `requirements.txt` ([Python packages](https://docs.rapid7.com/insightconnect/style-guide/#requirements.txt)) +- [ ] `USER nobody` set in `Dockerfile` for least privileged account +- [ ] Uses [slim SDK images](https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide) when possible (e.g., `rapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num}`) +- [ ] Uses [PluginException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations/#plugin-exceptions) / [ConnectionTestException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations#connection-exceptions) for errors +- [ ] Uses `self.logger` for [logging](https://docs.rapid7.com/insightconnect/sdk-guide/#logging) +- [ ] Changelog updated ([style guide](https://docs.rapid7.com/insightconnect/style-guide/#changelog)) +- [ ] Work fully completed and functional + +## ๐Ÿ’ฌ Additional Notes + + +--- + +**Thanks for contributing! ๐ŸŽ‰** diff --git a/.github/PULL_REQUEST_TEMPLATE/core.md b/.github/PULL_REQUEST_TEMPLATE/core.md deleted file mode 100644 index 71f455a3c9..0000000000 --- a/.github/PULL_REQUEST_TEMPLATE/core.md +++ /dev/null @@ -1,28 +0,0 @@ -## ๐Ÿงฉ Type of Change - -- [ ] Feature -- [ ] Bug fix -- [ ] Other - -## ๐Ÿง  Background & Motivation - - -*Provide a short explanation of the motivation and the problem being solved.* - -## โœจ What Changed - - -*Describe the core implementation and high-level impact.* - -## ๐Ÿงช Testing - -Include details of your testing process, such as: -- Unit tests -- Manual testing steps -- Any relevant screenshots or logs diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1c5d7afcb5..21a804cef2 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,71 +1,34 @@ -## ๐Ÿ“ Description - - -*Provide a short description of the changes made in this pull request.* +## ๐ŸŽซ Ticket + + + + +## ๐Ÿงฉ Type of Change + +- [ ] Feature +- [ ] Bug fix +- [ ] Other + +## ๐Ÿง  Background & Motivation + + + + +## โœจ What Changed + + + ## ๐Ÿงช Testing - -*Describe the testing process, including any unit tests or manual testing steps taken.* - -### โœ… Checklist -- [ ] Unit tests added/updated ([generation guide](https://docs.rapid7.com/insightconnect/unit-test-generation) | [writing guide](https://docs.rapid7.com/insightconnect/unit-test-primer)) -- [ ] Manually tested in InsightConnect (if applicable) - -### ๐Ÿ” Plugin Validation - -Please run the following commands and provide the output. **For action/trigger tests and runs, include outputs for all actions/triggers that were created or modified in this PR.** - -
-Plugin Validation Output (insight-plugin validate) - -``` -# Paste output here -``` - -
- -
-Connection Test Results (insight-plugin run -T tests/example.json --debug --jq) - -``` -# Paste output here for the connection test of the plugin -# It doesn't matter which action/trigger you use, as long as -T flag is specified -``` - -
- -
-Action/Trigger Test Results (insight-plugin run -R tests/example.json --debug --jq) - -``` -# Paste output here for all created/modified actions/triggers -``` - -
- -### ๐Ÿ–ผ๏ธ In-Product Verification (if applicable) - -If you have access to an InsightConnect instance, please provide: -- [ ] Screenshot of job output with the plugin changes -- [ ] Screenshot of the changed connection, actions, or triggers input within the InsightConnect workflow builder - -## โœ… Code Quality Checklist - -Please review our [style guide](https://docs.rapid7.com/insightconnect/style-guide/) and check all that apply: -- [ ] Dependencies pinned in `Dockerfile` ([OS packages](https://docs.rapid7.com/insightconnect/style-guide/#dockerfile)) and `requirements.txt` ([Python packages](https://docs.rapid7.com/insightconnect/style-guide/#requirements.txt)) -- [ ] `USER nobody` set in `Dockerfile` for least privileged account -- [ ] Uses [slim SDK images](https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide) when possible (e.g., `rapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num}`) -- [ ] Uses [PluginException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations/#plugin-exceptions) / [ConnectionTestException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations#connection-exceptions) for errors -- [ ] Uses `self.logger` for [logging](https://docs.rapid7.com/insightconnect/sdk-guide/#logging) -- [ ] Changelog updated ([style guide](https://docs.rapid7.com/insightconnect/style-guide/#changelog)) -- [ ] Work fully completed and functional - -## ๐Ÿ’ฌ Additional Notes - - -*Add any additional context or information about the pull request here.* - ---- - -**Thanks for contributing! ๐ŸŽ‰** + From 3ff3692e30504d3d449ffa7e386d5fc721295c19 Mon Sep 17 00:00:00 2001 From: igorski-r7 Date: Mon, 12 Jan 2026 10:55:17 +0100 Subject: [PATCH 3/3] Updated contributing instructions to include changing PR template --- .github/PULL_REQUEST_TEMPLATE/contrib.md | 2 +- CONTRIBUTING.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/contrib.md b/.github/PULL_REQUEST_TEMPLATE/contrib.md index 86e6bbb7fd..2f67b460ec 100644 --- a/.github/PULL_REQUEST_TEMPLATE/contrib.md +++ b/.github/PULL_REQUEST_TEMPLATE/contrib.md @@ -75,7 +75,7 @@ If you have access to an InsightConnect instance, please provide: Please review our [style guide](https://docs.rapid7.com/insightconnect/style-guide/) and check all that apply: - [ ] Dependencies pinned in `Dockerfile` ([OS packages](https://docs.rapid7.com/insightconnect/style-guide/#dockerfile)) and `requirements.txt` ([Python packages](https://docs.rapid7.com/insightconnect/style-guide/#requirements.txt)) - [ ] `USER nobody` set in `Dockerfile` for least privileged account -- [ ] Uses [slim SDK images](https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide) when possible (e.g., `rapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num}`) +- [ ] Uses [slim SDK images](https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide) when possible (e.g., `rapid7/insightconnect-python-3-slim-plugin:{sdk-version-num}`) - [ ] Uses [PluginException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations/#plugin-exceptions) / [ConnectionTestException](https://docs.rapid7.com/insightconnect/error-handling-in-integrations#connection-exceptions) for errors - [ ] Uses `self.logger` for [logging](https://docs.rapid7.com/insightconnect/sdk-guide/#logging) - [ ] Changelog updated ([style guide](https://docs.rapid7.com/insightconnect/style-guide/#changelog)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9bb9d6f85..461b57c7e9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,6 +33,24 @@ it into production. If you do not care to follow these rules, your contribution - **Don't** leave your pull request description blank. - **Don't** abandon your pull request. Being responsive helps us land your code faster. +#### Using the Contributor PR Template (External Contributors) + +**If you're contributing from a fork**, please use our specialized contributor template that includes additional validation sections. Here's how: + +1. When you click "Compare & Pull request" on GitHub after pushing your changes, you'll see a URL like: + ``` + https://github.com/rapid7/insightconnect-plugins/compare/master...your-username:your-branch + ``` + +2. Before clicking "Create pull request", add `?template=contrib.md` to the end of the URL: + ``` + https://github.com/rapid7/insightconnect-plugins/compare/master...your-username:your-branch?template=contrib.md + ``` + +3. Press Enter to reload the page with the contributor template pre-filled. + +This template includes sections for plugin validation outputs, connection tests, and code quality checklists that help us review external contributions more efficiently. + #### New Features - **Do** install validator dependencies necessary to run `make validate` to find and fix any errors or warnings that come up.