From 5b3b675f8d05df56877940772fffec1d63963b37 Mon Sep 17 00:00:00 2001 From: rnetser Date: Fri, 15 Nov 2024 13:26:44 +0200 Subject: [PATCH] add size labels --- .github/workflows/pre-commit.yml | 2 +- .github/workflows/size_labeler.yml | 33 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/size_labeler.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 2b11178..a12ad92 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,6 +9,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v3 - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/size_labeler.yml b/.github/workflows/size_labeler.yml new file mode 100644 index 0000000..03e4d6e --- /dev/null +++ b/.github/workflows/size_labeler.yml @@ -0,0 +1,33 @@ +name: labeler + +on: [pull_request] + +jobs: + labeler: + permissions: + pull-requests: write + contents: read + issues: write + runs-on: ubuntu-latest + name: Label the PR size + steps: + - uses: codelytv/pr-size-labeler@v1 + with: + xs_label: 'size/xs' + xs_max_size: '10' + s_label: 'size/s' + s_max_size: '100' + m_label: 'size/m' + m_max_size: '500' + l_label: 'size/l' + l_max_size: '1000' + xl_label: 'size/xl' + fail_if_xl: 'false' + message_if_xl: > + This PR exceeds the recommended size of 1000 lines. + Please make sure you are NOT addressing multiple issues with one PR. + Note this PR might be rejected due to its size. + github_api_url: 'https://api.github.com' + files_to_ignore: '' + ignore_line_deletions: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}