Skip to main content
Event context provides access to all information about the event that triggered your workflow. You can use this data throughout your workflow using template variables like {{trigger.issue.title}} or {{trigger.repository.fullName}}.
All event properties are platform-agnostic—they work consistently whether your event comes from GitHub, GitLab, Jira, Bitbucket, or Azure DevOps. Overcut automatically normalizes platform-specific data into this standardized format.

Template Variable Syntax

Access event context properties using double curly braces:
{{trigger.issue.title}}
{{trigger.repository.fullName}}
{{trigger.pullRequest.headBranch}}
{{trigger.actor.login}}
You can use these template variables in:
  • Agent instructions
  • Action parameters
  • Conditional logic
  • Step outputs

Base Event Properties

These properties are available for all event types:

Event Metadata

trigger.eventType
string
The standardized event type that triggered the workflow (e.g., issue_opened, pull_request_merged, mention).Example: {{trigger.eventType}}
trigger.triggerObjectName
string
Human-readable name of the object that triggered the event.Example: {{trigger.triggerObjectName}}
trigger.triggerObjectNumber
string
Number or identifier of the triggering object (issue number, PR number, etc.).Example: {{trigger.triggerObjectNumber}}
trigger.triggerObjectUrl
string
Direct URL to the triggering object in the source platform.Example: {{trigger.triggerObjectUrl}}

Repository Context

trigger.repository.name
string
Repository name (e.g., "blog-server").Example: {{trigger.repository.name}}
trigger.repository.fullName
string
Full repository name including owner (e.g., "acme/blog-server").Example: {{trigger.repository.fullName}}
trigger.repository.owner
string
Repository owner username or organization name.Example: {{trigger.repository.owner}}
trigger.repository.url
string
Clone URL for the repository.Example: {{trigger.repository.url}}
trigger.repository.defaultBranch
string
Default branch name (e.g., "main", "master").Example: {{trigger.repository.defaultBranch}}
trigger.repository.provider
string
Git provider name (e.g., "github", "gitlab", "bitbucket").Example: {{trigger.repository.provider}}

Actor Context

The user or bot that triggered the event.
trigger.actor.login
string
Username or login of the actor.Example: {{trigger.actor.login}}
trigger.actor.name
string
Display name of the actor.Example: {{trigger.actor.name}}
trigger.actor.email
string
Email address of the actor (if available).Example: {{trigger.actor.email}}
trigger.actor.type
string
Type of actor: "User", "Bot", or "Organization".Example: {{trigger.actor.type}}

Organization Context

Available when the repository belongs to an organization.
trigger.organization.login
string
Organization username or login.Example: {{trigger.organization.login}}
trigger.organization.name
string
Organization display name.Example: {{trigger.organization.name}}

Issue Event Properties

Available for issue-related events: issue_opened, issue_closed, issue_edited, issue_assigned, issue_unassigned, issue_labeled, issue_unlabeled, issue_commented.

Core Issue Properties

trigger.issue.number
number
Issue number (unique within the repository).Example: {{trigger.issue.number}}
trigger.issue.title
string
Issue title.Example: {{trigger.issue.title}}
trigger.issue.state
string
Current state of the issue: "open" or "closed".Example: {{trigger.issue.state}}
trigger.issue.body
string
Issue description or body content.Example: {{trigger.issue.body}}
trigger.issue.author
string
Username of the issue author.Example: {{trigger.issue.author}}

Issue Metadata

trigger.issue.labels
array<string>
Array of label names attached to the issue.Example: {{trigger.issue.labels}} or {{trigger.issue.labels.[0]}} for first label
trigger.issue.assignees
array<string>
Array of usernames assigned to the issue.Example: {{trigger.issue.assignees}} or {{trigger.issue.assignees.[0]}}
trigger.issue.milestone
string
Milestone title if the issue is assigned to a milestone.Example: {{trigger.issue.milestone}}
trigger.issue.workItemType
string
Normalized issue type coming from the source tracker (e.g., "Bug", "Task", "Story"). Use this to branch workflows by work item type without writing provider-specific logic.Example: {{trigger.issue.workItemType}}
GitHub issues may return an empty string because the platform does not classify issues, while Jira, GitLab, and Azure DevOps provide their native issue types.
trigger.issue.confidential
boolean
Whether the issue is confidential.Example: {{trigger.issue.confidential}}
GitLab only - This property is only available for GitLab issues. Returns undefined for other providers.

