Honk Config format
This guide explains how to structure your data in YAML format to match the JSON schema requirements.
Rule Object
A Rule
object consists of the following properties:
name
(string, required): The name of the rule.rules
(array of arrays of Filter objects, required): An array of arrays containing Filter objects.notify
(object of Notify type, required): An object with notification settings.
Example Rule Object in YAML:
name: My Rule
rules:
- # Array of Filter objects
- by: field1
one_of: [value1, value2]
- by: field2
contains: [text1, text2]
- # Array of Filter objects
- by: field3
one_of: [value3]
notify:
channels:
- channel1
- channel2
users:
- user1
- user2
verbose: true
Filter Object
A Filter
object represents a filtering condition and includes the following properties:
by
(string, required): The field to filter by. Possible values include:- pull_request.author
- pull_request.title
- pull_request.reviewer
- repository
- discussion.author
- discussion.label
- discussion.category
- discussion.title
one_of
(array of strings or null, optional): An array of allowed values. Use null if not needed.contains
(array of strings or null, optional): An array of values to check for containment. Use null if not needed.negate
(boolean, optional): Set to true to negate the filter.
Example Filter Object in YAML:
- by: field1
one_of: [value1, value2]
- by: field2
contains: [text1, text2]
- by: field3
negate: true
Notify Object
A Notify object contains notification settings:
channels
(array of strings): An array of notification channels.users
(array of strings): An array of user IDs.verbose
(boolean): Set to true for verbose notifications.
You can provide your data following these guidelines in YAML format. Ensure that the indentation is correct, and the structure matches the examples provided.