From d62299348380b8cc8bdf222e93481eb05db60d54 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sat, 17 Jun 2023 20:41:38 +0200 Subject: [PATCH] Add workflow "PR size labeler" to label PRs based on the number of changed lines This should help reviewers to determine which PRs to review. --- .github/changed-lines-count-labeler.yml | 17 +++++++++++++++++ .github/workflows/pr-labeler.yml | 13 +++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/changed-lines-count-labeler.yml create mode 100644 .github/workflows/pr-labeler.yml diff --git a/.github/changed-lines-count-labeler.yml b/.github/changed-lines-count-labeler.yml new file mode 100644 index 000000000..902f376c0 --- /dev/null +++ b/.github/changed-lines-count-labeler.yml @@ -0,0 +1,17 @@ +# Add 'size/small' label to any changes with less than 50 lines +size/small: + max: 49 + +# Add 'size/medium' label to any changes between 50 and 249 lines +size/medium: + min: 50 + max: 249 + +# Add 'size/large' label to any changes between 250 and 749 lines +size/large: + min: 250 + max: 749 + +# Add 'size/giant' label to any changes for more than 749 lines +size/giant: + min: 750 diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 000000000..8aad9b125 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,13 @@ +name: "PR size labeler" +on: [pull_request] + +jobs: + changed-lines-count-labeler: + runs-on: ubuntu-latest + name: Automatically labelling pull requests based on the changed lines count + steps: + - name: Set a label + uses: vkirilichev/changed-lines-count-labeler@v0.2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/changed-lines-count-labeler.yml