template-deploy DRY-up from initial

Signed-off-by: Collin McNeese <[email protected]>
This commit is contained in:
Collin McNeese
2022-11-23 10:47:29 -06:00
parent 461b6932b6
commit fbe4dc53f7
+8 -26
View File
@@ -21,38 +21,20 @@ jobs:
with: with:
script: | script: |
let labels = [ let labels = [
{ 'jenkins',
name: 'jenkins', 'azure-devops',
color: '00FFFF', 'circle-ci',
}, 'gitlab',
{ 'travis-ci',
name: 'azure-devops', 'actions-importer-running'
color: '00FFFF',
},
{
name: 'circle-ci',
color: '00FFFF',
},
{
name: 'gitlab',
color: '00FFFF',
},
{
name: 'travis-ci',
color: '00FFFF',
},
{
name: 'actions-importer-running',
color: '00FFFF',
}
]; ];
labels.forEach( (label) => { labels.forEach( (label) => {
github.rest.issues.createLabel({ github.rest.issues.createLabel({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
name: label.name, name: label,
color: label.color, color: '00FFFF',
description: 'Label used by Issue Ops workflow.' description: 'Label used by Issue Ops workflow.'
}); });
}); });