Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While experimenting with implementing some example behaviors, I've been seeing some common features and am starting to wonder if it would be better to compose behaviors of smaller components. I started experimenting with it and really like the direction it's going.
There are a lot of advantages this approach. These composed behaviors can be defined in a file in the repository, or in a
organization/probot
repository for organization hooks. The components can be combined in interesting ways, requiring fewer custom modules, so fewer people will have to stand up their own server to use the bot and can instead rely on a shared deployment.This first pass looks for a
.probot.yml
config file in a repo with behaviors. Behaviors are composed of 3 parts:on
- webhook events to listen towhen
- conditions to determine if the actions should be performed.then
- actions to take in response to the eventHere are some examples of what can be accomplished by combining these components:
Check out the aspirational docs on configuration to see some more ideas. Each of the conditions (
when
) and actions (then
) could be provided by plugins..probot.yml
for repo eventon: hook
when: comment
on: hook.action
.probot.yml
fromorg/probot
for org event