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

commit.author can be null #89

Merged
merged 2 commits into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/DeployPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ class DeployTable extends React.Component {
}
}

if (commit.author.login === BORS_LOGIN && commit.author.type === 'Bot') {
if (
commit.author &&
commit.author.login === BORS_LOGIN &&
commit.author.type === 'Bot'
) {
hasBors = true;
} else if (borsMode) {
continue;
Expand Down Expand Up @@ -430,7 +434,10 @@ class CommitDetails extends React.Component {
render() {
let { commit, author, tag, html_url, borsMode, owner, repo } = this.props;

let involvedUsers = [author];
let involvedUsers = [];
if (author) {
involvedUsers.push(author);
}

let title;
if (borsMode && author.login === BORS_LOGIN && author.type === 'Bot') {
Expand Down Expand Up @@ -656,7 +663,7 @@ class Culprits extends React.PureComponent {
<span className="on-prefix">On</span> {group.name}
</h4>
{group.users.map(([role, user]) => (
<div key={`${role}:${user}`} className="media">
<div key={`${role}:${user.login}`} className="media">
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That user object doesn't have a toString so it would become (assume role is "Commenter") 'Commenter:[object object]' which would be repeated.

<a href={user.html_url}>
<img
src={user.avatar_url}
Expand Down