Skip to content
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 #5224

39 changes: 39 additions & 0 deletions .github/workflows/auto_community_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

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' }}
MustafaJafar marked this conversation as resolved.
Show resolved Hide resolved
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' }}
MustafaJafar marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Add Contributor Label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: community contribution
MustafaJafar marked this conversation as resolved.
Show resolved Hide resolved

debug_labeler:
runs-on: ubuntu-latest
steps:
- name: get_author_association
env:
AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
run: echo "$AUTHOR_ASSOCIATION"
- name: check_condition
env:
CONDITION: ${{ github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER' }}
run: echo "$CONDITION"
Loading