Skip to content

Assigns tags to new issues #2

Assigns tags to new issues

Assigns tags to new issues #2

Workflow file for this run

name: Assigns tags to new issues
on:
issues:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
-
name: Compute label
id: compute_label
run: echo "label=$the_secret$(python .github/workflows/compute_label.py)" >> "$GITHUB_OUTPUT"
-
name: Create label
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
'${{ steps.compute_label.outputs.label }}',
'FFFFFF'
})
-
name: Add label to issue
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['${{ steps.compute_label.outputs.label }}']
})