Integrations

GitHub

Connect GitHub to Castrel for webhook-driven deployment diagnostics and repository context.

GitHub integration enables Castrel to receive deployment events and correlate failures with code changes.

What You Get

  • Deployment event ingestion through GitHub Webhooks
  • Repository and commit context for root-cause analysis
  • Pull request and commit diff correlation in Deployment Verification
  • Automation triggers when a pull request is merged

Setup

  1. Open Integrations > GitHub in Castrel.
  2. Authorize Castrel's GitHub App with repository access.
  3. Enable deployment-related webhook events for target repositories.
  4. Trigger a test deployment and confirm Castrel receives the event.

Trigger Automation On PR Merge

This repo now includes a GitHub Actions workflow at .github/workflows/pr-merge-automation.yml. When a pull request is merged, GitHub sends a github.pull_request.merged event to your automation ingress.

Setup:

  1. Add a repository secret named CASTREL_PR_MERGE_WEBHOOK_URL and point it to your automation ingress.
  2. If the endpoint requires auth, add CASTREL_PR_MERGE_WEBHOOK_BEARER_TOKEN.
  3. In Castrel Automations, configure the event trigger to match github.pull_request.merged.
  4. Use the payload fields for repository name, PR number, base branch, and merge commit SHA as needed.

The workflow does not check out PR code. It only forwards the GitHub event payload, which keeps the repository-side automation generic and avoids hard-coding business actions into this repo.

Permissions

Grant read access to repository metadata, commits, and deployment events. Avoid write permissions unless your workflow explicitly requires them.