Skip to content

Create lint-job.yml

Create lint-job.yml #5

name: 'PR Open'
on:
pull_request:
branches:
- main
types:
- opened
jobs:
check_labels:
name: 'Check PR Labels'
runs-on: ubuntu-latest
permissions:
pull-requests: write
outputs:
status: ${{ steps.labels.outputs.status }}
steps:
- id: labels
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: 'major, minor, patch'
exit_type: success
add_label:
name: 'Add Default Label'
needs: check_labels
runs-on: ubuntu-latest
if: needs.check_labels.outputs.status == 'failure'
steps:
- name: Add Default Label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: 'minor'