Events
Available under @actions-sdk/action-utils/events
.
This module contains utility functions for working with GitHub Actions events.
Functions
isBranchProtectionRule
Checks if the current event is a branch protection rule event.
import { isBranchProtectionRule } from "@actions-sdk/action-utils/events";
if (isBranchProtectionRule()) {
// do something
}
isCheckRun
Checks if the current event is a check run event.
import { isCheckRun } from "@actions-sdk/action-utils/events";
if (isCheckRun()) {
// do something
}
isCheckSuite
Checks if the current event is a check suite event.
import { isCheckSuite } from "@actions-sdk/action-utils/events";
if (isCheckSuite()) {
// do something
}
isCreate
Checks if the current event is a create event.
import { isCreate } from "@actions-sdk/action-utils/events";
if (isCreate()) {
// do something
}
isDelete
Checks if the current event is a delete event.
import { isDelete } from "@actions-sdk/action-utils/events";
if (isDelete()) {
// do something
}
isDeployment
Checks if the current event is a deployment event.
import { isDeployment } from "@actions-sdk/action-utils/events";
if (isDeployment()) {
// do something
}
isDeploymentStatus
Checks if the current event is a deployment status event.
import { isDeploymentStatus } from "@actions-sdk/action-utils/events";
if (isDeploymentStatus()) {
// do something
}
isDiscussion
Checks if the current event is a discussion event.
import { isDiscussion } from "@actions-sdk/action-utils/events";
if (isDiscussion()) {
// do something
}
isDiscussionComment
Checks if the current event is a discussion comment event.
import { isDiscussionComment } from "@actions-sdk/action-utils/events";
if (isDiscussionComment()) {
// do something
}
isFork
Checks if the current event is a fork event.
import { isFork } from "@actions-sdk/action-utils/events";
if (isFork()) {
// do something
}
isGollum
Checks if the current event is a gollum event.
import { isGollum } from "@actions-sdk/action-utils/events";
if (isGollum()) {
// do something
}
isIssueComment
Checks if the current event is a issue comment event.
import { isIssueComment } from "@actions-sdk/action-utils/events";
if (isIssueComment()) {
// do something
}
isIssues
Checks if the current event is a issues event.
import { isIssues } from "@actions-sdk/action-utils/events";
if (isIssues()) {
// do something
}
isLabel
Checks if the current event is a label event.
import { isLabel } from "@actions-sdk/action-utils/events";
if (isLabel()) {
// do something
}
isMergeGroup
Checks if the current event is a merge group event.
import { isMergeGroup } from "@actions-sdk/action-utils/events";
if (isMergeGroup()) {
// do something
}
isMilestone
Checks if the current event is a milestone event.
import { isMilestone } from "@actions-sdk/action-utils/events";
if (isMilestone()) {
// do something
}
isPageBuild
Checks if the current event is a page build event.
import { isPageBuild } from "@actions-sdk/action-utils/events";
if (isPageBuild()) {
// do something
}
isProject
Checks if the current event is a project event.
import { isProject } from "@actions-sdk/action-utils/events";
if (isProject()) {
// do something
}
isProjectCard
Checks if the current event is a project card event.
import { isProjectCard } from "@actions-sdk/action-utils/events";
if (isProjectCard()) {
// do something
}
isProjectColumn
Checks if the current event is a project column event.
import { isProjectColumn } from "@actions-sdk/action-utils/events";
if (isProjectColumn()) {
// do something
}
isPublic
Checks if the current event is a public event.
import { isPublic } from "@actions-sdk/action-utils/events";
if (isPublic()) {
// do something
}
isPullRequest
Checks if the current event is a pull request event.
import { isPullRequest } from "@actions-sdk/action-utils/events";
if (isPullRequest()) {
// do something
}
isPullRequestReview
Checks if the current event is a pull request review event.
import { isPullRequestReview } from "@actions-sdk/action-utils/events";
if (isPullRequestReview()) {
// do something
}
isPullRequestReviewComment
Checks if the current event is a pull request review comment event.
import { isPullRequestReviewComment } from "@actions-sdk/action-utils/events";
if (isPullRequestReviewComment()) {
// do something
}
isPullRequestTarget
Checks if the current event is a pull request target event.
import { isPullRequestTarget } from "@actions-sdk/action-utils/events";
if (isPullRequestTarget()) {
// do something
}
isPush
Checks if the current event is a push event.
import { isPush } from "@actions-sdk/action-utils/events";
if (isPush()) {
// do something
}
isRegistryPackage
Checks if the current event is a registry package event.
import { isRegistryPackage } from "@actions-sdk/action-utils/events";
if (isRegistryPackage()) {
// do something
}
isRelease
Checks if the current event is a release event.
import { isRelease } from "@actions-sdk/action-utils/events";
if (isRelease()) {
// do something
}
isStatus
Checks if the current event is a status event.
import { isStatus } from "@actions-sdk/action-utils/events";
if (isStatus()) {
// do something
}
isWatch
Checks if the current event is a watch event.
import { isWatch } from "@actions-sdk/action-utils/events";
if (isWatch()) {
// do something
}
isWorkflowCall
Checks if the current event is a workflow call event.
import { isWorkflowCall } from "@actions-sdk/action-utils/events";
if (isWorkflowCall()) {
// do something
}
isWorkflowDispatch
Checks if the current event is a workflow dispatch event.
import { isWorkflowDispatch } from "@actions-sdk/action-utils/events";
if (isWorkflowDispatch()) {
// do something
}
isWorkflowRun
Checks if the current event is a workflow run event.
import { isWorkflowRun } from "@actions-sdk/action-utils/events";
if (isWorkflowRun()) {
// do something
}
isRepositoryDispatch
Checks if the current event is a repository dispatch event.
import { isRepositoryDispatch } from "@actions-sdk/action-utils/events";
if (isRepositoryDispatch()) {
// do something
}
isSchedule
Checks if the current event is a schedule event.
import { isSchedule } from "@actions-sdk/action-utils/events";
if (isSchedule()) {
// do something
}
getPayload
Returns the payload of the current event.
import { getPayload } from "@actions-sdk/action-utils/events";
const payload = getPayload();
// null if payload is not available