Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/contrib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
## 🧩 Type of Change
<!-- Choose the type of change -->
- [ ] Feature
- [ ] Bug fix
- [ ] Other

## 🧠 Background & Motivation
<!-- Why is this change needed? What problem or context led to this PR? -->
<!-- Provide a short explanation of the motivation and the problem being solved. -->
<!-- Examples:
- "Users reported X error when doing Y"
- "New feature X was requested"
-->

## ✨ What Changed
<!-- What was done? Summarize the key changes in this PR. -->
<!-- Describe the core implementation and high-level impact. -->
<!-- Examples:
- "Added new action 'X' to plugin Y"
- "Refactored X to improve performance"
-->

## 🧪 Testing
<!-- Describe how you verified the changes work as intended -->
<!-- Include details of your testing process, such as:
- Unit tests
- Manual testing steps
- Any relevant screenshots or logs
-->

### ✅ 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.**

<details>
<summary>Plugin Validation Output (<code>insight-plugin validate</code>)</summary>

```
# Paste output here
```

</details>

<details>
<summary>Connection Test Results (<code>insight-plugin run -T tests/example.json --debug --jq</code>)</summary>

```
# 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
```

</details>

<details>
<summary>Action/Trigger Test Results (<code>insight-plugin run -R tests/example.json --debug --jq</code>)</summary>

```
# Paste output here for all created/modified actions/triggers
```

</details>

### 🖼️ 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-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
<!-- Screenshots, breaking changes, migration notes, or anything else reviewers should know -->

---

**Thanks for contributing! 🎉**
94 changes: 34 additions & 60 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,34 @@
## Proposed Changes

### Description

Describe the proposed changes:

-

## PR Requirements

Developers, verify you have completed the following items by checking them off:

### Testing

#### Unit Tests

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

- [ ] Unit tests written for any new or updated code

#### In-Product Tests

If you are an InsightConnect customer or have access to an InsightConnect instance, the following in-product tests should be done:

- [ ] 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
## 🎫 Ticket
<!-- Link to the related Jira ticket (if applicable, typically for features and bug fixes) -->
<!-- If no ticket exists, you can remove this section or write "N/A" -->
<!-- Ticket: [<insert ticket title>](<insert ticket link>) -->

## 🧩 Type of Change
<!-- Choose the type of change -->
- [ ] Feature
- [ ] Bug fix
- [ ] Other

## 🧠 Background & Motivation
<!-- Why is this change needed? What problem or context led to this PR? -->
<!-- Provide a short explanation of the motivation and the problem being solved. -->
<!-- Examples:
- "Users reported X error when doing Y"
- "New feature X was requested"
-->

## ✨ What Changed
<!-- What was done? Summarize the key changes in this PR. -->
<!-- Describe the core implementation and high-level impact. -->
<!-- Examples:
- "Added new action 'X' to plugin Y"
- "Refactored X to improve performance"
-->

## 🧪 Testing
<!-- Describe how you verified the changes work as intended -->
<!-- Include details of your testing process, such as:
- Unit tests
- Manual testing steps
- Any relevant screenshots or logs
-->
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading