SerenityOS/discord-bot

test262 command fails when commit author has no GitHub account

sin-ack opened this issue · 2 comments

Example commit: SerenityOS/serenity@f55d7bf
This is a patch from Anonymous, which doesn't have a GitHub account. Calling /test262 with this commit causes the bot to fail with: Cannot read properties of null (reading 'login').

The bug is here:

.setAuthor(`@${commit.author.login}`, commit.author.avatar_url, commit.author.html_url)

A null check needs to be added in case the commit author doesn't have a GitHub account.

@sin-ack do you want to send a PR since you figured out the issue?

Sure, I'll do it tomorrow.