From e5e7da151cece38acca24e04aa8bca5f9d0a7566 Mon Sep 17 00:00:00 2001 From: Changliang Wu Date: Fri, 13 Jan 2023 13:40:07 +0800 Subject: [PATCH] ci: add pr size label action --- .github/workflows/labeler.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/labeler.yaml diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 000000000..4bebe0612 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,32 @@ +name: labeler + +on: [pull_request] + +permissions: + contents: read + +jobs: + labeler: + runs-on: ubuntu-latest + name: Label the PR size + permissions: + pull-requests: write + steps: + - name: Pull Request size labeler + uses: CodelyTV/pr-size-labeler@v1.8.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + 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: 'true' + 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.