From 2f115e8dab566d4eee83f15d3c1e82802b255904 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Sat, 10 Oct 2026 16:36:00 +0700 Subject: [PATCH] ci: stop labeling a new entry's icon as an update --- .github/workflows/triage.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 0fd6ef6..0c26bb3 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -29,6 +29,7 @@ jobs: const files = await github.paginate(github.rest.pulls.listFiles, { owner, repo, pull_number: pr.number, per_page: 100 }); const labels = new Set(); const slugs = new Map(); + const assetSlugs = new Set(); for (const file of files) { const entry = /^integrations\/([a-z0-9-]{1,40})\/(.+)$/.exec(file.filename); if (entry) { @@ -36,7 +37,7 @@ jobs: slugs.set(entry[1], file.status); labels.add(file.status === 'added' ? 'new integration' : file.status === 'removed' ? 'removal' : 'update'); } else { - labels.add('update'); + assetSlugs.add(entry[1]); } } else if (file.filename.startsWith('curation/')) { labels.add('curation'); @@ -44,6 +45,9 @@ jobs: labels.add('tooling'); } } + for (const slug of assetSlugs) { + if (!['added', 'removed'].includes(slugs.get(slug))) labels.add('update'); + } async function readJson(repoOwner, repoName, ref, path) { try { const { data } = await github.rest.repos.getContent({ owner: repoOwner, repo: repoName, path, ref });