Skip to content

Event payload reference

The normalized event envelope is the single event contract in KiCI. Rules receive it as ctx.event, and every dynamic function — environment:, env:, and concurrencyGroup: resolvers, generated jobs, and a workflow’s concurrency.group — receives the same envelope as its argument.

Narrow on the type field to branch per trigger kind (if (event.type === 'push')). The raw provider webhook body is nested at payload; the typed variants below describe its shape per event type.

These fields are present on every envelope (the EventBase shape):

FieldTypeDescription
typestringNormalized event type discriminant.
action?stringSub-action (e.g. ‘opened’, ‘created’, ‘submitted’).
targetBranch?stringTarget branch (push target, PR base, or default branch).
sourceBranch?stringSource branch (PR head branch). Only set for PR-like events.
provider?stringProvider that originated this event.
isForkPR?booleanWhether this PR comes from a fork. Only set for PR-like events.
baseBranch?stringBase branch ref for PR events.
senderUsername?stringSender username from the webhook payload.
sourceRepo?stringRepository identifier (e.g. “owner/repo”).
changedFiles?string[]Files changed in this event (for path filtering).
payload?Record<string, unknown>Raw webhook payload from the provider. May be absent in flattened event forms.
[key: string]unknownIndex signature for backward compatibility — untyped fields resolve to unknown.

One section per member of the EventPayload union. The heading is the type literal; the table lists the fields of that event’s payload property when it declares a typed shape.

Carried by PullRequestEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
numbernumber
pull_requestGitHubPullRequest
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by PushEventPayload. The payload property has the following shape:

FieldTypeDescription
refstring
afterstring
beforestring
head_commit?GitHubCommit
commits?GitHubCommit[]
repositoryGitHubRepository
sender?GitHubUser
forced?boolean
[key: string]unknown

Carried by TagEventPayload. The payload property has the following shape:

FieldTypeDescription
refstring
afterstring
repositoryGitHubRepository
sender?GitHubUser
[key: string]unknown

Carried by CommentEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
commentGitHubComment
issue?{ number: number; title?: string; pull_request?: unknown; [key: string]: unknown }
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by ReviewEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
reviewGitHubReview
pull_requestGitHubPullRequest
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by ReviewCommentEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
commentGitHubComment
pull_requestGitHubPullRequest
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by ReleaseEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
releaseGitHubRelease
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by DispatchEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
client_payload?Record<string, unknown>
repositoryGitHubRepository
sender?GitHubUser
[key: string]unknown

Carried by CreateEventPayload. The payload property has the following shape:

FieldTypeDescription
refstring
ref_typestring
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by DeleteEventPayload. The payload property has the following shape:

FieldTypeDescription
refstring
ref_typestring
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by StatusEventPayload. The payload property has the following shape:

FieldTypeDescription
statestring
shastring
contextstring
description?string
target_url?string
branches?Array<{ name: string; [key: string]: unknown }>
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by WorkflowRunEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
workflow_run{ head_branch: string; name: string; conclusion?: string; status?: string; [key: string]: unknown; }
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by ForkEventPayload. The payload property has the following shape:

FieldTypeDescription
forkee{ full_name: string; [key: string]: unknown }
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by StarEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by WatchEventPayload. The payload property has the following shape:

FieldTypeDescription
actionstring
repositoryGitHubRepository
senderGitHubUser
[key: string]unknown

Carried by WebhookEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by KiciEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by WorkflowCompleteEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by JobCompleteEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by GenericWebhookEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by ScheduleEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by LifecycleEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by RerunEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by ManualScheduleEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

Carried by UnknownEventPayload. Adds no typed fields beyond the shared envelope; payload is the raw provider body (Record<string, unknown>).

The typed payload shapes above reference these partial GitHub object types. Each lists only the commonly accessed fields; the index signature on every shape resolves any other field to unknown.

FieldTypeDescription
full_namestring
default_branchstring
name?string
owner?{ login: string; [key: string]: unknown }
private?boolean
[key: string]unknown
FieldTypeDescription
loginstring
id?number
[key: string]unknown
FieldTypeDescription
numbernumber
draft?boolean
title?string
body?string
state?string
merged?boolean
head{ ref: string; sha: string; repo?: { full_name: string; [key: string]: unknown }; [key: string]: unknown; }
base{ ref: string; repo?: { full_name: string; [key: string]: unknown }; [key: string]: unknown; }
user?GitHubUser
labels?Array<{ name: string; [key: string]: unknown }>
[key: string]unknown
FieldTypeDescription
idstring
messagestring
author?{ name?: string; email?: string; username?: string; [key: string]: unknown }
timestamp?string
added?string[]
removed?string[]
modified?string[]
[key: string]unknown
FieldTypeDescription
idnumber
bodystring
userGitHubUser
[key: string]unknown
FieldTypeDescription
idnumber
statestring
body?string
userGitHubUser
[key: string]unknown
FieldTypeDescription
idnumber
tag_namestring
name?string
body?string
draft?boolean
prerelease?boolean
target_commitish?string
[key: string]unknown