Skip to content

Repository hooks #19

@timothyb89

Description

@timothyb89

(extracted from #15 (comment))

Since the PR bot is handling GitHub hooks anyway, it could be a convenient way to add repo-specific event handlers. In addition to repository and module specific configuration (#15), we could also let users drop in .js scripts:

Some thoughts:

  • .bot/hooks/pull_request.js: runs on a PullRequestEvent
    • handle project-specific labels, e.g. a push label in monasca-docker
  • .bot/hooks/status.js: runs on a StatusEvent
    • post a comment on the relevant PR with CI results, like a link to logs or a summary of any error messages
    • automatically merge on CI completion if a label is applied

We may want to execute these hooks in a sandboxed context, like vm2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions