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.
Option | Value | Description |
---|---|---|
Title | Change control board decision is documented | Is needed to identify the rule in the error messages |
Error message | The change control board decision has not been documented for %key% in %branch% | Gives the user further information about the error situation |
Hint | Please 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.
Page | Branch key | Identified by Query-Example | Description |
---|---|---|---|
Example Change Control Board for Release/1.0.x | release/1.0.x | title ~ "%branch%" and title ~ "Change Control" | Match the given page, because the title contains the branch name and "Change Control" |
Example Release/2.0.x CCB | release/2.0.x | title ~ "%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).
Page | Merge will be | Branch key | Issue key (e.g. commit message) | Properties-Example | Description |
---|---|---|---|---|---|
Example Change Control Board for Release/1.0.x | REJECT | release/1.0.x | DEM-1 |
JAVA
| The push will be rejected, because:
|
Example Change Control Board for Release/1.0.x | ACCEPT | release/1.0.x | DEM-2 | The push is allowed, because:
| |
Example Release/2.0.x CCB | REJECT | release/2.0.x | DEM-3 | The push will be rejected, because:
| |
Example Release/2.0.x CCB | REJECT | release/2.0.x | DEM-4 | The push will be rejected, because:
|
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