Skip to content

Commit

Permalink
build: pr triage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmogBaku committed May 10, 2024
1 parent 7e12871 commit c40e1db
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/pr-triage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Pull Request Triage"
on:
# NB: using `pull_request_target` runs this in the context of
# the base repository, so it has permission to upload to the checks API.
# This means changes won't kick in to this file until merged onto the
# main branch.
pull_request_target:
types: [ opened, edited, reopened, synchronize ]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
triage:
name: "Triage Pull Request"
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/xs'
xs_max_size: '15'
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.
files_to_ignore: ''
# - name: "Check for PR body length"
# shell: bash
# env:
# PR_BODY: ${{ github.event.pull_request.body }}
# run: |
# if [ ${#PR_BODY} -lt 80 ]; then
# echo "::error title=PR body is too short::Your PR is probably isn't descriptive enough.\nYou should give a description that highlights both what you're doing it and *why* you're doing it. Someone reading the PR description without clicking any issue links should be able to roughly understand what's going on."
# exit 1
# fi
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
disallowScopes: |
release

0 comments on commit c40e1db

Please sign in to comment.