fix: Limit number of labels added to 100 (#497)

* push to excess labels to avoid reaching the limit

* build dist

* never set more than 100 labels

* use splice instead of set

* ignore IDE folders

* install @octokit/plugin-retry

* always setLabels

* fix indentations

* fix specs

* add spec for excess labels

* prettier

* licensed cache

* revert to !!core.getInput('sync-labels')

* better warning for exceeded labels

* keep manually-added labels

* nest the dedupe logic

* rename `removeLabel` to `removeLabelFromList` to avoid confusion

* use Sets, and issue a call only if labels have actually changed

* remove IDE config folders from gitignore

* remove obsolete duplucation check

---------

Co-authored-by: Mark Massoud <mark@unrealcloud.io>
This commit is contained in:
Mark Massoud
2023-06-21 05:49:43 -04:00
committed by GitHub
parent b5ff161cf0
commit 7a202e6428
12 changed files with 1933 additions and 77 deletions

View File

@@ -13,8 +13,7 @@ export const context = {
const mockApi = {
rest: {
issues: {
addLabels: jest.fn(),
removeLabel: jest.fn()
setLabels: jest.fn()
},
pulls: {
get: jest.fn().mockResolvedValue({}),