Skip to content

Commit 0bd6594

Browse files
Changes from lint:fix
1 parent cadfcb7 commit 0bd6594

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

.github/actions/check-pr/index.js

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build-packages/check-pr/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ import { context } from '@actions/github';
33
import { validateTitle, validateBody } from './validators.js';
44

55
function capitalizeAfterColon(title: string): string {
6-
return title.replace(/^([^:]+:\s*)(\w)/, (_, pre, char) =>
7-
pre + char.toUpperCase()
6+
return title.replace(
7+
/^([^:]+:\s*)(\w)/,
8+
(_, pre, char) => pre + char.toUpperCase()
89
);
910
}
1011

1112
try {
1213
const pr = context.payload.pull_request;
1314
const isDependabot = pr?.user?.login === 'dependabot[bot]';
14-
const title = isDependabot && pr?.title ? capitalizeAfterColon(pr.title) : pr?.title;
15+
const title =
16+
isDependabot && pr?.title ? capitalizeAfterColon(pr.title) : pr?.title;
1517
validateTitle(title);
1618
validateBody(pr?.body?.replace(/\r\n/g, '\n'));
1719
} catch (err: any) {

0 commit comments

Comments
 (0)