Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default-dangerfile.ts #1315

Merged
merged 1 commit into from Sep 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/commands/init/default-dangerfile.ts
Expand Up @@ -89,8 +89,8 @@ if (danger.github.pr.assignee === null) {
export const checkSeparateTestsFolder = (src: string, tests: string) => `
// Request changes to ${src} also include changes to tests.
const allFiles = danger.git.modified_files.concat(danger.git.created_files)
const hasAppChanges = allFiles.some(p => includes(p, '${src}/'))
const hasTestChanges = allFiles.some(p => includes(p, '${tests}/'))
const hasAppChanges = allFiles.some(p => p.includes('${src}/'))
const hasTestChanges = allFiles.some(p => p.includes('${tests}/'))

if (hasAppChanges && !hasTestChanges) {
warn('This PR does not include changes to tests, even though it affects app code.');
Expand Down