https://github.com/netlify/pr-labeler-action
https://github.com/netlify/pr-labeler-action
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/netlify/pr-labeler-action
- Owner: netlify
- Created: 2020-05-12T15:52:51.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-24T00:34:24.000Z (4 months ago)
- Last Synced: 2025-04-25T20:05:32.932Z (about 2 months ago)
- Language: TypeScript
- Size: 1.38 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# pr-labeler-action
Example usage:
Create a `.github/workflows/labeler.yml` file with the content of:
```yaml
name: Label PR
on:
pull_request:
types: [opened, edited]jobs:
label-pr:
runs-on: ubuntu-latest
steps:
- uses: netlify/[email protected]
if: startsWith(github.event.pull_request.title, 'fix')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: bug'
- uses: netlify/[email protected]
if: startsWith(github.event.pull_request.title, 'chore')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: chore'
- uses: netlify/[email protected]
if: startsWith(github.event.pull_request.title, 'feat')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: feature'
```