status

This page was generated based on Github’s Documentation. See our welcome page for context and details.

Github Event status #

Github Action Trigger #

source

Webhook event payloadActivity typesGITHUB_SHAGITHUB_REF
statusNot applicableLast commit on default branchNot applicable

Note: This event will only trigger a workflow run if the workflow file is on the default branch.

Runs your workflow when the status of a Git commit changes. For example, commits can be marked as errorfailurepending, or success. If you want to provide more details about the status change, you may want to use the check_run event. For information about the commit status APIs, see “Objects” in the GraphQL API documentation or “REST API endpoints for commits.”

For example, you can run a workflow when the status event occurs.

on:
  status

If you want to run a job in your workflow based on the new commit state, you can use the github.event.state context. For example, the following workflow triggers when a commit status changes, but the if_error_or_failure job only runs if the new commit state is error or failure.

on:
  status
jobs:
  if_error_or_failure:
    runs-on: ubuntu-latest
    if: >-
      github.event.state == 'error' ||
      github.event.state == 'failure'      
    steps:
      - env:
          DESCRIPTION: ${{ github.event.description }}
        run: |
          echo The status is error or failed: $DESCRIPTION          

Event Payload #

source

This event occurs when the status of a Git commit changes. For example, commits can be marked as error, failure, pending, or success. For more information, see "About status checks." For information about the APIs to manage commit statuses, see the GraphQL documentation or "Commit statuses" in the REST API documentation.

To subscribe to this event, a GitHub App must have at least read-level access for the "Commit statuses" repository permission.

fieldtyperequireddescription
github.event.avatar_urlstring or nulloptional
github.event.branchesarray of objectsrequired

An array of branch objects containing the status’ SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches.

github.event.branches.commitobjectrequired
github.event.branches.commit.shastring or nullrequired
github.event.branches.commit.urlstring or nullrequired
github.event.branches.namestringrequired
github.event.branches.protectedbooleanrequired
github.event.commitobjectrequired
github.event.commit.authorobject or nullrequired
github.event.commit.author.avatar_urlstringoptional
github.event.commit.author.deletedbooleanoptional
github.event.commit.author.emailstring or nulloptional
github.event.commit.author.events_urlstringoptional
github.event.commit.author.followers_urlstringoptional
github.event.commit.author.following_urlstringoptional
github.event.commit.author.gists_urlstringoptional
github.event.commit.author.gravatar_idstringoptional
github.event.commit.author.html_urlstringoptional
github.event.commit.author.idintegeroptional
github.event.commit.author.loginstringoptional
github.event.commit.author.namestringoptional
github.event.commit.author.node_idstringoptional
github.event.commit.author.organizations_urlstringoptional
github.event.commit.author.received_events_urlstringoptional
github.event.commit.author.repos_urlstringoptional
github.event.commit.author.site_adminbooleanoptional
github.event.commit.author.starred_urlstringoptional
github.event.commit.author.subscriptions_urlstringoptional
github.event.commit.author.typeBot, User, Organizationoptional
github.event.commit.author.urlstringoptional
github.event.commit.comments_urlstringrequired
github.event.commit.commitobjectrequired
github.event.commit.commit.authorobjectrequired
github.event.commit.commit.author.datestringrequired
github.event.commit.commit.author.emailstring or nullrequired
github.event.commit.commit.author.namestringrequired

The git author’s name.

github.event.commit.commit.author.usernamestringoptional
github.event.commit.commit.comment_countintegerrequired
github.event.commit.commit.committerobjectrequired
github.event.commit.commit.committer.datestringrequired
github.event.commit.commit.committer.emailstring or nullrequired
github.event.commit.commit.committer.namestringrequired

The git author’s name.

github.event.commit.commit.committer.usernamestringoptional
github.event.commit.commit.messagestringrequired
github.event.commit.commit.treeobjectrequired
github.event.commit.commit.tree.shastringrequired
github.event.commit.commit.tree.urlstringrequired
github.event.commit.commit.urlstringrequired
github.event.commit.commit.verificationobjectrequired
github.event.commit.commit.verification.payloadstring or nullrequired
github.event.commit.commit.verification.reasonexpired_key, not_signing_key, gpgverify_error, gpgverify_unavailable, unsigned, unknown_signature_type, no_user, unverified_email, bad_email, unknown_key, malformed_signature, invalid, valid, bad_cert, ocsp_pendingrequired
github.event.commit.commit.verification.signaturestring or nullrequired
github.event.commit.commit.verification.verifiedbooleanrequired
github.event.commit.committerobject or nullrequired
github.event.commit.committer.avatar_urlstringoptional
github.event.commit.committer.deletedbooleanoptional
github.event.commit.committer.emailstring or nulloptional
github.event.commit.committer.events_urlstringoptional
github.event.commit.committer.followers_urlstringoptional
github.event.commit.committer.following_urlstringoptional
github.event.commit.committer.gists_urlstringoptional
github.event.commit.committer.gravatar_idstringoptional
github.event.commit.committer.html_urlstringoptional
github.event.commit.committer.idintegeroptional
github.event.commit.committer.loginstringoptional
github.event.commit.committer.namestringoptional
github.event.commit.committer.node_idstringoptional
github.event.commit.committer.organizations_urlstringoptional
github.event.commit.committer.received_events_urlstringoptional
github.event.commit.committer.repos_urlstringoptional
github.event.commit.committer.site_adminbooleanoptional
github.event.commit.committer.starred_urlstringoptional
github.event.commit.committer.subscriptions_urlstringoptional
github.event.commit.committer.typeBot, User, Organizationoptional
github.event.commit.committer.urlstringoptional
github.event.commit.html_urlstringrequired
github.event.commit.node_idstringrequired
github.event.commit.parentsarray of objectsrequired
github.event.commit.parents.html_urlstringrequired
github.event.commit.parents.shastringrequired
github.event.commit.parents.urlstringrequired
github.event.commit.shastringrequired
github.event.commit.urlstringrequired
github.event.contextstringrequired
github.event.created_atstringrequired
github.event.descriptionstring or nullrequired

The optional human-readable description added to the status.

github.event.enterpriseobjectoptional

An enterprise on GitHub. Webhook payloads contain the enterprise property when the webhook is configured on an enterprise account or an organization that’s part of an enterprise account. For more information, see “About enterprise accounts."

github.event.idintegerrequired

The unique identifier of the status.

github.event.installationobjectoptional

The GitHub App installation. Webhook payloads contain the installation property when the event is configured for and sent to a GitHub App. For more information, see “Using webhooks with GitHub Apps."

github.event.namestringrequired
github.event.organizationobjectoptional

A GitHub organization. Webhook payloads contain the organization property when the webhook is configured for an organization, or when the event occurs from activity in a repository owned by an organization.

github.event.repositoryobjectrequired

The repository on GitHub where the event occurred. Webhook payloads contain the repository property when the event occurs from activity in a repository.

github.event.senderobjectrequired

The GitHub user that triggered the event. This property is included in every webhook payload.

github.event.shastringrequired

The Commit SHA.

github.event.statepending, success, failure, errorrequired

The new state. Can be pending, success, failure, or error.

github.event.target_urlstring or nullrequired

The optional link added to the status.

github.event.updated_atstringrequired