Pull Requests
Pull Requests are a way of fostering collaboration, improving code quality and reducing bugs. All repositories should have a similar branch rule set where individuals may not push directly to the main branch.
Template
The main template used for pull requests has the following format and should be included in each repo as the default.
A default PR template can be added to the repo's .github/
folder as pull_request_template.md
NOTES
- PR Title should contain TP Card Id with a description
-U123: Update invalid contact message
-B321: 503262 - Fix domain search crashing - Branch name should NOT have slashes AND should contain the TP Card Id
-U123-invalid_contact_message
-B231-503262_broken_domain_search
Description
- TP ID (TP 12345)
- TP URL Link (https://tpurl.example/12345)
- Short description of the change (Fix issue with login page.)
Related PR's
List other open PR's that are part of this work, with links.
- rebelwebui/pr/link
- rebelsearch/pr/link
Affected Areas
This section should contain areas of the application this change touches.
- API
- Login UI
Reviewer Checklist
[ ] Build and tests completed successfully
[ ] Follows Rebel code guidelines
Github Actions
Github Actions, defined in the repository's .github/workflows/
folder in a .yml file, describe any extra work to be done on a PR for each commit.
For example, actions are where we define any PR-level testing jobs. All actions/checks must be passing in order for a Pull Requests to be deemed safe to merge.
Testing
Testing at the PR-level can have some philosophical elements. For example, which type tests do you run? Do we test for coverage and at which threshold? Do we really need 100% test coverage? etc...
At a high level, we run unit tests on components and end-to-end tests on features. Ideally, utility functions should are pure and unit tested.
For this reason, certain repos will have GitHub Actions for Jest test specs, and others for Cypress test specs
At a high lever, use Cypress to test a feature's "happy path" to ensure it general works as expected. Edge cases and bug fixes can be tested using Jest integration tests. Jest should be used at the component and pure function level.
Dependabot
Dependabot is an extra tool used to keep npm packages up to date.
With options defined in a repository's .dependabot/config.yml
file, Pull Requests should be automatically created at regular intervals for available package updates. Most are currently set at one week intervals.