Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

GitHub Spoke

Manage distributed version control and source code in GitHub from your ServiceNow instance. Create flows in ServiceNow to manage collaborative features such as tracking bugs, feature requests, tasks and so on, for projects in GitHub. View and analyze meaningful usage data for GitHub Enterprise Cloud and GitHub Enterprise Server software subscriptions so that you can reclaim stale licenses.

Request apps on the Store

Visit the ServiceNow Store to view all the available apps, and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the ServiceNow Store version history release notes.

Integration Hub subscription

This spoke requires an Integration Hub subscription. For more information, see Legal schedules - IntegrationHub overview.

Spoke version

GitHub spoke v3.6.0 is the latest version.

Supported versions

This spoke was built for GitHub API version v3, but may be compatible with later versions.

Spoke requirements

  • GitHub account
  • User with admin credentials
  • Token to authenticate the ServiceNow instance

See the GitHub documentation for instructions on creating a GitHub account and generating a token.

GitHub Webhooks module

Bi-directional webhooks can be set up to be notified about the required events. Routing policy defines conditions that must be met to notify the ServiceNow app. These conditions are based on the events in GitHub for which you want to be notified about. When the conditions are met, the routing policy triggers the associated subflow, which in turn automates the GitHub tasks.

The bi-directional webhooks require separate setup and can be used independently without using the spoke actions. By default, the GitHub Webhooks application is available in the GitHub spoke and has the following modules:

  • GitHub Webhook Registries
  • GitHub WebHook Routing Policies

Use the GitHub Webhook Registries module to assign a token and provide the API path. You must generate a Callback URL here and provide this URL in GitHub. A default routing policy is provided in the GitHub WebHook Routing Policies module. The default routing policy supports these GitHub fields:

Supported GitHub fields
Action
Base Ref
Commit Comment Body
Commit Comment Created At
Commit Comment Path
Commit Comment Updated At
Commit Comment User
Force Push
GitHub Instance URL
Issue Assigned To
Issue Assignees
Issue Body
Issue Closed At
Issue Comment
Issue Comment Count
Issue Comment Created At
Issue Comment Updated At
Issue Created At
Issue Labeled To
Issue Labels
Issue Locked
Issue Milestone
Issue Previous Body
Issue Previous Comment
Issue Previous Milestone
Issue Previous Title
Issue Previously Assigned To
Issue Previously Labeled To
Issue State
Issue Title
Issue Updated At
Issue User
Milestone Closed At
Milestone Created At
Milestone Creator
Milestone Description
Milestone Due On
Milestone State
Milestone Title
Milestone Updated At
Organization Description
Organization Login
Pre-Release
Project Body
Project Card Archived
Project Card Created At

To use other conditions in the routing policy, create a routing policy in the GitHub WebHook Routing Policies module and specify conditions according to your requirement. See Set up bi-directional webhook for the GitHub spoke for information regarding setting up and configuring the webhooks.

Spoke triggers

ServiceNow supports specific events on GitHub that create triggers. You must first configure a flow with a supported trigger definition. When an event, for example, a push request, occurs on the GitHub, it sends the payload via a webhook to the ServiceNow instance. After that, the flow that you configured is triggered at the ServiceNow instance to automate a workflow. The supported events are:

CategoryTriggerDescription
Branch ManagementBranch CreatedFlow is triggered when you create a branch on GitHub.
Repository ManagementPull Request OpenedFlow is triggered when you initiate a new pull request on GitHub.
Pull Request EditedFlow is triggered when you update a pull request on GitHub.
Pull Request ClosedFlow is triggered when you close a pull request on GitHub.
Pull Request AssignedFlow is triggered when you assign a pull request to a user on GitHub.
Pull Request ReopenedFlow is triggered when you reopen a pull request on GitHub.
Repository ForkFlow is triggered when you fork a repository on GitHub.
Repository PushFlow is triggered when you push to a repository on GitHub.
Release ManagementRelease CreatedFlow is triggered when the details of a release are created on GitHub.
Release EditedFlow is triggered when the details of a release are updated on GitHub.
Release DeletedFlow is triggered when a release is removed on GitHub.
Release ReleasedFlow is triggered when a release is released on GitHub.

For information about setting up the triggers for the GitHub spoke, see Activate the trigger definition on ServiceNow instance. For more information about inbound integration, see Conditional and event-driven inbound integration.

