Skip to content

Commit e9b14de

Browse files
authored
Added/Updated PR templates (#3673)
1 parent 9df5ec6 commit e9b14de

File tree

3 files changed

+141
-60
lines changed

3 files changed

+141
-60
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
## 🧩 Type of Change
2+
<!-- Choose the type of change -->
3+
- [ ] Feature
4+
- [ ] Bug fix
5+
- [ ] Other
6+
7+
## 🧠 Background & Motivation
8+
<!-- Why is this change needed? What problem or context led to this PR? -->
9+
<!-- Provide a short explanation of the motivation and the problem being solved. -->
10+
<!-- Examples:
11+
- "Users reported X error when doing Y"
12+
- "New feature X was requested"
13+
-->
14+
15+
## ✨ What Changed
16+
<!-- What was done? Summarize the key changes in this PR. -->
17+
<!-- Describe the core implementation and high-level impact. -->
18+
<!-- Examples:
19+
- "Added new action 'X' to plugin Y"
20+
- "Refactored X to improve performance"
21+
-->
22+
23+
## 🧪 Testing
24+
<!-- Describe how you verified the changes work as intended -->
25+
<!-- Include details of your testing process, such as:
26+
- Unit tests
27+
- Manual testing steps
28+
- Any relevant screenshots or logs
29+
-->
30+
31+
### ✅ Checklist
32+
- [ ] Unit tests added/updated ([generation guide](https://docs.rapid7.com/insightconnect/unit-test-generation) | [writing guide](https://docs.rapid7.com/insightconnect/unit-test-primer))
33+
- [ ] Manually tested in InsightConnect (if applicable)
34+
35+
### 🔍 Plugin Validation
36+
37+
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.**
38+
39+
<details>
40+
<summary>Plugin Validation Output (<code>insight-plugin validate</code>)</summary>
41+
42+
```
43+
# Paste output here
44+
```
45+
46+
</details>
47+
48+
<details>
49+
<summary>Connection Test Results (<code>insight-plugin run -T tests/example.json --debug --jq</code>)</summary>
50+
51+
```
52+
# Paste output here for the connection test of the plugin
53+
# It doesn't matter which action/trigger you use, as long as -T flag is specified
54+
```
55+
56+
</details>
57+
58+
<details>
59+
<summary>Action/Trigger Test Results (<code>insight-plugin run -R tests/example.json --debug --jq</code>)</summary>
60+
61+
```
62+
# Paste output here for all created/modified actions/triggers
63+
```
64+
65+
</details>
66+
67+
### 🖼️ In-Product Verification (if applicable)
68+
69+
If you have access to an InsightConnect instance, please provide:
70+
- [ ] Screenshot of job output with the plugin changes
71+
- [ ] Screenshot of the changed connection, actions, or triggers input within the InsightConnect workflow builder
72+
73+
## ✅ Code Quality Checklist
74+
75+
Please review our [style guide](https://docs.rapid7.com/insightconnect/style-guide/) and check all that apply:
76+
- [ ] 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))
77+
- [ ] `USER nobody` set in `Dockerfile` for least privileged account
78+
- [ ] 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}`)
79+
- [ ] 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
80+
- [ ] Uses `self.logger` for [logging](https://docs.rapid7.com/insightconnect/sdk-guide/#logging)
81+
- [ ] Changelog updated ([style guide](https://docs.rapid7.com/insightconnect/style-guide/#changelog))
82+
- [ ] Work fully completed and functional
83+
84+
## 💬 Additional Notes
85+
<!-- Screenshots, breaking changes, migration notes, or anything else reviewers should know -->
86+
87+
---
88+
89+
**Thanks for contributing! 🎉**

.github/pull_request_template.md

Lines changed: 34 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,34 @@
1-
## Proposed Changes
2-
3-
### Description
4-
5-
Describe the proposed changes:
6-
7-
-
8-
9-
## PR Requirements
10-
11-
Developers, verify you have completed the following items by checking them off:
12-
13-
### Testing
14-
15-
#### Unit Tests
16-
17-
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
18-
19-
- [ ] Unit tests written for any new or updated code
20-
21-
#### In-Product Tests
22-
23-
If you are an InsightConnect customer or have access to an InsightConnect instance, the following in-product tests should be done:
24-
25-
- [ ] Screenshot of job output with the plugin changes
26-
- [ ] Screenshot of the changed connection, actions, or triggers input within the InsightConnect workflow builder
27-
28-
### Style
29-
30-
Review the [style guide](https://docs.rapid7.com/insightconnect/style-guide/)
31-
32-
- [ ] 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
33-
- [ ] For security, set least privileged account with ``USER nobody`` in the ``Dockerfile`` when possible
34-
- [ ] 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}``
35-
- [ ] 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)
36-
- [ ] For logging, use [self.logger](https://docs.rapid7.com/insightconnect/sdk-guide/#logging)
37-
- [ ] For docs, use [changelog style](https://docs.rapid7.com/insightconnect/style-guide/#changelog)
38-
- [ ] For docs, validate markdown with ``insight-plugin validate`` which calls ``icon_validate`` to lint ``help.md``
39-
40-
### Functional Checklist
41-
- [ ] Work fully completed
42-
- [ ] Functional
43-
- [ ] 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`
44-
- [ ] Tests should all pass unless it's a negative test. Negative tests have a naming convention of `tests/$action_bad.json`
45-
- [ ] Unsuccessful tests should fail by raising an exception causing the plugin to die and an object should be returned on successful test
46-
- [ ] Add functioning test results to PR, sanitize any output if necessary
47-
* Single action/trigger `insight-plugin run -T tests/example.json --debug --jq`
48-
* All actions/triggers shortcut `insight-plugin run -T all --debug --jq` (use PR format at end)
49-
- [ ] Add functioning run results to PR, sanitize any output if necessary
50-
* Single action/trigger `insight-plugin run -R tests/example.json --debug --jq`
51-
* All actions/triggers shortcut `insight-plugin run --debug --jq` (use PR format at end)
52-
53-
### Assessment
54-
55-
You must validate your work to reviewers:
56-
57-
1. Run `insight-plugin validate` and make sure everything passes
58-
2. Run the assessment tool: `insight-plugin run -A`. For single action validation: `insight-plugin run tests/{file}.json -A`
59-
3. Copy (`insight-plugin ... | pbcopy`) and paste the output in **a new post** on this PR
60-
4. Add required screenshots from the In-Product Tests section
1+
## 🎫 Ticket
2+
<!-- Link to the related Jira ticket (if applicable, typically for features and bug fixes) -->
3+
<!-- If no ticket exists, you can remove this section or write "N/A" -->
4+
<!-- Ticket: [<insert ticket title>](<insert ticket link>) -->
5+
6+
## 🧩 Type of Change
7+
<!-- Choose the type of change -->
8+
- [ ] Feature
9+
- [ ] Bug fix
10+
- [ ] Other
11+
12+
## 🧠 Background & Motivation
13+
<!-- Why is this change needed? What problem or context led to this PR? -->
14+
<!-- Provide a short explanation of the motivation and the problem being solved. -->
15+
<!-- Examples:
16+
- "Users reported X error when doing Y"
17+
- "New feature X was requested"
18+
-->
19+
20+
## ✨ What Changed
21+
<!-- What was done? Summarize the key changes in this PR. -->
22+
<!-- Describe the core implementation and high-level impact. -->
23+
<!-- Examples:
24+
- "Added new action 'X' to plugin Y"
25+
- "Refactored X to improve performance"
26+
-->
27+
28+
## 🧪 Testing
29+
<!-- Describe how you verified the changes work as intended -->
30+
<!-- Include details of your testing process, such as:
31+
- Unit tests
32+
- Manual testing steps
33+
- Any relevant screenshots or logs
34+
-->

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ it into production. If you do not care to follow these rules, your contribution
3333
- **Don't** leave your pull request description blank.
3434
- **Don't** abandon your pull request. Being responsive helps us land your code faster.
3535

36+
#### Using the Contributor PR Template (External Contributors)
37+
38+
**If you're contributing from a fork**, please use our specialized contributor template that includes additional validation sections. Here's how:
39+
40+
1. When you click "Compare & Pull request" on GitHub after pushing your changes, you'll see a URL like:
41+
```
42+
https://github.com/rapid7/insightconnect-plugins/compare/master...your-username:your-branch
43+
```
44+
45+
2. Before clicking "Create pull request", add `?template=contrib.md` to the end of the URL:
46+
```
47+
https://github.com/rapid7/insightconnect-plugins/compare/master...your-username:your-branch?template=contrib.md
48+
```
49+
50+
3. Press Enter to reload the page with the contributor template pre-filled.
51+
52+
This template includes sections for plugin validation outputs, connection tests, and code quality checklists that help us review external contributions more efficiently.
53+
3654
#### New Features
3755

3856
- **Do** install validator dependencies necessary to run `make validate` to find and fix any errors or warnings that come up.

0 commit comments

Comments
 (0)