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

[danger] Fix pr author and ignore all CHANGELOG.md files in CODEOWNERS #8197

Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,3 +1,6 @@
# Ignore CHANGELOG.md files to prevent Danger.js from triggering code owner reviews
/packages/**/CHANGELOG.md @ghost

/packages/@unimodules/core @sjchmiela @tsapeta
/packages/@unimodules/react-native-adapter @sjchmiela @tsapeta
/packages/babel-preset-expo @brentvatne
Expand Down
2 changes: 1 addition & 1 deletion dangerfile.ts
Expand Up @@ -2,7 +2,7 @@ import { checkChangelog } from '@expo/danger';

const allowedUsers = ['lukmccall', 'sjchmiela', 'tsapeta', 'bbarthec', 'mczernek'];
// eslint-disable-next-line no-undef
const prAuthor = danger.github.pr.base.user.login;
const prAuthor = danger.github.pr.user.login;
if (allowedUsers.includes(prAuthor)) {
checkChangelog();
}
2 changes: 1 addition & 1 deletion packages/danger/build/ChangelogChecker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/danger/build/ChangelogChecker.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/danger/src/ChangelogChecker.ts
Expand Up @@ -23,7 +23,7 @@ export type FixedChangelogEntry = PackageChangelogEntry & { content: string; dif

// Setup
const pr = danger.github.pr;
const prAuthor = pr.base.user.login;
const prAuthor = pr.user.login;
const pullRequestManager = createPullRequestManager(danger.github.api, pr);

async function getFileDiffAsync(path): Promise<string> {
Expand Down