-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 5.2.0, 9.0.0
-
Component/s: Repository - Branches / Tags
-
Severity 3 - Minor
Issue Summary
Midori's Better Commit Policy for Bitbucket found a bug in how Bitbucket handles tag creation vetoes on the user interface. When a tag creation is vetoed by a hook, no rejection message is shown on the UI.
The app implements a PreRepositoryHook hook which processes TagHookRequests to verify custom tag naming conventions.
The bug is similar to https://jira.atlassian.com/browse/BSERV-10938 which is closed.
This is reproducible on Data Center: (yes) / (no)
Steps to Reproduce
- Install “Better Commit Policy for Jira” app.
- Create an app link between Jira and Bitbucket: [!https://www.midori-global.com/images/midori-logo-favicon.ico!User Manual - Better Commit Policy for Bitbucket | Midori|https://www.midori-global.com/products/better-commit-policy-for-bitbucket/data-center/documentation/#linking-bitbucket-server-to-jira]
- Configure a tag rule/condition: [!https://www.midori-global.com/images/midori-logo-favicon.ico!User Manual - Better Commit Policy for Jira | Midori|https://www.midori-global.com/products/better-commit-policy-for-jira/data-center/documentation/#tag-conditions]
- Configure the hook in Bitbucket: [!https://www.midori-global.com/images/midori-logo-favicon.ico!User Manual - Better Commit Policy for Bitbucket | Midori|https://www.midori-global.com/products/better-commit-policy-for-bitbucket/data-center/documentation/#configuring-hooks]
- Go to the Bitbucket project (for project level) or repository (for individual repositories) → Settings → Hooks.
- Enable the hook called Commit Policy Verification.
- Select the policy from the drop-down. (Please note that the selectable options are the commit policies defined in Jira.) You may eventually see a warning box above the drop-down if the app finds some problems:
- If the application link is not created yet: create the application link!
- If the application link exist, but is not configured properly: review the configuration of the application link at both ends!
- If Better Commit Policy for Jira is not installed to Jira: install that app!
- If there is no policy created yet: create a policy that you can use!
- Test:
- Try to create a commit which should be rejected.
- For example, if your policy requires at least one issue key, then make a commit with the message "No issue key here".
- Check if the commit is rejected.
- Try to create a commit which should be rejected.
Expected Results
- No message is shown when the commit is vetoed.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available