You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new prlint rule that checks whether the size of the PR exceeds the predefined threshold. The PR size is measured by how many lines of code were added or removed (as reported by Git). If either the number of additions or deletions exceeds 1000 lines, the rule reports an error.
Only two packages are subject to this check: `aws-cdk` and `@aws-cdk-testing/cli-integ`. Markdown files and `THIRD_PARTY_LICENSES` are also excluded.
Prior art: [amplify-backend](https://github.com/aws-amplify/amplify-backend/blob/main/scripts/check_pr_size.ts).
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: tools/@aws-cdk/prlint/README.md
+13-11
Original file line number
Diff line number
Diff line change
@@ -2,29 +2,31 @@
2
2
3
3
This package includes a GitHub Action that does the following:
4
4
- Checks pull requests around PR titles, description and other metadata.
5
-
- Assesses whether or not the PR is ready for review and attaches the correct label to the PR.
5
+
- Assesses whether the PR is ready for review and attaches the correct label to the PR.
6
6
7
7
# Rules
8
8
9
-
The first part of the GitHub Action validates whether or not the pull request adheres
9
+
The first part of the GitHub Action validates whether the pull request adheres
10
10
(or has been exempted from) to the following rules:
11
11
12
12
1.`feat` requires a change to a `README.md` (exemption is the label `pr-linter/exempt-readme`).
13
13
2. Both `feat` and `fix` PRs require a change to a unit test file and integration test files (exemption is the label `pr-linter/exempt-unit-test` or `pr-linter/exempt-integ-test`).
14
-
4.`BREAKING CHANGE` section is formatted correctly, per the [conventional commits] spec.
15
-
5. No breaking changes announced for stable modules.
16
-
6. Title prefix and scope is formatted correctly.
17
-
7. The PR is not opened from the main branch of the author's fork.
18
-
8. Changes to the cli have been run through the test pipeline where cli integ tests are run (indicated by the label `pr-linter/cli-integ-tested`).
19
-
9. No manual changes to `packages/aws-cdk-lib/region-info/build-tools/metadata.ts` file.
14
+
3.`BREAKING CHANGE` section is formatted correctly, per the [conventional commits] spec.
15
+
4. No breaking changes announced for stable modules.
16
+
5. Title prefix and scope is formatted correctly.
17
+
6. The PR is not opened from the main branch of the author's fork.
18
+
7. Changes to the cli have been run through the test pipeline where cli integ tests are run (indicated by the label `pr-linter/cli-integ-tested`).
19
+
8. No manual changes to `packages/aws-cdk-lib/region-info/build-tools/metadata.ts` file.
20
+
9. The size of the PR (number of lines added or removed) does not exceed the
21
+
pre-defined threshold of 1000.
20
22
21
23
> These rules are currently hard coded, in the future, we should consider using [danger.js](https://danger.systems/js/).
0 commit comments