mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 21:30:24 +00:00
Merge pull request #429 from gardar/ci/_common-label
skip_changelog(ci): fix: ensure all roles are tested when _common role is changed
This commit is contained in:
commit
90ab1fbc33
1 changed files with 12 additions and 1 deletions
13
.github/workflows/conventional-label.yml
vendored
13
.github/workflows/conventional-label.yml
vendored
|
@ -73,7 +73,18 @@ jobs:
|
|||
steps.changed-roles.outputs.all_changed_and_modified_files
|
||||
with:
|
||||
script: |
|
||||
const labels = '${{ steps.changed-roles.outputs.all_changed_and_modified_files }}'.split(' ').map(i => 'roles/' + i);
|
||||
const changedRoles = '${{ steps.changed-roles.outputs.all_changed_and_modified_files }}'.split(' ');
|
||||
let labels = changedRoles.map(i => 'roles/' + i);
|
||||
|
||||
if (changedRoles.includes('_common')) {
|
||||
const allLabels = await github.paginate(github.rest.issues.listLabelsForRepo, {
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
});
|
||||
const roleLabels = allLabels.map(label => label.name).filter(name => name.startsWith('roles/'));
|
||||
labels = [...new Set([...labels, ...roleLabels])];
|
||||
}
|
||||
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
|
|
Loading…
Reference in a new issue