@opentermsarchive/engine 6.0.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentermsarchive/engine",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Tracks and makes visible changes to the terms of online services",
5
5
  "homepage": "https://opentermsarchive.org",
6
6
  "bugs": {
@@ -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) {
@@ -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) {