Skip to content

Commit d8f769f

Browse files
author
Igor Oleinikov
committed
Try file path
1 parent b0d57b8 commit d8f769f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/js/dangerfile.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ import { danger, fail } from 'danger';
44

55
export default async () => {
66
if (danger.github.pr) {
7-
console.log('PR exists', danger.github.pr.html_url);
8-
fail('This dangerfile is not ready yet.');
7+
const match = danger.git.fileMatch('dangerfile');
8+
if (match.edited) {
9+
const file = match.getKeyedPaths().edited[0]
10+
fail('This dangerfile is not ready yet.', file);
11+
}
12+
else
13+
fail('This dangerfile is not ready yet. Location is unknown.');
914
} else {
1015
fail('PR does not exist');
1116
}

0 commit comments

Comments
 (0)