Auto Label for PRs and Issues #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Label for PRs and Issues | |
on: | |
pull_request: | |
types: | |
- opened | |
issues: | |
types: | |
- opened | |
jobs: | |
auto-label: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Add "contributor" label to PRs | |
if: github.event_name == 'pull_request' | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: "contributor" | |
- name: Add "issue" label to Issues | |
if: github.event_name == 'issues' | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: "issue" |