Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters should include changeset #741

Open
ksrembd opened this issue Mar 30, 2024 · 1 comment
Open

Filters should include changeset #741

ksrembd opened this issue Mar 30, 2024 · 1 comment

Comments

@ksrembd
Copy link

ksrembd commented Mar 30, 2024

I was trying multiple combination to run some actions only when there were changes happened in a given path of the repository.
chageset is helping to see if there are any changes happened in the repository and getting bot enabled.
but I was unable to trigger any other actions along with change sets

Mergeable configuration

################################################################################
version: 2
mergeable:
  - when: pull_request., pull_request_review.
    name: 'PR title check'
    validate:
      - do: or
        validate:
          - do: changeset
            must_include:
              regex: 'ipnext/arch/'
          - do: and
            validate:
              - do: changeset
                must_include:
                  regex: 'ipnext/aas/
'
    pass:
      name: 'wip check'
      validate:
        - do: label
          and:
            - must_exclude:
              regex: 'wip'
              regex_flag: m
              message: Remove "wip" label from the PR to merge
            - must_exclude:
              regex: 'do not merge'
              regex_flag: m
              message: Remove "do not merge" label from the PR to merge

@andekande
Copy link
Contributor

andekande commented Jun 12, 2024

this does a multi line search
if it still does not work, consider escaping: 'ipnext\/arch\/'

    validate:
      - do: changeset
        must_include:
          regex: ['ipnext/arch/', 'ipnext/aas/']
          regex_flag: 'im'
          all: false

In your 'pass' section there is an error - you can not put a 'validate' section there. So just move the label check up to the validate section and skip 'pass' for the default handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants