INNER CODE UNIT · JavaScript

applyLabelChanges

MatiPl01/react-native-sortables · .github/actions/labeler/index.js:82

async function applyLabelChanges(octokit, labelsToAdd, labelsToRemove) {
  // Remove outdated labels first
  if (labelsToRemove.length > 0) {
    console.log(
      `\n🗑️ Removing ${labelsToRemove.length} outdated label(s): [${labelsToRemove.join(', ')}]`
    );
    await removeLabels(octokit, labelsToRemove);
  }

  // Add new labels
  if (labelsToAdd.length > 0) {
    console.log(
      `\n➕ Adding ${labelsToAdd.length} new label(s): [${labelsToAdd.join(', ')}]`
    );
    await addLabels(octokit, labelsToAdd);
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…