Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PR labeler based on LoC #50

Merged
merged 3 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/configs/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 1
labels:
- label: "size/XS"
size-below: 10
- label: "size/S"
size-above: 9
size-below: 30
- label: "size/M"
size-above: 29
size-below: 100
- label: "size/L"
size-above: 99
size-below: 500
- label: "size/XL"
size-above: 499
size-below: 1000
- label: "size/XXL"
size-above: 999
- label: "testing-needed-e2e-fast"
size-above: 99
20 changes: 20 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
# Source: https://github.com/srvaroa/labeler
# Using this instead of the GH labeler action as the former supports labeling based on LoC changed.
# However, it doesn't work with regex pattern to ignore generated files (CRDs, docs, etc.) in diff.
# An issue has been filed https://github.com/srvaroa/labeler/issues/33 to track this improvement.
- uses: srvaroa/labeler@v0.9
with:
config_path: .github/configs/labeler.yml
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"