Commit JIRA rules with REST API created commit

Issue #249 on hold
Former user created an issue

have a user who is building an automation that uses the BB API to create a commit and PR https://docs.atlassian.com/bitbucket-server/rest/6.10.14/bitbucket-rest.html#idp200

It seems that even with a JIRA ID in the message, the commit is being rejected because the JIRA ID does not exist. Using a separate git push and the same commit message, the commit is allowed.

The example error received is "Control Freak v2022.07.25: Merge rejected. Commits on \"dependabot/master/registration\" must satisfy Control-Freak JIRA policy.\n\nControl Freak v2022.07.25\n-----\nMerge rejected. Commits on \"dependabot/master/registration\" must satisfy Control-Freak JIRA policy.\n\nThe following JIRA tickets do not exist on your JIRA server:\n\n [DFPS-10583]. \n\nPlease remove references to those tickets from your commit messages.\n-----\n"]

the Control Freak rules use a JQL of project-DFPS to validate the issue ID as needing to exist.

Is there something in how the plugin works here that would be different between usage of the API vs plain git in creating the commit?

Comments (3)

  1. Julius Davies [bit-booster.com] repo owner

    What user are the API calls running as? Are you using an API-Token for the authentication or hard-coded username/password?

    Whatever user the API calls runs as needs to have permission to connect to Jira (through Bitbucket’s OAUTH application link connection), and also needs permission to view “DFPS” tickets in Jira.

    We have a “Jira Impersonation” feature coming to Control-Freak that could possibly help in this scenario (probably will be released within 1 week).

  2. Julius Davies [bit-booster.com] repo owner

    Can you try again with Control-Freak version v2022.08.04 ? It supports Jira-Impersonation now, but more importantly, the “Merge Rejected” message will say which user its using to connect to Jira.

  3. Log in to comment