From bb8820629776cde5cfb4c15a5e7be70d6a5805d3 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:39:39 -0300 Subject: [PATCH] Update add_label.yml --- .github/workflows/add_label.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/add_label.yml b/.github/workflows/add_label.yml index 9f54f0045..a1918f634 100644 --- a/.github/workflows/add_label.yml +++ b/.github/workflows/add_label.yml @@ -27,30 +27,44 @@ jobs: const rawFiles = execSync(`git diff --name-only HEAD HEAD~${commits}`).toString() const files = rawFiles.split('\n').filter(Boolean) + console.log('##### Modified Files #####') + console.log(files) + console.log('##########################') + // verify packages const packagesFiles = files.filter(file => file.startsWith('packages/') && !file.includes('mix_lint_test')) const packages = packagesFiles.map(file => file.split('/')[1]) const labels = Array.from(new Set(packages)) + console.log('##### PackagesLabels #####') + console.log(labels) + console.log('##########################') + // verify documentation const wasDocModified = files.filter(file => file.startsWith('website/')).length > 0 if (wasDocModified) { labels.push('documentation') + + console.log('documentation label was added') } // verify examples const wasExampleModified = files.filter(file => file.startsWith('examples/')).length > 0 if (wasExampleModified) { labels.push('examples') + console.log('examples label was added') } // verify repo const wasRepoModified = files.filter(file => !file.startsWith('website/') && !file.startsWith('packages/') && !file.startsWith('examples/')).length > 0 if (wasRepoModified) { labels.push('repo') + console.log('rep label was added') } + console.log('##### Added Labels #####') console.log(labels) + console.log('##########################') github.rest.issues.addLabels({ issue_number: context.issue.number,