You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable the configuration of standalone validators to determine whether a particular branch can have some action performed (i.e. be synced, merged, or reverted). Before any of these operations takes place, the configured validator(s), if any, will be run, with the branch passed as an argument. If any validator returns False, the action will not be permitted.
A validator might look something like this:
defmerge_is_allowed(branch):
# No changes on Friday!returndatetime.datetime.today().weekday() !=4
This feature provides a hook for administrators to enforce custom policies concerning branch actions. For example, an admin might wish to disable merging a branch on certain days (as in the example above), or may require that a branch be logged in some external ticketing system.
External dependencies
None
The text was updated successfully, but these errors were encountered:
Plugin Version
v0.5.0
Proposed functionality
Enable the configuration of standalone validators to determine whether a particular branch can have some action performed (i.e. be synced, merged, or reverted). Before any of these operations takes place, the configured validator(s), if any, will be run, with the branch passed as an argument. If any validator returns False, the action will not be permitted.
A validator might look something like this:
This would be configured as:
Use case
This feature provides a hook for administrators to enforce custom policies concerning branch actions. For example, an admin might wish to disable merging a branch on certain days (as in the example above), or may require that a branch be logged in some external ticketing system.
External dependencies
None
The text was updated successfully, but these errors were encountered: