Skip to content

Add auto-labelling workflow #7

Add auto-labelling workflow

Add auto-labelling workflow #7

name: on-issue-created

Check failure on line 1 in .github/workflows/on-issue-created.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/on-issue-created.yml

Invalid workflow file

(Line: 16, Col: 9): Unrecognized named-value: 'env'. Located at position 10 within expression: contains(env.BODY, 'browser: Chrome') || contains(env.BODY, 'browser: Edge'), (Line: 23, Col: 9): Unrecognized named-value: 'env'. Located at position 10 within expression: contains(env.BODY, 'browser: Firefox'), (Line: 30, Col: 9): Unrecognized named-value: 'env'. Located at position 10 within expression: contains(env.BODY, 'browser: Safari')
on:
issues:
types: opened
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
BODY: ${{ github.event.issue.body }}
jobs:
label-chromium:
runs-on: ubuntu-latest
if: "${{ contains(env.BODY, 'browser: Chrome') || contains(env.BODY, 'browser: Edge') }}"
permissions:
issues: write
steps:
- run: gh issue edit "$NUMBER" --add-label "Chromium"
label-firefox:
runs-on: ubuntu-latest
if: "${{ contains(env.BODY, 'browser: Firefox') }}"
permissions:
issues: write
steps:
- run: gh issue edit "$NUMBER" --add-label "Firefox"
label-safari:
runs-on: ubuntu-latest
if: "${{ contains(env.BODY, 'browser: Safari') }}"
permissions:
issues: write
steps:
- run: gh issue edit "$NUMBER" --add-label "Safari"