Issue Timestamps

trigger.issue.createdAt
string
ISO timestamp when the issue was created.Example: {{trigger.issue.createdAt}}
trigger.issue.updatedAt
string
ISO timestamp when the issue was last updated.Example: {{trigger.issue.updatedAt}}
trigger.issue.closedAt
string
ISO timestamp when the issue was closed (if applicable).Example: {{trigger.issue.closedAt}}

Pull Request Event Properties

Available for PR-related events: pull_request_opened, pull_request_closed, pull_request_merged, pull_request_edited, pull_request_reviewed, pull_request_assigned, pull_request_unassigned, pull_request_labeled, pull_request_unlabeled, pull_request_commented, pull_request_review_commented.
trigger.commitAdded
boolean
  • Always true for pull_request_opened events (initial commit set).
  • true for pull_request_edited only when the edit originates from new commits.
  • false for metadata-only changes such as title/body edits, label updates, or reviewer requests.
Use this flag in trigger conditions to run workflows exclusively on code-changing updates.
GitLab and GitHub only - This property is only available for GitLab and GitHub pull requests. Returns false for other providers.
Provider Differences: While all core properties (number, title, state, branches, labels, assignees) are available across all providers, some advanced properties like change statistics, merge status, and reviewer information are provider-specific. Check the individual property notes below for availability.

Core Pull Request Properties

trigger.pullRequest.number
number
Pull request number.Example: {{trigger.pullRequest.number}}
trigger.pullRequest.title
string
Pull request title.Example: {{trigger.pullRequest.title}}
trigger.pullRequest.state
string
Current state: "open", "closed", or "merged".Example: {{trigger.pullRequest.state}}
trigger.pullRequest.body
string
Pull request description or body content.Example: {{trigger.pullRequest.body}}
trigger.pullRequest.author
string
Username of the pull request author.Example: {{trigger.pullRequest.author}}

Branch Information

trigger.pullRequest.baseBranch
string
Target branch name (where the PR will be merged into).Example: {{trigger.pullRequest.baseBranch}}
trigger.pullRequest.headBranch
string
Source branch name (the branch with changes).Example: {{trigger.pullRequest.headBranch}}
trigger.pullRequest.baseSha
string
Base commit SHA.Example: {{trigger.pullRequest.baseSha}}
Not available on GitLab - GitLab webhooks don’t include the base SHA (would require an additional API call).
trigger.pullRequest.headSha
string
Head commit SHA.Example: {{trigger.pullRequest.headSha}}
trigger.pullRequest.mergeCommitSha
string
Merge commit SHA (available after merge).Example: {{trigger.pullRequest.mergeCommitSha}}

Pull Request Metadata

trigger.pullRequest.labels
array<string>
Array of label names attached to the pull request.Example: {{trigger.pullRequest.labels}}
trigger.pullRequest.assignees
array<string>
Array of assignee usernames.Example: {{trigger.pullRequest.assignees}}
trigger.pullRequest.requestedReviewers
array<string>
Array of requested reviewer usernames.Example: {{trigger.pullRequest.requestedReviewers}}
GitHub only - GitLab returns an empty array (no explicit reviewer request concept). Not available on Bitbucket or Azure DevOps.
trigger.pullRequest.milestone
string
Milestone title if assigned.Example: {{trigger.pullRequest.milestone}}
trigger.pullRequest.draft
boolean
Whether the pull request is a draft.Example: {{trigger.pullRequest.draft}}

Change Statistics

GitHub only - Change statistics (additions, deletions, changedFiles) are only available for GitHub pull requests. Other providers don’t include these metrics in their webhook payloads.
trigger.pullRequest.additions
number
Number of lines added.Example: {{trigger.pullRequest.additions}}
trigger.pullRequest.deletions
number
Number of lines deleted.Example: {{trigger.pullRequest.deletions}}
trigger.pullRequest.changedFiles
number
Number of files changed.Example: {{trigger.pullRequest.changedFiles}}

Merge Status

trigger.pullRequest.mergeable
boolean | null
Whether the pull request can be merged (null if unknown).Example: {{trigger.pullRequest.mergeable}}
GitHub and GitLab only - Not available on Bitbucket or Azure DevOps.
trigger.pullRequest.rebaseable
boolean | null
Whether the pull request can be rebased (null if unknown).Example: {{trigger.pullRequest.rebaseable}}
GitHub only - Not available on other providers.
trigger.pullRequest.autoMerge
boolean
Whether auto-merge is enabled.Example: {{trigger.pullRequest.autoMerge}}
GitHub only - Not available on other providers.

