Use lodash's isEqual

This commit is contained in:
Nikolai Laevskii
2023-10-04 11:23:34 +02:00
parent 27ee87f076
commit df65a7144a
7 changed files with 1980 additions and 25 deletions

View File

@@ -3,7 +3,8 @@ import * as github from '@actions/github';
import * as pluginRetry from '@octokit/plugin-retry';
import {Minimatch} from 'minimatch';
import * as api from './api';
import {isListEqual, printPattern} from './utils';
import isEqual from 'lodash.isequal';
import {printPattern} from './utils';
import {getInputs} from './get-inputs';
interface MatchConfig {
@@ -56,7 +57,7 @@ async function labeler() {
let newLabels: string[] = [];
try {
if (!isListEqual(labelsToAdd, preexistingLabels)) {
if (!isEqual(labelsToAdd, preexistingLabels)) {
await api.setLabels(client, pullRequest.number, labelsToAdd);
newLabels = labelsToAdd.filter(
label => !preexistingLabels.includes(label)