diff --git a/.github/workflows/setup-labels.yml b/.github/workflows/setup-labels.yml index fb98bf8..531454d 100644 --- a/.github/workflows/setup-labels.yml +++ b/.github/workflows/setup-labels.yml @@ -127,6 +127,23 @@ jobs: name: 'size/XL', color: 'FF0000', description: 'Extra large PR (>500 lines changed)' + }, + + // ==================== AUTOMATION LABELS ==================== + { + name: 'pending-coderabbit-review', + color: 'FBCA04', + description: 'Waiting for CodeRabbit automated review' + }, + { + name: 'template_sync', + color: 'BFDADC', + description: 'PR created by template sync workflow' + }, + { + name: 'auto_pr', + color: '0E8A16', + description: 'Automatically generated pull request' } ]; @@ -134,7 +151,6 @@ jobs: console.log('šŸ·ļø REPOSITORY LABEL SETUP'); console.log('='.repeat(60)); console.log(`Total labels to create: ${requiredLabels.length}\n`); - // Get existing labels with pagination const existingLabels = await github.paginate( github.rest.issues.listLabelsForRepo, @@ -151,12 +167,11 @@ jobs: let updated = 0; let skipped = 0; let failed = 0; - // Process each label for (const label of requiredLabels) { try { if (!existingLabelNames.includes(label.name)) { - // Create new label + // Create new label await github.rest.issues.createLabel({ owner: context.repo.owner, repo: context.repo.repo, @@ -190,7 +205,7 @@ jobs: } } - // Summary + // Summary console.log('\n' + '='.repeat(60)); console.log('šŸ“Š SUMMARY'); console.log('='.repeat(60)); @@ -200,11 +215,11 @@ jobs: console.log(`āŒ Failed: ${failed}`); console.log('='.repeat(60)); - // Fail the step if any labels failed to create/update + // Fail the step if any labels failed to create/update if (failed > 0) { core.setFailed(`Label setup failed! ${failed} label(s) could not be created or updated.`); } else if (created > 0 || updated > 0) { console.log('\nšŸŽ‰ Label setup complete! Your repository is ready.'); } else { console.log('\n✨ All labels are already up to date.'); - } + } \ No newline at end of file