Skip to content

Commit

Permalink
skip_changelog(ci): fix: ensure all roles are tested when _common rol…
Browse files Browse the repository at this point in the history
…e is changed

Signed-off-by: gardar <[email protected]>
  • Loading branch information
gardar committed Oct 17, 2024
1 parent 7abf7d3 commit 6dd9376
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/conventional-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6dd9376

Please sign in to comment.