Spoke subflows

The GitHub spoke provides a sample subflow to handle various GitHub webhook events. Available sample subflows are:

SubflowDescriptionSupported GitHub Event
Process GitHub Branch and Tag Webhook EventsHandles branch and tag webhook events.Branch and Tag
Process GitHub Commit Webhook EventsHandles commit webhook events.Commit
Process GitHub Issue Webhook EventsHandles issue webhook events.Issue
Process GitHub Milestone Webhook EventsHandles milestone webhook events.Milestone
Process GitHub Project Webhook EventsHandles project webhook events.Project
Process GitHub Pull Request Webhook EventsHandles pull request webhook events.Pull Request
Process GitHub Push Webhook EventsHandles push request webhook events.Push Request
Process GitHub Release Webhook EventsHandles release webhook events.Release
Process GitHub Repository Webhook EventsHandles repository webhook events.Repository
Process GitHub Security Webhook EventsHandles security webhook events.Security
Process GitHub Webhook EventsHandles all GitHub webhook events.Note: This subflow handles all GitHub events. You can customize this subflow to handle other GitHub webhook events that are not supported by default.

To create subflows to handle other GitHub webhook events or handle the supported GitHub webhook events differently, customize the Process GitHub Webhook Events subflow. For this, you must a create a copy of the subflow, parse the payload, and customize the subflow according to your requirement. Payload is one of the inputs to the subflow.

While customizing subflows, you must confirm that the subflows are configured to avoid infinite loops.

Note:

  • You must configure webhooks to use the spoke subflow. See Set up bi-directional webhook for the GitHub spoke for information regarding setting up and configuring the webhook.
  • The sample subflows run as a user by default. It can be configured to run as a system.
  • GitHub spoke supports application/json payload. Configure the GitHub webhook accordingly. See the GitHub Developer documentation for instructions on creating and configuring a webhook.

Spoke actions

The GitHub spoke provides actions manage branches, issues, repositories, and source code when events occur in ServiceNow. Available actions include:

CategoryActionDescription
Branch ManagementCreate BranchCreates a branch in GitHub based on a specific commit SHA.
Delete BranchDeletes a branch from the GitHub repository.
Look up BranchRetrieves the details of a branch in the GitHub repository.
Look up Branch ProtectionRetrieves the restriction details of the required branch.
Look up BranchesRetrieves the list of all branches in a repository.
Remove Branch ProtectionRemoves protection on the required branch.
Update Branch ProtectionUpdates protection on the required branch.
Issue ManagementCreate Comment on IssueCreates comment on a required issue.
Create IssueCreates issue for the required repository.
Delete Comment on IssueDeletes comment on a required issue.
Lock IssueLocks the required issue. This limits the conversation to collaborators only.
Look Up Comments on Issue StreamRetrieves the list of comments on an issue.
Look Up Issues StreamRetrieves the list of issues for a repository.
Unlock IssueUnlocks the required issue. This opens conversation to all users.
Update Comment on IssueUpdates a comment on an issue.
Update IssueUpdates the details of the required issue.
Metadata RetrievalLook up Fields by ActionRetrieves the list of fields for an action filter in the GitHub Fields table.
Look up Branches MetadataRetrieves metadata of the branches.
Look up Issues MetadataRetrieves metadata of the issues.
Look up Milestones MetadataRetrieves metadata of the milestones.
Look up Pull Requests MetadataRetrieves metadata of the pull requests.
Organization ManagementLook up Organization PlanRetrieves the plan name of an organization.
Look up Organization Members StreamRetrieves the list of all members within an organization.
Look up Organization Repositories StreamRetrieves the list of all repositories within an organization.
Remove Organization MemberRemoves a user from an organization.
Look up Organization Events StreamRetrieves the list of events in an organization based on the provided look back date.
Look up Organization Outside Collaborators StreamRetrieves the list of all Outside Collaborators within an organization.
Remove Organization Outside CollaboratorRemoves an outside collaborator from an organization.
Look up Organization Pending Outside Collaborators StreamRetrieves a list of pending collaborators within a repository.
Look up Organization Invitations StreamRetrieves a list of invitations within an organization.
Look up Organization Audit Log StreamRetrieves a list of organization audit log events for a specified look-back date.
Repository ManagementAdd CollaboratorAdds collaborator to the required repository.
Delete RepositoryDeletes a repository from GitHub.
Create Comment on Pull RequestCreate review comments on a pull request.
Create MilestoneCreates milestone for the required repository.
Create Pull RequestCreates a pull request for a repository.
Create Reply on Pull Request Review CommentCreates reply to a review comment for a pull request.
Create RepositoryCreates a repository in GitHub.
Delete Comment on Pull RequestDeletes review comment on a pull request.
Delete MilestoneDeletes milestone from the required repository.
Look up Comments on Pull Request StreamRetrieves the list of all review comments on a pull request.
Look up Milestones StreamRetrieves the list of all milestones in a repository.
Look up Repository Events StreamRetrieves the list of events across a repository.
Look Up Pull Requests StreamRetrieves the details of pull requests for a repository.
Look Up Repositories StreamRetrieves the details of repositories based on a specific user or organization.
Look up Repository DetailsRetrieves the details of the specified repository.
Merge Pull RequestMerges the pull request to a repository.
Remove CollaboratorRemoves collaborator from a repository.
Update Comment on Pull RequestUpdates review comments provided for a pull request.
Update MilestoneUpdates the details of a milestone in a repository.
Update Pull RequestUpdates the details of a pull request in a repository.
Update RepositoryUpdates the details of a repository in GitHub.
Source Code ManagementCreate Comment on CommitCreates a comment for the required commit using its SHA.
Create or update a fileCreates a file or updates an existing file in a repository.
Look up Comments by Commit ID StreamRetrieves comments provided for a single commit.
Look up Commit Information By IDRetrieves the contents of the required commit reference.
Look up File ContentRetrieves the contents of a file in a repository.Note: This action supports files with file size up to 1 MB.
Look up Commits on a RepositoryRetrieves the details of all commits made on a repository.
User ManagementLook up All Users for Enterprise ServerRetrieves the list of all GitHub Enterprise Server users.
Look up Organizations for the Authenticated User StreamRetrieves the list of organizations that the logged-in user is a member of.
Suspend UserSuspends a GitHub user account.
Look up Authenticated UserRetrieves information about the authenticated user.

