Creating Pull Request
- Pull Request SHALL target develop or master branch(for large scale projects use develop as the go-to branch for new features or other, non-hotfixable changes that should be scheduled for upcoming releases and master for medium sized libraries). You MAY also use other branches if you are fallowing specific release workflow.
- Added title MUST describe the change that you want to implement and MUST exclude project key(i.e.
foo-123), for example:Add subtract,Document multiply,Bump lodash to 4.17.15. - Adding Pull Request body MUST be initially omitted(its auto generated).
- All Github Actions MUST be successfully finished before any change is done to Pull Request. Sometimes it takes couple of seconds to start - don't be misled if this process is done immediately and successful.
- New Pull Request's title MUST be auto-generated - it prefixes user's tile with project key(i.e.
[FOO-123] User's title set during creation). - New Pull Request's body MUST be auto-generated with necessary template. For:
- fixes:
./.github/ISSUE_TEMPLATE/fix_template.md - default:
./.github/ISSUE_TEMPLATE/pull_request_template.md
- All automated actions that ensures Pull Request's mergeability MUST be finished successfully. You MUST ensure that labels are assigned to the Pull Request:
- builds - ensures that PR changes can be build
- formatted - ensures that PR changes are correctly styled
- linted - ensures that PR changes are linted
- conventional - ensures that commits fallow Conventional Commitsconvention
- tested - ensures that all tests are passing
- covered - ensures that tests matches coverage thresholds
- documented - ensures that documentation can be build(
npm run docs:build)
- Adding additional reviewers is RECOMMENDED.
- Pull Request's body MUST be filled with additional information that depends on the type(
fix/default) - i.e. description(s) of the change. - All required steps included in Review Checklist MUST be completed before merging Pull Request.
- Once all steps are completed - Pull Request MAY be merged.
update-pr.yml Action
When any opened Pull Request type runs(update-pr.yml):
- Apply labels to PRs based on branch name patterns from
./.github/pr-labeler.yml - Formats Pull Request for
fixtype:
- If label
fixis assigned:- Reads Pull Request body template from
./.github/ISSUE_TEMPLATE/fix_template.md - Updates Pull Request information by
tzkhan/pr-update-action- Prefixes PR title with project key i.e. [FOO]
- Adds PR body based on
fixtemplate
- Reads Pull Request body template from
- Else:
- Reads Pull Request body template from
./.github/ISSUE_TEMPLATE/pull_request_template.md - Updates Pull Request information by
tzkhan/pr-update-action- Prefixes PR title with project key i.e. [FOO]
- Adds PR body based on
pull_requesttemplate
- Reads Pull Request body template from
pr.yml Action
When any opened, reopened, or synchronize Pull Request type runs(pr.yml):
- Assign it to
reviewersbased on./.github/auto_assign.yml(add_reviewers) - Check code for misspells (misspell)
- Lint for conventional commits (lint_commits)
- Label with conventional if passing
- Run tests with
yarn teston multiple node versions(if defined)(test_unit)
- Label with tested if passing
- Test code with
yarn test:coverage&&yarn coverage:ci(validate_test_coverage)
- Label with covered if passing
- Test code with eslint reviewdog and report back(test_lint)
- Label with linted if passing and on inner workspace
- Check format of code with
yarn test:format(format)
- If
yarn test:formatis successful:- Label with formatted
- If
yarn test:formatfails:- Run
yarn format - Clean build files with
yarn clean - Commit the format changes as
github-actions[bot]to Pull Request head - Label with formatted
- Run
- Assign authors to
AUTHORSfile if necessary and commits changes asgithub-actions[bot] - Build code with
yarn build(build)
- Label with builds if passing
- Build documentation with
yarn docs:build(build)
- Label with documented if passing