Skip to content

Remove broken features... #65

Remove broken features...

Remove broken features... #65

Workflow file for this run

on:
pull_request_target:
types:
- opened
- reopened
name: Label PRs with `patch` by default
jobs:
get-labels:
name: Get PR labels
runs-on: ubuntu-latest
if: >
! startsWith(github.event.pull_request.head.ref, 'release/')
outputs:
labels: ${{ steps.get-labels.outputs.labels }}
steps:
- name: Get PR labels from GitHub API
id: get-labels
env:
REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
LABELS=$(gh api "repos/$REPO/issues/$NUMBER/labels")
echo "PR #$NUMBER is labeled with: $LABELS"
echo "labels=$LABELS" >> "$GITHUB_OUTPUT"
label:
name: Label PR with `patch`
needs:
- get-labels
if: >
! ( contains(fromJSON(needs.get-labels.outputs.labels).*.name, 'release')
|| contains(fromJSON(needs.get-labels.outputs.labels).*.name, 'minor')
|| contains(fromJSON(needs.get-labels.outputs.labels).*.name, 'major')
)
runs-on: ubuntu-latest
steps:
- name: Label PR with `patch`
uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}