Control Freak: Jira policies trigger on tags

Issue #120 resolved
Dávid Csákvári created an issue

Hi,

We have a Jira policy to require that the referenced issue exist in Jira. (“Jira Policy” > “Jira References Must” > “Exist in Jira”). We enabled this only on the master and release branches, so we can have invalid draft commits on the feature branches.

However, when we try to create release/xxx tag on a feature branch that contain an invalid commit, it fails.

Steps to reproduce:

» git checkout -b feature/test
» echo "Change" > changes.txt
» git add .
» git commit -m "DUMMY-1234: this issue does not exist"
» git push --set-upstream origin feature/test
# push successful, because feature branches are lenient

» git tag release/1.0
» git push origin --tags
Total 0 (delta 0), reused 0 (delta 0)
remote: Control Freak: Push rejected. Commits on "release/1.0" must satisfy JIRA policy.
remote: 
remote: Control Freak
remote: -----
remote: Push rejected. Commits on "release/1.0" must satisfy JIRA policy.
remote: 
remote: The following JIRA tickets do not exist on your JIRA server:
remote: 
remote:   [DUMMY-1234]. 
remote: 
remote: Please remove references to those tickets from your commit messages.
remote: -----

Thanks,
David

Comments (2)

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

    Subtle issue: branches following the pattern "release/1.2.x" would be blocked but tags named "release/1.2.3" should not be blocked.

    Not sure exactly when we happened to fix this, but just confirmed that as of v2020.11.03 this bug is not happening anymore.

    Thanks for the bug report!

  2. Log in to comment