Skip to content

Commit c22ca11

Browse files
committed
fix: make link rule less strict
1 parent 5d05232 commit c22ca11

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

dist/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ function isFormatValid(name) {
122122
Object.defineProperty(exports, "__esModule", ({ value: true }));
123123
exports.hasPRLink = hasPRLink;
124124
function hasPRLink(migration) {
125-
const trimmedContent = migration.trim();
126-
return trimmedContent.startsWith('-- https://github.com/') || trimmedContent.startsWith('-- PR: https://github.com/');
125+
return migration.trim().toLocaleLowerCase().includes('https://github.com/');
127126
}
128127

129128

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sidestream-tech/lint-prisma-migrations",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"private": true,
55
"main": "lib/main.js",
66
"engines": {

src/rules/link.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export function hasPRLink(migration: string) {
2-
const trimmedContent = migration.trim()
3-
return trimmedContent.startsWith('-- https://github.com/') || trimmedContent.startsWith('-- PR: https://github.com/')
2+
return migration.trim().toLocaleLowerCase().includes('https://github.com/')
43
}

0 commit comments

Comments
 (0)