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

GitHub Activity Callback Handler #21

Open
7 of 11 tasks
dealako opened this issue Nov 29, 2019 · 0 comments
Open
7 of 11 tasks

GitHub Activity Callback Handler #21

dealako opened this issue Nov 29, 2019 · 0 comments
Assignees
Labels
03 - Med Medium Priority enhancement New feature or request size:Medium An issue or feature that can be resolved in 1-3 days.
Milestone

Comments

@dealako
Copy link
Member

dealako commented Nov 29, 2019

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
@dealako dealako added enhancement New feature or request 03 - Med Medium Priority size:Medium An issue or feature that can be resolved in 1-3 days. labels Nov 29, 2019
@dealako dealako added this to the Sprint 02 milestone Nov 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
03 - Med Medium Priority enhancement New feature or request size:Medium An issue or feature that can be resolved in 1-3 days.
Projects
None yet
Development

No branches or pull requests

2 participants