Skip to content

Add tests to github actions #138

Add tests to github actions

Add tests to github actions #138

Workflow file for this run

name: Add Triage Label
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: Check for existing labels
id: check_labels
uses: actions/github-script@v6
with:
script: |
const labels = await github.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
return labels.data.length > 0;
- name: Add Triage Label
if: steps.check_labels.outputs.result == 'false'
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: triage