fix manual actions

Manually running actions that add contributors fails.
This should fix that.
This commit is contained in:
Hugh Rundle 2021-02-06 12:45:55 +11:00
parent 301e0e419d
commit 4422f2ff5a

View file

@ -8,7 +8,9 @@ var eventJson = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, {encod
$('#contributors-list').empty() // remove all names to start clean
for (let name of contributors) {
if (name.length > 0) {
// check the name isn't empty and there are commits
// if this is run manually there won't be any commits
if (name.length > 0 && eventJson.commits) {
for (let commit of eventJson.commits) {
// we only look for authors, not commiters, so we automatically ignore "actions-user"
if ( !contributors.includes(commit.author.name) ) {