Can't merge if not specifically not set to ON or OFF

Issue #5 new
Stefan Bogdan Cimpeanu created an issue

Hi, Running BitBucket 4.2.3. After enabling the plugin, on repositories where I did not specifically set OFF for the plugin, I can not merge pull requests. It appears that there's no fallback if no DB entry for said project, but instead plugin disables merge if no entry in DB is found.

Boolean enabled = Boolean.valueOf(settings.get(SMESConfig.class.getName() + ".enabled").equals("true"));

Our fix was to change the offending line to:

    Object enabledVal = settings.get(SMESConfig.class.getName() + ".enabled");
    if (enabledVal == null || (enabledVal != null && enabledVal.equals("false"))) {
      return Boolean.valueOf(true);
    }

Please provide a better/permanent fix .

Comments (1)

  1. Mike Kessler repo owner

    Hi Stefan

    Thanks for bringing this to my attention. I'm glad you were able to find a work-around for this. I'll push a change to this fix the next time I update this plugin.

    Cheers Mike

  2. Log in to comment