Skip to content

BWA-21042: Add new pull request templates#5

Open
vm-trustpilot wants to merge 1 commit into
mainfrom
BWA-21042-investigate-team-level-pr-template-options-for-repos
Open

BWA-21042: Add new pull request templates#5
vm-trustpilot wants to merge 1 commit into
mainfrom
BWA-21042-investigate-team-level-pr-template-options-for-repos

Conversation

@vm-trustpilot
Copy link
Copy Markdown

@vm-trustpilot vm-trustpilot commented May 14, 2026

Ticket 🎟

BWA-21042


What ⁉️

Added new GM team PR templates per service.

Why ⁉️

The org-wide template at trustpilot/.github/PULL_REQUEST_TEMPLATE.md is intentionally generic and owned at the org level — we don't want to change it. But for our repos the generic prompts lead to inconsistent PRs and missing context (rollback, risk, test evidence, ticket link).

We want to build on / layer over the global template for just our repos, without forking or replacing it.

@vm-trustpilot
Copy link
Copy Markdown
Author

TBD: Do we want include useful links in templates, like: Create and upgrade account, TP admin

Comment on lines +15 to +22
### How ⁉️
_How did you implement it? Mention key decisions or trade-offs, e.g.:_
- _New or changed Lambda handlers — function name, trigger (API GW, SNS, SQS, EventBridge, scheduled)_
- _Salesforce integration — which object(s) are created/updated, which fields map to which params_
- _SNS/SQS — new topics or queues, message schema changes, DLQ behaviour_
- _DynamoDB — new tables, GSI changes, or access pattern changes_
- _Secrets / config — new SSM parameters or environment variables required_
- _IAM — any new permissions added to execution roles_
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm never a huge fan of "how" as to me it just repeats the diff.

I prefer in the "How to review and test" if the diff is large or complex it is highlighted there and there's maybe some notes to guide a reviewer.

Comment on lines +24 to +30
### External dependencies
_List all external systems this change touches:_
- [ ] Salesforce — _object(s) and fields affected_
- [ ] SNS / SQS — _topic / queue name(s)_
- [ ] DynamoDB — _table name(s)_
- [ ] Third-party API — _name and endpoint_
- [ ] None
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels unneccessary to me

- [ ] None

### How to review and test 📱
_Steps to verify the feature in staging or locally:_
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to list helpful resources here for generating the correct users to save folk hunting in Confluence.

_Steps to verify the feature in staging or locally:_

**If the trigger is an HTTP endpoint:**
1. Deploy to staging or run locally (`sam local start-api` / `serverless offline`).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Deploy to staging or run locally (`sam local start-api` / `serverless offline`).
1. Run locally (`assume trustpilot-classic && npm start`).

maybe more helpful?


**If the trigger is an HTTP endpoint:**
1. Deploy to staging or run locally (`sam local start-api` / `serverless offline`).
2. Call the endpoint: `curl -X POST https://<base-url>/<path> -d '<payload>'`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe extend this to include the standard private/internal headers and request style?

