palantir/bulldozer

Bot fails to interpret .bulldozer.yml

dB2510 opened this issue · 2 comments

I have deployed bulldozer bot to our kubernetes cluster and here is my .bulldozer.yml that is present in our repo:

version: 1

merge:
  trigger:
    labels: ["merge when ready"]
    comment_substrings: ["==MERGE_WHEN_READY=="]
    branches: ["main"]
  ignore:
    labels: ["do not merge"]
    comment_substrings: ["==DO_NOT_MERGE=="]
  method: squash
  options:
    squash:
      title: "github_default_title"
      body: pull_request_body
  delete_after_merge: true
  allow_merge_with_no_checks: false

update:
  trigger:
    labels: ["wip", "update me"]

From k8s logs, it seems that it identifies that .bulldozer.yml is present but fails to react accordingly. As soon as a PR is opened it merges it without any label or comment.

Any ideas what could be causing this?

I think this is because of the branches: ["main"] trigger. Bulldozer will attempt to merge a pull request if any trigger condition is true. My guess is that your pull requests targeted the main branch, so Bulldozer merged them without waiting for the label or comment.

You should be able to confirm this by enabling debug logging and looking for messages that contain triggered because triggering is enabled. The rest of the message includes the reason that the PR was triggered.

@bluekeyes Yes, I found this message triggered because triggering is enabled in logs. I removed this trigger and it worked as expected which does makes sense.
Thanks!
Closing this issue.