Verifies GitHub webhook signatures and validates payload structure.
// Source: https://github.com/google-gemini/gemini-cli | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as crypto from 'node:crypto';
/**
* Subset of the GitHub Webhook Payload for issues and issue_comment events.
* @see https://docs.github.com/en/webhooks/webhook-events-and-payloads#issues
*/
export interface GitHubWebhookPayload {
action: string;
issue: {
body?: string | null; // Can be null if description is empty
number: number;
title?: string;
user?: {
login?: string;
};
};
comment?: {
id: number;
body: string;
author_association:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key