Skip to content

Commit

Permalink
default labels to empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
jetersen committed Jan 8, 2021
1 parent 5ddf0f7 commit 0b48d69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/labeler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as core from '@actions/core';
import {Inputs} from './context';
import {GitHub, getOctokitOptions, context} from '@actions/github/lib/utils';
import {config} from '@probot/octokit-plugin-config';
import deepmerge from 'deepmerge';
export type Label = {
name: string;
color: string;
Expand Down Expand Up @@ -213,7 +212,7 @@ export class Labeler {
configs
.map(config => {
const labels = config.labels ? config.labels : config;
return {labels};
return {labels: labels || []};
})
.map(config => {
config.labels.forEach(function (item: Label) {
Expand Down

0 comments on commit 0b48d69

Please sign in to comment.