Pull Request Timestamps

trigger.pullRequest.createdAt
string
ISO timestamp when the pull request was created.Example: {{trigger.pullRequest.createdAt}}
trigger.pullRequest.updatedAt
string
ISO timestamp when the pull request was last updated.Example: {{trigger.pullRequest.updatedAt}}
trigger.pullRequest.closedAt
string
ISO timestamp when the pull request was closed (if applicable).Example: {{trigger.pullRequest.closedAt}}
trigger.pullRequest.mergedAt
string
ISO timestamp when the pull request was merged (if applicable).Example: {{trigger.pullRequest.mergedAt}}

Action-Specific Context

These properties provide additional context about the specific action that triggered the event.

Label Operations

Available for issue_labeled, issue_unlabeled, pull_request_labeled, pull_request_unlabeled events.
trigger.label
string
The label that was added or removed.Example: {{trigger.label}}
trigger.labelAction
string
The action performed: "added" or "removed".Example: {{trigger.labelAction}}

Assignee Operations

Available for issue_assigned, issue_unassigned, pull_request_assigned, pull_request_unassigned events.
trigger.assignee
string
Username of the assignee that was added or removed.Example: {{trigger.assignee}}
trigger.assigneeAction
string
The action performed: "assigned" or "unassigned".Example: {{trigger.assigneeAction}}

Milestone Operations

trigger.milestone
string
The milestone that was added or removed.Example: {{trigger.milestone}}
trigger.milestoneAction
string
The action performed: "added" or "removed".Example: {{trigger.milestoneAction}}

Comment Operations

Available for issue_commented, pull_request_commented, pull_request_review_commented events.
trigger.commentId
string
Comment ID from the git provider.Example: {{trigger.commentId}}
trigger.commentAuthor
string
Username of the comment author.Example: {{trigger.commentAuthor}}
trigger.commentBody
string
Full content of the comment.Example: {{trigger.commentBody}}
trigger.commentLocation
string
Where the comment was made: "issue" or "pull_request".Example: {{trigger.commentLocation}}
trigger.commentCreatedAt
string
ISO timestamp when the comment was created.Example: {{trigger.commentCreatedAt}}

Review Operations

Available for pull_request_reviewed events.
trigger.reviewer
string
Username of the reviewer.Example: {{trigger.reviewer}}
trigger.reviewState
string
Review state: "approved", "changes_requested", "commented", or "dismissed".Example: {{trigger.reviewState}}
trigger.reviewAction
string
Review action: "submitted", "edited", or "dismissed".Example: {{trigger.reviewAction}}

Mention Operations

Available for mention events.
trigger.mentionedBy
string
Username of the user who mentioned the bot.Example: {{trigger.mentionedBy}}
trigger.mentionLocation
string
Where the mention occurred (e.g., "issue", "pull_request", "comment").Example: {{trigger.mentionLocation}}
trigger.mentionContent
string
The full message or content containing the mention.Example: {{trigger.mentionContent}}

Slash Command Operations

Available for slash_command events.
trigger.slashCommand
string
The slash command that was used (e.g., "/review").Example: {{trigger.slashCommand}}
trigger.slashCommandWithMention
boolean
Whether the slash command was used with an @mention.Example: {{trigger.slashCommandWithMention}}

Practical Examples

Example 1: Accessing Issue Properties

Use issue properties in an agent instruction:
- id: "analyze-issue"
  action: "agent.run"
  params:
    agentId: "triage-bot"
    instruction: |
      Review issue #{{trigger.issue.number}}: "{{trigger.issue.title}}"
      
      Issue details:
      - Author: @{{trigger.issue.author}}
      - State: {{trigger.issue.state}}
      - Labels: {{trigger.issue.labels}}
      - Created: {{trigger.issue.createdAt}}
      
      {{trigger.issue.body}}

Example 2: Clone PR Branch

Use pull request branch information in git operations:
- id: "clone-pr-branch"
  action: "git.clone"
  params:
    repoFullName: "{{trigger.repository.fullName}}"
    branch: "{{trigger.pullRequest.headBranch}}"

Example 3: Conditional Logic Based on Event State