Available AI agents

Install Now Assist for Integration Hub and start using the available AI agents. For more information, see ServiceNow Otto for Integration Hub.

This spoke provides standalone AI agents that mimic human-like intelligence to perform tasks in your ServiceNow instance.

  • In the ServiceNow agentic system, you can create an agentic workflow that comprises of a set of large language model (LLM) instructions along with one or more standalone AI agents to execute an objective. See for information about adding AI agents to create agentic workflows as per your requirement and provide the required trigger.

    You can also search for other available AI agents and add them to your agentic workflow. See Find AI agents for more information.

  • You can create a clone of the required spoke AI agent and customize it as per your requirement. See for more information about creating a clone.

  • See for information about AI agents.

Available AI agents include:

AI agentDescription
GitHub branch management AI agentManages and maintains the GitHub branches. Also, retrieves information about the GitHub branches.
GitHub issue management AI agentManages and automates GitHub-related tasks in Integration Hub.
GitHub repository management AI agentManages the GitHub repositories by handling the repository operations, pull requests, comments on pull request and milestones.
GitHub source code management AI agentManages source code and handles the repository files, commits, and comments.
GitHub Code Automation AI AgentManages code changes and GitHub operations from your ServiceNow instance. This agent interprets your requests, asks clarifying questions, and analyzes context to deliver well-integrated code updates. It also performs GitHub tasks such as creating branches, committing changes, and opening pull requests.

There might be AI agents installed with the Now Assist application that are not used in agentic workflows. To learn how to see all agents that are available to you, see Find AI agents.

Note: Ensure that the user running an AI agent has the required roles and permissions to access data or perform operations on data in the table that is associated with the AI agent.

Spoke modules

The GitHub spoke adds these modules to your ServiceNow instance.

ModuleDescription
GitHub OwnerDisplays the GitHub owner records that you had created.
GitHub RepositoriesDisplays the details of the GitHub repositories associated with the GitHub owners.

Connection and credential alias requirements

Integration Hub uses aliases to manage connection and credential information, and OAuth credentials. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using multiple environments. If the connection or credential information changes, you don't need to update any actions that use the connection.

For information about setting up the spoke, see Set up the GitHub spoke.