Skip to content

feature: Library module #4

feature: Library module

feature: Library module #4

Workflow file for this run

name: 'Autolabeling'
on:
issues:
types:
- opened
- edited
pull_request_target:
types:
- opened
- edited
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- id: label-generator
uses: ./.github/actions/label-generator
with:
value: ${{ github.event.issue && github.event.issue.title || github.event.pull_request.head.ref }}
- name: Apply label on Issue
if: github.event.issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
URL: ${{ github.event.issue.html_url }}
LABEL: ${{ steps.label-generator.outputs.label }}
run: |
gh issue edit "$URL" --add-label "$LABEL"
- name: Apply label on PR
if: github.event.pull_request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
URL: ${{ github.event.pull_request.html_url }}
LABEL: ${{ steps.label-generator.outputs.label }}
run: |
gh pr edit "$URL" --add-label "$LABEL"