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
chore(prlint): add exempt label to breaking change on stable modules (#18102)
This PR introduces a proposed new label, `pr-linter/exempt-breaking-change` that, when added, circumvents the check that asserts stable modules do not have breaking changes.
Motivation: A situation like #18027 where we have are willing to accept a functional breaking change to a stable module. The regular `allowed-breaking-changes.txt` file does not work here, since there is no breaking change to the API. We want to be able to document the breaking change, but by documenting we alert `prlint` that we are breaking a stable module.
Counterargument: Functional breaking changes were explicitly banned in #14861. From the PR description: "The CDK must be more strict on preventing such changes and the impact due to their perception."
I also added some "manual linting" to the file myself since it was bothering me, and now it muddies the diff. Sorry!
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
thrownewLinterError("Features must contain a change to a test file");
58
-
};
59
+
}
59
60
};
60
61
61
62
functionfixContainsTest(issue: any,files: any[]){
62
63
if(isFix(issue)&&!testChanged(files)){
63
64
thrownewLinterError("Fixes must contain a change to a test file");
64
-
};
65
+
}
65
66
};
66
67
67
68
functionshouldExemptReadme(issue: any){
@@ -72,6 +73,10 @@ function shouldExemptTest(issue: any) {
72
73
returnhasLabel(issue,EXEMPT_TEST);
73
74
}
74
75
76
+
functionshouldExemptBreakingChange(issue: any){
77
+
returnhasLabel(issue,EXEMPT_BREAKING_CHANGE);
78
+
}
79
+
75
80
functionhasLabel(issue: any,labelName: string){
76
81
returnissue.labels.some(function(l: any){
77
82
returnl.name===labelName;
@@ -93,7 +98,7 @@ function validateBreakingChangeFormat(title: string, body: string) {
93
98
thrownewLinterError(`Breaking changes should be indicated by starting a line with 'BREAKING CHANGE: ', variations are not allowed. (found: '${m[0]}')`);
0 commit comments