CrowdStrike / CrowdStrike/codestrike

[Feature Request]: Webhook integration

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
3
Forks
0
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Feature Description

Add webhook receiver support so codestrike can automatically trigger a review when a pull/merge request is opened or updated on GitHub, GitLab, Bitbucket, or Codeberg/Forgejo, instead of requiring someone to manually run codestrike review <pr-url>.

Use Case

As a developer/platform team, I want codestrike to review every new or updated pull request automatically as soon as it's opened, without a human or separate CI job invoking the CLI. Currently the only way to trigger a review is the manual review command with an explicit PR URL.

Related Area

HTTP server / webhooks (serve command)

Proposed Solution (Optional)

Building on top of the codestrike serve webservice (see linked serve-webservice issue), add per-provider webhook endpoints, e.g.:

  • POST /webhooks/github — verify X-Hub-Signature-256 using a shared secret, parse pull_request events (opened, synchronize, reopened), extract owner/repo/PR number, and enqueue/run a review via the existing internal/review.Pipeline.
  • POST /webhooks/gitlab — verify X-Gitlab-Token, parse Merge Request Hook events.
  • POST /webhooks/bitbucket — verify signature/secret, parse pullrequest:created/pullrequest:updated events.
  • POST /webhooks/codeberg (Forgejo/Gitea-compatible) — verify X-Hub-Signature-256, parse pull_request events.

Each handler should map its provider-specific payload to the existing scm.Client/review flow, reusing whichever scm.Client implementation matches the provider (see the separate Bitbucket/GitLab/Codeberg VCS integration issues — this issue assumes those clients exist or land alongside it). Consider a shared internal/webhook package with a common Event{Owner, Repo, PRNumber, Provider} type that all provider parsers normalize into, so the HTTP layer and pipeline invocation stay provider-agnostic.

Alternatives Considered (Optional)

No response

Additional Context (Optional)

Depends on the codestrike serve webservice existing first (separate issue). Signature verification secrets per provider will need new config/env vars (e.g. GITHUB_WEBHOOK_SECRET, GITLAB_WEBHOOK_SECRET), similar to how GITHUB_TOKEN is configured today.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the codestrike serve webservice and the existing internal/review.Pipeline and scm.Client integrations mentioned in the issue. Define the provider event handling around the proposed internal/webhook package, accounting for the separate serve and VCS integration issues. Done means supported providers accept verified events and trigger reviews for the specified pull or merge request actions.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, gitlab, go
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.