Comment on lines +40 to +43
**If the trigger is SNS / SQS:**
1. Publish a test message to the topic/queue: `aws sns publish --topic-arn <arn> --message '<payload>'`
2. Check CloudWatch Logs for the Lambda execution: `aws logs tail /aws/lambda/<function-name> --follow`
3. Describe the expected side-effect (e.g. Salesforce record created, DynamoDB item written).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have a separate guide for microservices as the testing is often different. (i.e usually using a runLocal.ts script

Comment on lines +45 to +49
**If the integration is Salesforce:**
1. Trigger the flow (HTTP call or SNS message as above).
2. Log in to Salesforce staging org and navigate to the relevant object (Account / Lead / etc.).
3. Verify the field values match the payload.
4. If the mapping is wrong, check `<config file or env var>` for the field mapping.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too specific as a lot of services don't touch salesforce

Comment on lines +51 to +52
**DLQ / error path:**
- Send a malformed payload and confirm the message lands in the DLQ rather than causing a silent failure.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again not too sure this happens in practise as when run locally the DLQ isn't connected.


### Checklist ✅
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove the feature works (unit + integration where applicable)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [ ] I have added tests that prove the feature works (unit + integration where applicable)
- [ ] I have added tests that prove the feature works (unit + integration + e2e where applicable)

Comment on lines +71 to +77
- [ ] External dependencies documented in the section above
- [ ] Salesforce field mapping verified against staging org (if applicable)
- [ ] DLQ / error path tested
- [ ] New SSM parameters / secrets documented in the ticket
- [ ] IAM permission changes are least-privilege
- [ ] Rollback plan is documented above
- [ ] Feature flag / gradual rollout considered if applicable
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [ ] External dependencies documented in the section above
- [ ] Salesforce field mapping verified against staging org (if applicable)
- [ ] DLQ / error path tested
- [ ] New SSM parameters / secrets documented in the ticket
- [ ] IAM permission changes are least-privilege
- [ ] Rollback plan is documented above
- [ ] Feature flag / gradual rollout considered if applicable
- [ ] error path tested
- [ ] Rollback plan is documented above
- [ ] Feature flag / gradual rollout considered if applicable

### Checklist ✅
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove the feature works (unit + integration where applicable)
- [ ] New and existing tests pass locally
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [ ] New and existing tests pass locally
- [ ] New and existing unit/integration tests pass locally
- [ ] Local E2E tests pass against your local branch (where applicable)

Comment on lines +15 to +22
### How ⁉️
_How did you implement it? Mention key decisions or trade-offs, e.g.:_
- _Component hierarchy changes — which components were added, removed, or renamed_
- _State management — Redux action/reducer changes, or new local state_
- _Form logic — react-hook-form / Formik changes (validators, default values, submission)_
- _LaunchDarkly — new or modified feature flags, and which component reads them_
- _Tracking — new Segment events or changes to existing ones_
- _Localisation — new or modified translation keys; which locales are affected_
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, would prefer not to have this section (see previous comment)

- _Tracking — new Segment events or changes to existing ones_
- _Localisation — new or modified translation keys; which locales are affected_

### How to review and test 📱
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explicitly call our testing with keyboard and VoiceOver

5. If a LaunchDarkly flag controls the feature, describe how to toggle it in the local dev config or staging environment.
6. Link to the CI run once tests pass.

_For responsive changes, test at mobile (375px), tablet (768px), and desktop (1280px) breakpoints._
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_For responsive changes, test at mobile (375px), tablet (768px), and desktop (1280px) breakpoints._
7. Open the browser DevTools and check responsiveness at all reasonable width and heights of screen (from small phone to horizontal tablet to 4k monitor)

Comment on lines +46 to +55
### Checklist ✅
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove the feature works
- [ ] New and existing tests pass locally
- [ ] Screenshots / GIFs included for all visual changes
- [ ] Translation keys added for all user-visible strings
- [ ] Segment tracking events verified (added / updated where needed)
- [ ] LaunchDarkly flag usage documented (if applicable)
- [ ] Rollback plan is documented above
- [ ] Feature flag / gradual rollout considered if applicable
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Checklist ✅
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove the feature works
- [ ] New and existing tests pass locally
- [ ] Screenshots / GIFs included for all visual changes
- [ ] Translation keys added for all user-visible strings
- [ ] Segment tracking events verified (added / updated where needed)
- [ ] LaunchDarkly flag usage documented (if applicable)
- [ ] Rollback plan is documented above
- [ ] Feature flag / gradual rollout considered if applicable
### Checklist ✅
- [ ] My changes generate no new warnings
- [ ] I have added tests (unit, integration and/or E2E where relevant) that prove the feature works
- [ ] Local E2E tests have been run and are passing against my branch
- [ ] New and existing tests pass locally
- [ ] Screenshots / GIFs included for all visual changes
- [ ] Translation keys added for all strings (including those for screen readers)
- [ ] Segment tracking events verified (added / updated where needed)
- [ ] LaunchDarkly flag usage documented (if applicable)
- [ ] Rollback plan is documented above
- [ ] Feature flag / gradual rollout considered if applicable

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would prefer a gm-microservice.md over this.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 Thoughts (non-blocking)
I think we can drop the -pr in the file name (for backend and frontend here)

- [ ] New SSM parameters / secrets provisioned in all target environments (values never committed)
- [ ] IAM permission changes are least-privilege
- [ ] CloudFormation change set reviewed before deploy
- [ ] No secrets or credentials are committed
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 Thoughts (non-blocking)

Suggested change
- [ ] No secrets or credentials are committed

since this is already mentioned above

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a bit late if you've raised a PR that contains secrets 😅

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I thought the same ahah 😅

That's not directly related to this PR, but maybe worth some day enabling the "Secret scanning" feature of GitHub (https://github.com/trustpilot/businessupgrades-businessapp/security/secret-scanning)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have stuff scanning for secrets at the org level, if you commit something that looks like a secret, you'll know 😉

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok great!
Is it the "Secret scanning" feature of GitHub but at the org level? Or something else?

Comment on lines +41 to +42
1. Publish a test message to the topic/queue: `aws sns publish --topic-arn <arn> --message '<payload>'`
2. Check CloudWatch Logs for the Lambda execution: `aws logs tail /aws/lambda/<function-name> --follow`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that doesn't help to test the changes introduced in the PR, this only triggers the deployed version.
Instead, instruct to use the run-local script if there is one in the repo

- [ ] New SSM parameters / secrets provisioned in all target environments (values never committed)
- [ ] IAM permission changes are least-privilege
- [ ] CloudFormation change set reviewed before deploy
- [ ] No secrets or credentials are committed
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have stuff scanning for secrets at the org level, if you commit something that looks like a secret, you'll know 😉

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not convinced we need a specific template for infrastructure, front-end/back-end might be enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants