Skip to content

feat(ci-server): add GitHub push event JSON parsing #5

@HotFazz

Description

@HotFazz

Description

Add support for parsing GitHub push event JSON payloads so the CI-server can understand and extract relevant build information once webhooks are received

Expected outcome

The CI-server codebase contains a tested parsing component that can take a GitHub push event JSON payload and extract the branch name, commit information, repository URL, and pusher details without crashing.

Acceptance criteria

  • A dedicated parsing class is implemented
  • JSON parsing is implemented using Jackson
  • The parser accepts JSON as input
  • The following fields are extracted correctly:
    • ref --> branch name (strip refs/heads/)
    • after → commit SHA
    • repository.clone_url → repo URL
    • pusher.name → who pushed
    • head_commit.message → latest commit message
  • Parsing function is unit-tested with a sample payload fixture
  • Invalid/malformed payloads are handled gracefully (return error, don't crash)
  • How to execute a push event successfully is documented in README.md
  • Statement of contribution is added on the repository root

Related

GitHub push event payload

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIntroduces a new feature to the codebase

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions