This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
Github Action: Add Auto Labeler for community PR and Issues #11
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 Community Labeler | |
on: | |
pull_request: | |
issues: | |
jobs: | |
auto_PR_labeler: | |
name: Auto PR Community Labeler | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER' }} | |
steps: | |
- name: Add Contributor Label | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: community contribution | |
auto_Issue_labeler: | |
name: Auto Issue Community Labeler | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'issues' && github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER' }} | |
steps: | |
- name: Add Contributor Label | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: community contribution | |
debug_labeler: | |
runs-on: ubuntu-latest | |
steps: | |
- name: get_author_association | |
env: | |
AUTHOR_ASSOCIATION: ${{ github.event.issue.author_association }} | |
run: echo "$AUTHOR_ASSOCIATION" | |
- name: check_condition | |
env: | |
CONDITION: ${{ github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER' }} | |
run: echo "$CONDITION" |