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

Implement GitHub "on pull request" block #8352

Closed
Pwuts opened this issue Oct 16, 2024 — with Linear · 0 comments
Closed

Implement GitHub "on pull request" block #8352

Pwuts opened this issue Oct 16, 2024 — with Linear · 0 comments
Assignees
Labels
platform/backend AutoGPT Platform - Back end platform/blocks

Comments

Copy link
Member

Pwuts commented Oct 16, 2024

First webhook-triggered block implementation based on architecture sketch made in #8349.

Required parts

  • Add DB tables for webhooks and their links to nodes
  • Mechanism to register/update/delete webhook on block create/update/delete
    Tying this to the block's credentials instead of the block itself because the webhook has to be administrated using those credentials.
    • Block.on_node_update(cls, new_default_input, old_default_input = None)
    • DB table to store webhooks and their configs
  • Endpoint to receive incoming webhook requests
    • one (parametrized) endpoint for all, with the possibility of making provider-specific exceptions if needed: /integrations/{provider}/webhooks/{webhook_id}/ingress
    • Logic to initiate a graph execution when a webhook request is received
      • Verify the legitimacy of the webhook request/payload
        • check in the receiving endpoint
      • Initiate a graph execution using the webhook payload
        • execution input = input_default + webhook payload
  • On deletion of integration credentials -> delete all associated webhooks
  • The block itself: GitHub On Pull Request (name subject to change)
    • inputs: credentials, repo (URL or {owner}/{repo_name}), on_event_types (create/update/delete etc.)
    • outputs: pull_request, event_type

Sub-issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/blocks
Projects
None yet
Development

No branches or pull requests

1 participant