-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend configuration to allow routing based on labels #22
Conversation
xinyuluo
commented
May 19, 2020
- added a new type pr_rule and a new field in config in notabot.atd
- set the default rule to be prefix_rule (for now)
- add print_pr_routing in action.ml
src/notabot.atd
Outdated
prefix : string list; (* empty list means match any *) | ||
ignore : string list; | ||
webhook : webhook; | ||
} | ||
|
||
type pr_rule = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call it label_rule
instead. As you will probably use this same kind of rule when dealing with issues in addition to pull requests
src/action.ml
Outdated
@@ -58,3 +58,15 @@ let print_routing rules = | |||
end; | |||
Stdio.printf " -> #%s\n%!" rule.webhook.channel; | |||
end | |||
|
|||
let print_pr_routing rules = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then this one can be renamed print_label_routing
src/notabot.atd
Outdated
?gh_webhook_secret: string option; (* if not specified - signatures will not be checked *) | ||
?main_branch_name: string option; (* used to filter out notifications about merges of main branch into other branches *) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to restore a proper ocamlformat support, but after this PR is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do thanks for the tip!
Extend configuration to allow routing based on labels