Skip to content

Only targetting additions in the size check #453

Discussion options

You must be logged in to vote

Hi @leo-mendoza-qatalog

Thanks for your question 🙌 As for the moment, size calculates the total amount of changed lines, which includes all added and removed lines. There's no configuration to count only the added or the removed lines.

You can, however, provide a list of patterns to be ignored by size.

Here's an example:

api-version: reviewpad.com/v3.x

groups:
  - name: exclude-patterns
    spec: '["*.lock", "*.md", "folder/**", "**/file.js"]'

workflows:
  - name: label-pull-request-with-size
    if:
      # Calcule size ignoring the files matched by "exclude-patterns"
      - rule: $size($group("exclude-patterns")) < 30
        extra-actions:
          - $addLabel("small")

What you are…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@leo-mendoza-qatalog
Comment options

Answer selected by leo-mendoza-qatalog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants