Skip to content

Commit

Permalink
[danger] Fix pr author and ignore all CHANGELOG.md files in CODEOWNERS (
Browse files Browse the repository at this point in the history
#8197)

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

* Apply requested changes

Co-authored-by: Tomasz Sapeta <1714764+tsapeta@users.noreply.github.com>

Co-authored-by: Tomasz Sapeta <1714764+tsapeta@users.noreply.github.com>
  • Loading branch information
lukmccall and tsapeta committed May 11, 2020
1 parent a4f269a commit bf9a495
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
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

0 comments on commit bf9a495

Please sign in to comment.