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

From 1.9.x, body: "empty_body" is not working #192

Closed
tanvn opened this issue Jul 13, 2020 · 1 comment · Fixed by #193
Closed

From 1.9.x, body: "empty_body" is not working #192

tanvn opened this issue Jul 13, 2020 · 1 comment · Fixed by #193
Labels
bug Problems with existing functionality

Comments

@tanvn
Copy link

tanvn commented Jul 13, 2020

Today, I tried to update from 1.5.0 to 1.9.1 and found out that the setting body : "empty_body" is not working anymore.
Below is my yaml bulldozer setting file.

version: 1

merge:
  whitelist:
    labels: ["merge-me"]
  blacklist:
    labels: ["do-not-merge","wip"]
  method: squash
  options:
    squash:
      title: "pull_request_title"
      body: "empty_body"
  delete_after_merge: true

update:
  blacklist:
    labels: ["do-not-update", "wip"]
  whitelist:
    labels: ["update-me"]

I have tried 1.5.0 to 1.8.0 and it worked well.
From 1.9.0 when merged, the message body contains all commit messages and it ignored the body : "empty_body" setting.

@bluekeyes
Copy link
Member

Thanks for reporting this with the specific version that is broken. It looks like this is due to a change in behavior in the latest go-github library, introduced in google/go-github#1447. I guess we'll have to change Bulldozer to use a string with a single space for the empty_body case to avoid the empty value detection. I believe GitHub trims whitespace from the message, so the end result should be the same.

On the other hand, this means we can probably remove the code in Bulldozer for summarizing commits and instead use the native GitHub functionality, now that it is exposed via go-github.

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

Successfully merging a pull request may close this issue.

2 participants