File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ export default class GitHub {
62
62
}
63
63
}
64
64
65
- const existingLabelsNames = existingLabels . map ( label => label . name ) ;
65
+ const updatedExistingLabels = labelsToRemove . length ? await this . getRepositoryLabels ( ) : existingLabels ; // Refresh labels after deletion, only if needed
66
+ const existingLabelsNames = updatedExistingLabels . map ( label => label . name ) ;
66
67
const missingLabels = this . MANAGED_LABELS . filter ( label => ! existingLabelsNames . includes ( label . name ) ) ;
67
68
68
69
if ( missingLabels . length ) {
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ export default class GitLab {
56
56
}
57
57
}
58
58
59
- const existingLabelsNames = existingLabels . map ( label => label . name ) ;
59
+ const updatedExistingLabels = labelsToRemove . length ? await this . getRepositoryLabels ( ) : existingLabels ; // Refresh labels after deletion, only if needed
60
+ const existingLabelsNames = updatedExistingLabels . map ( label => label . name ) ;
60
61
const missingLabels = this . MANAGED_LABELS . filter ( label => ! existingLabelsNames . includes ( label . name ) ) ;
61
62
62
63
if ( missingLabels . length ) {
You can’t perform that action at this time.
0 commit comments