Use Handlebars helpers for conditional logic:
- id: "context-aware-agent"
  action: "agent.run"
  params:
    instruction: |
      {{#if (eq trigger.issue.state "closed")}}
        This issue is already closed. Provide a summary of the resolution.
      {{else}}
        This issue is open. Analyze and provide recommendations.
      {{/if}}
      
      {{#if trigger.issue.labels}}
        Labels present: {{trigger.issue.labels}}
      {{else}}
        No labels assigned yet.
      {{/if}}

Example 4: Working with Arrays

Access array elements and iterate:
- id: "check-assignees"
  action: "agent.run"
  params:
    instruction: |
      Issue assignees:
      {{#if trigger.issue.assignees}}
        {{#each trigger.issue.assignees}}
          - @{{this}}
        {{/each}}
      {{else}}
        No assignees yet.
      {{/if}}
      
      First label: {{trigger.issue.labels.[0]}}

Example 5: Mention the Original Author

Reference the event author in responses:
- id: "respond-to-user"
  action: "agent.run"
  params:
    instruction: |
      @{{trigger.issue.author}}, I've analyzed your issue and here are my findings...

Example 6: Use Comment Context

Access comment-specific properties:
- id: "process-comment"
  action: "agent.run"
  params:
    instruction: |
      Process comment by @{{trigger.commentAuthor}}:
      
      {{trigger.commentBody}}
      
      Respond in the {{trigger.commentLocation}} thread.

Example 7: Conditional Repository Selection

Combine with conditional logic for dynamic behavior:
- id: "clone-code"
  action: "git.clone"
  params:
    repoFullName: |
      {{#if outputs.identify-repos.[0]}}
        {{outputs.identify-repos.[0].repoFullName}}
      {{else}}
        {{trigger.repository.fullName}}
      {{/if}}
    branch: "{{trigger.repository.defaultBranch}}"

Example 8: Filter by Actor Type

Exclude bot-triggered events:
# In trigger conditions
trigger:
  eventType: "issue_commented"
  conditions:
    - field: "context.actor.type"
      operator: "not_equals"
      value: "Bot"

Example 9: Run Workflow Only When Commits Are Added to a PR

Use the trigger.commitAdded flag to avoid running expensive jobs on metadata-only changes:
trigger:
  eventType: "pull_request_edited"
  conditions:
    - field: "context.trigger.commitAdded"
      operator: "equals"
      value: true
In this setup, the workflow will execute when a pull request is opened or when new commits are pushed, but it will not run if the PR author only updates the title, description, labels, or other metadata.

Template Helpers

Overcut supports Handlebars helpers for advanced logic:

Comparison Helpers

  • {{#if (eq value1 value2)}} - Equals
  • {{#if (ne value1 value2)}} - Not equals
  • {{#if (gt value1 value2)}} - Greater than
  • {{#if (lt value1 value2)}} - Less than
  • {{#if (gte value1 value2)}} - Greater than or equal
  • {{#if (lte value1 value2)}} - Less than or equal

Logical Helpers

  • {{#if (and condition1 condition2)}} - Logical AND
  • {{#if (or condition1 condition2)}} - Logical OR
  • {{#if (not condition)}} - Logical NOT

Iteration

  • {{#each array}}...{{/each}} - Iterate over arrays
  • {{@index}} - Current iteration index
  • {{@first}} / {{@last}} - First/last iteration flags

Notes and Best Practices

Platform Normalization

All properties are automatically normalized from platform-specific formats. For example, GitHub’s pull_request becomes pullRequest, and Jira’s key becomes number.

Property Availability

Not all properties are available for all events. For example, trigger.pullRequest is only available for pull request events, and trigger.issue only for issue events. Optional properties may be null or undefined if not provided by the platform.

Provider-Specific Properties

While Overcut normalizes events across all platforms, some properties are only available from specific providers due to webhook payload limitations: Issue Properties:
  • confidential - GitLab only
Pull Request Properties:
  • additions, deletions, changedFiles - GitHub only
  • autoMerge, rebaseable - GitHub only
  • mergeable - GitHub and GitLab only
  • requestedReviewers - GitHub only (GitLab returns empty array)
  • baseSha - Not available on GitLab

Array Access

When accessing array elements, always check if the array exists first using {{#if trigger.issue.labels}} to avoid template rendering errors.

Dynamic Workflows

Combine event context with step outputs ({{outputs.step-id.property}}) for powerful dynamic workflows that adapt based on runtime data.