Skip to content

Commit b38d125

Browse files
authored
Merge branch 'main' into huijbers/fix-init
2 parents 3cd8635 + 6840bc3 commit b38d125

4 files changed

Lines changed: 30 additions & 9 deletions

File tree

CHANGELOG.v2.alpha.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.42.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.42.0-alpha.0...v2.42.1-alpha.0) (2022-09-19)
6+
57
## [2.42.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.41.0-alpha.0...v2.42.0-alpha.0) (2022-09-15)
68

79

CHANGELOG.v2.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.42.1](https://github.com/aws/aws-cdk/compare/v2.42.0...v2.42.1) (2022-09-19)
6+
7+
8+
### Reverts
9+
10+
* **init-templates:** csharp and fsharp app init fails when path contains space ([#22112](https://github.com/aws/aws-cdk/issues/22112)) ([89f64d4](https://github.com/aws/aws-cdk/commit/89f64d4082d1a339caa1eab04a9ffc63b9088d9a)), closes [aws/aws-cdk#21049](https://github.com/aws/aws-cdk/issues/21049)
11+
512
## [2.42.0](https://github.com/aws/aws-cdk/compare/v2.41.0...v2.42.0) (2022-09-15)
613

714

tools/@aws-cdk/prlint/lint.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ function validateBreakingChangeFormat(title: string, body: string) {
122122
}
123123
}
124124

125+
/**
126+
* Check that the PR title has the correct prefix.
127+
*/
128+
function validateTitlePrefix(title: string) {
129+
const titleRe = /^(feat|fix|build|chore|ci|docs|style|refactor|perf|test)(\([\w-]+\)){0,1}: /;
130+
if (!titleRe.exec(title)) {
131+
throw new LinterError("❗️ The title of this PR must have the correct conventional prefix");
132+
}
133+
}
134+
125135
function assertStability(title: string, body: string) {
126136
const breakingStable = breakingModules(title, body)
127137
.filter(mod => 'stable' === moduleStability(findModulePath(mod)));
@@ -138,24 +148,24 @@ export async function validatePr(number: number) {
138148
}
139149

140150
const gh = createGitHubClient();
141-
151+
142152
const issues = gh.getIssues(OWNER, REPO);
143153
const repo = gh.getRepo(OWNER, REPO);
144-
154+
145155
console.log(`⌛ Fetching PR number ${number}`);
146156
const issue = (await issues.getIssue(number)).data;
147-
157+
148158
console.log(`⌛ Fetching files for PR number ${number}`);
149159
const files = (await repo.listPullRequestFiles(number)).data;
150-
160+
151161
console.log("⌛ Validating...");
152-
162+
153163
if (shouldExemptReadme(issue)) {
154164
console.log(`Not validating README changes since the PR is labeled with '${EXEMPT_README}'`);
155165
} else {
156166
featureContainsReadme(issue, files);
157167
}
158-
168+
159169
if (shouldExemptTest(issue)) {
160170
console.log(`Not validating test changes since the PR is labeled with '${EXEMPT_TEST}'`);
161171
} else {
@@ -168,14 +178,16 @@ export async function validatePr(number: number) {
168178
} else {
169179
featureContainsIntegTest(issue, files);
170180
}
171-
181+
172182
validateBreakingChangeFormat(issue.title, issue.body);
173183
if (shouldExemptBreakingChange(issue)) {
174184
console.log(`Not validating breaking changes since the PR is labeled with '${EXEMPT_BREAKING_CHANGE}'`);
175185
} else {
176186
assertStability(issue.title, issue.body);
177187
}
178188

189+
validateTitlePrefix(issue.title);
190+
179191
console.log("✅ Success");
180192
}
181193

version.v2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "2.42.0",
3-
"alphaVersion": "2.42.0-alpha.0"
2+
"version": "2.42.1",
3+
"alphaVersion": "2.42.1-alpha.0"
44
}

0 commit comments

Comments
 (0)