Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.
This repository was archived by the owner on May 24, 2024. It is now read-only.

GitHub Activity Callback Handler #21

@dealako

Description

@dealako

Summary

Implement the framework for the GitHub Activity Callback.

Background

In order to support EasyCLA management of checks on GitHub, a callback handler must be implemented. We will register a GitHub app within the LFX Community Bridge organization which will include a callback URL. This URL will be implemented in this API and support a number of events including open PR, close PR, reopen PR, sync and a few others. This handler will initially support parsing the messages to determine the event type.

User Story

As a developer, I want the EasyCLA bot to check the CLA database when a PR is opened.

Tasks

  • Work with @dealako to register a new community bridge EasyCLA bot for the easycla-api v4 system.
  • Define a swagger specification to support the API callback/webhook from GitHub
  • Ensure the callback/webhook does not require LF API Gateway/ACS authentication (pass-through, similar to api-docs and health and status)
  • Payload model should be a generic payload since the same endpoint will receive multiple message types (I think)
  • Implement the API handler
  • Application should fetch the webhook secret from SSM
  • Application should validate the webhook secret in the handler
  • Handler should invoke the service layer
  • Service layer should parse/inspect the payload and branch based on the message type
  • The initial implementation phase will stop at the parsing of the payload. Should be able to extract the PR:
    - commits
    - author/user info
    - SHAs from the commit
  • Validate/demonstrate using a test repo

Acceptance Criteria

  1. Demonstrate system receiving a GH webhook for open, close and reopen PR.
  2. Demonstrate parsing of the message type
  3. Demonstrate parsing of the payload to extract commit details, author info and SHAs.

References

  1. Python implementation
  2. GitHub API Documentation
  3. Pull Request Documentation

Metadata

Metadata

Labels

03 - MedMedium PriorityenhancementNew feature or requestsize:MediumAn issue or feature that can be resolved in 1-3 days.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions