Skip to content

Add CVE Label

Add CVE Label #1

Workflow file for this run

name: Add CVE Label
on:
issues:
types:
- labeled
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
add-comment:
if: github.event.label.name == "Mend: dependency security vulnerability"

Check failure on line 11 in .github/workflows/add-cve-label.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/add-cve-label.yml

Invalid workflow file

You have an error in your yaml syntax on line 11
runs-on: ubuntu-latest
steps:
- name: Get Issue Title
id: get_title
run: |
issue_title="${{ github.event.issue.title }}"
severity="$(echo $issue_title | sed -n 's/.*(\(.*\)).*/\1/p')"
echo "severity=$severity" >> $GITHUB_ENV
- name: Add CVE Label
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: ${{ github.event.issue.number }},
owner: context.repo.owner,
repo: context.repo.repo,
labels: ${{ env.severity }}
})