reviewpad app not triggering on PR #455
-
Hi again! I'm trying to setup Reviewpad in our repo but the app doesn't seem to be picking up anything from the If not, please let me know where else I can debug to try and get this working!
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for the question 🙌 The configuration you have provided has a syntax error. You can use reviewpad.com/playground to test your If you copy your configuration into reviewpad.com/playground you will see the following error: > Error: [lint] workflow label-pull-request-with-size does not have rules Here's your configuration with the fixed syntax: api-version: reviewpad.com/v3.x
mode: verbose
labels:
size-xs:
name: 'size/xs'
size-s:
name: 'size/s'
size-m:
name: 'size/m'
size-l:
name: 'size/l'
size-xl:
name: 'size/xl'
stale:
name: 'stale'
db-migration:
name: 'db-migration'
e2e-changes:
name: 'e2e-changes'
workflows:
- name: label-pull-request-with-size
if:
- rule: $size() <= 200
extra-actions:
- $addLabel("size-xs")
- rule: $size() > 200 && $size() <= 600
extra-actions:
- $addLabel("size-s")
- rule: $size() > 600 && $size() <= 1000
extra-actions:
- $addLabel("size-m")
- rule: $size() > 1000 && $size() <= 1400
extra-actions:
- $addLabel("size-l")
- rule: $size() > 1400
extra-actions:
- $addLabel("size-xl")
- name: label-stale-active-prs
if:
- '!$isDraft() && $lastEventAt() > 7 days ago'
then:
- $addLabel("stale")
- name: auto-comment-when-conflicts
if:
- $hasGitConflicts()
then:
- $comment("This PR has conflicts. Please resolve them.")
pipelines:
- name: auto-label-db-migrations
trigger: $hasFilePattern("src/db/migrations/**")
stages:
- actions:
- $addLabel("db-migration")
- $assignTeamReviewer(["backend"])
- name: auto-label-e2e-changes
trigger: $hasFilePattern("src/e2es/**")
stages:
- actions:
- $addLabel("e2e-changes") Also, if I may suggest I have done some change to your configuration based on my interpretation, mainly:
Here's the final api-version: reviewpad.com/v3.x
mode: verbose
labels:
size-xs:
name: 'size/xs'
size-s:
name: 'size/s'
size-m:
name: 'size/m'
size-l:
name: 'size/l'
size-xl:
name: 'size/xl'
stale:
name: 'stale'
db-migration:
name: 'db-migration'
e2e-changes:
name: 'e2e-changes'
workflows:
- name: label-pull-request-with-size
# Always run regarless of other workflows' result
# Please follow the link to know more https://docs.reviewpad.com/guides/syntax/#workflow
always-run: true
if:
- rule: $size() <= 200
extra-actions:
- $addLabel("size-xs")
# Clear other labels
- $removeLabels(["size-s", "size-m", "size-l", "size-xl"])
- rule: $size() > 200 && $size() <= 600
extra-actions:
- $addLabel("size-s")
- $removeLabels(["size-xs", "size-m", "size-l", "size-xl"])
- rule: $size() > 600 && $size() <= 1000
extra-actions:
- $addLabel("size-m")
- $removeLabels(["size-xs", "size-s", "size-l", "size-xl"])
- rule: $size() > 1000 && $size() <= 1400
extra-actions:
- $addLabel("size-l")
- $removeLabels(["size-xs", "size-s", "size-m", "size-xl"])
- rule: $size() > 1400
extra-actions:
- $addLabel("size-xl")
- $removeLabels(["size-xs", "size-s", "size-m", "size-l"])
- name: label-stale-active-prs
always-run: true
if:
- '!$isDraft() && $lastEventAt() > 7 days ago'
then:
- $addLabel("stale")
- name: auto-comment-when-conflicts
always-run: true
if:
- $hasGitConflicts()
then:
- $comment("This PR has conflicts. Please resolve them.")
- name: auto-label-based-on-changes
always-run: true
if:
- $hasFilePattern("src/db/migrations/**")
then:
- $addLabel("db-migration")
- $assignTeamReviewer(["backend"])
- name: auto-label-e2e-changes
always-run: true
if:
- $hasFilePattern("src/e2es/**")
then:
- $addLabel("e2e-changes") Hope this helps 💪 |
Beta Was this translation helpful? Give feedback.
Hi @leo-mendoza-qatalog
Thanks for the question 🙌
The configuration you have provided has a syntax error. You can use reviewpad.com/playground to test your
reviewpad.yml
configuration. Please be aware that you can only test against open-source repositories (for now).If you copy your configuration into reviewpad.com/playground you will see the following error:
> Error: [lint] workflow label-pull-request-with-size does not have rules
Here's your configuration with the fixed syntax: