Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
commits.data[i]['author'] can be null
  • Loading branch information
MarcusTomlinson committed Apr 17, 2021
1 parent c40b402 commit f505980
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Expand Up @@ -36,7 +36,10 @@ async function run() {

var commit_authors = []
for (const i in commits.data) {
const username = commits.data[i]['author']['login'];
var username;
if (commits.data[i]['author']) {
username = commits.data[i]['author']['login'];
}
const email = commits.data[i]['commit']['author']['email'];
commit_authors[username] = {
'username': username,
Expand All @@ -51,6 +54,9 @@ async function run() {
const username = commit_authors[i]['username'];
const email = commit_authors[i]['email'];

if (!username) {
continue;
}
if (username == 'dependabot[bot]') {
console.log('- ' + username + ' ✓ (GitHub Dependabot)');
commit_authors[i]['signed'] = true;
Expand Down

0 comments on commit f505980

Please sign in to comment.