Skip to main content
Skip table of contents

Push Hook - Change Control Board is documented

The following scenario assumes that a change control board decision ist documented before a new code change can be pushed The change control board document must exists and the related issue must be accepted in this document.

Common Settings

The common settings of a rule are needed to provide developers information about the configured rule in error situations.

OptionValueDescription
TitleChange control board decision is documentedIs needed to identify the rule in the error messages
Error messageThe change control board decision has not been documented for %key% in %branch%Gives the user further information about the error situation
HintPlease ask the change control board to document the CCB decision for %key% in the release %branch%Gives the user the information about how they can solves the issue.


Page selection based on CQL

Based on the CQL you can identify the change control board document. In the folder Example Pages you will find 1 change control board document. In the table below you will find examples how document can be identified by the CQL. However, it is clear that other CQLs may be necessary in your company to identify the corresponding pages. It depends on your page structure. 

PageBranch keyIdentified by Query-ExampleDescription
Example Change Control Board for Release/1.0.xrelease/1.0.xtitle ~ "%branch%" and title ~ "Change Control"Match the given page, because the title contains the branch name and "Change Control"
Example Release/2.0.x CCBrelease/2.0.xtitle ~ "%branch%" and label = "ccb"Match the given page, because the title contains the branch name and the labeld contains "ccb"


Skip CQL

Also it should not be allowed to push, if no page has been found by a CQL. For that please ensure, that the option "If no page matches the CQL, the rule will be skipped. The rule will be validated only, if a page has been found." is unset.

Page properties configuration

Now let's evaluate the page properties of the above detected pages. The requested page properties in the hook are for all three pages the same, but the real page properties are different (please check the related pages and you will see).

PageMerge will beBranch key Issue key (e.g. commit message)Properties-ExampleDescription
Example Change Control Board for Release/1.0.x

REJECT

release/1.0.xDEM-1
JAVA
issues accepted~%key%
maintenance line~%branch%


The push will be rejected, because:

  • the issue DEM-1 is not accepted in this change control board
Example Change Control Board for Release/1.0.x

ACCEPT

release/1.0.xDEM-2

The push is allowed, because:

  • the issue key is in the accepted list
  • the maintenance list is matchinge
Example Release/2.0.x CCB

REJECT

release/2.0.xDEM-3

The push will be rejected, because:

  • the maintenance line property is empty
Example Release/2.0.x CCB

REJECT

release/2.0.xDEM-4

The push will be rejected, because:

  • the maintenance line property is empty
  • the issue is not in the accepted list


Page properties strategy

To have a valid change control document all requested properties must match. So it is needed to set the option "All key pairs must match"


Example configuration






JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.