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 Jul 27, 2022
1 parent 3826853 commit 300306f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

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 300306f

Please sign in to comment.