Skip to content
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

Merged
merged 2 commits into from
May 19, 2020
Merged

Conversation

xinyuluo
Copy link
Collaborator

  • 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 = {
Copy link
Contributor

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 =
Copy link
Contributor

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 *)
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xinyuluo Could you please configure your editor to always have line end characters at EOF.
@Khady maybe we should have an editorconfig file in this repo?

Copy link
Contributor

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

Copy link
Collaborator Author

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!

@xinyuluo xinyuluo merged commit 10776a8 into master May 19, 2020
@xinyuluo xinyuluo deleted the issue7 branch May 19, 2020 08:28
yasunariw pushed a commit that referenced this pull request Nov 30, 2021
Extend configuration to allow routing based on labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants