Skip to content

Commit

Permalink
Update add_label.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Jun 28, 2024
1 parent 38cedf1 commit 8a28a36
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/add_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ jobs:
const packages = packagesFiles.map(file => file.split('/')[1])
const labels = Array.from(new Set(packages))
// verify documentation
const packagesFiles = files.filter(file => file.startsWith('website/'))
labels.push('documentation')
// verify documentation
const packagesFiles = files.filter(file => file.startsWith('examples/'))
labels.push('examples')
// verify documentation
const packagesFiles = files.filter(file => !file.startsWith('website/') && !file.startsWith('packages/') && file.startsWith('!file.startsWith('examples/')'))
// verify documentation
const wasDocModified = files.filter(file => file.startsWith('website/')).length > 0
if (wasDocModified) {
labels.push('documentation')
}
// verify examples
const wasExampleModified = files.filter(file => file.startsWith('examples/')).length > 0
if (wasExampleModified) {
labels.push('examples')
}
// verify repo
const wasRepoModified = files.filter(file => !file.startsWith('website/') && !file.startsWith('packages/') && file.startsWith('!file.startsWith('examples/')'))
labels.push('repo')
github.rest.issues.addLabels({
Expand All @@ -45,5 +49,5 @@ jobs:
repo: context.repo.repo,
labels: labels
})

0 comments on commit 8a28a36

Please sign in to comment.