mergeable icon indicating copy to clipboard operation
mergeable copied to clipboard

[Bug] Mergeable failing to request reviews and post comments on pull requests

Open DanielTsiang opened this issue 2 years ago • 2 comments

Recently over the past few months I've noticed that Mergeable fails to request reviews and post comments on pull requests when it should do.

It was working last year, I haven't changed any of the mergeable.yml config but it's stopped working sometime this year for some unknown reason.

DanielTsiang avatar Jul 25 '23 20:07 DanielTsiang

@DanielTsiang does it happen sporadically or all the time?

shine2lay avatar Jul 25 '23 23:07 shine2lay

@shine2lay it hasn't been working all the time for a while now.

Here is a snippet of the relevant part of the mergeable.yml config to help with debugging:

version: 2
mergeable:
  - when: pull_request.opened, pull_request.edited, pull_request.reopened, pull_request.ready_for_review
    filter:
      - do: payload
        pull_request:
          draft:
            boolean:
              match: false
    validate:
      - do: changeset
        must_include:
          regex: '^(dir-1)\/(?<service>service-1|service-2|service-3)\/(\k<service>)(\.env)$'
        files:
          added: true
          modified: true
          deleted: true
    pass:
      - do: comment
        payload:
          body: >
            The relevant team will need to control merging this PR.
            
            @relevant-team: please review this PR.
  - when: pull_request.opened, pull_request.edited, pull_request.reopened, pull_request.labeled, pull_request.unlabeled, pull_request.synchronize
    validate:
      - do: changeset
        must_include:
          regex: '.*/.env'
          message: 'Contains env changes...'
        files:
          added: true
          modified: true
          deleted: true
    pass:
      - do: request_review
        reviewers: ['user1']

DanielTsiang avatar Jul 26 '23 10:07 DanielTsiang