Use GitHub Cloud actions with automation

Use GitHub Cloud actions with automation

You can use automation actions to connect your Jira Service Management projects with GitHub Cloud, letting you automate common development workflows directly from your automation rules. These actions let you search for and manage pull requests, retrieve branch and tag information, query repositories, and add comments to pull requests — without leaving Jira.

Before you begin: To use GitHub Cloud actions in your automation rules, you need to connect your GitHub Cloud account to your Jira site. Your Jira administrator should configure the GitHub Cloud integration in your instance's settings. You'll need appropriate permissions in both GitHub and Jira to use these actions.

Available GitHub Cloud actions

The following automation actions are available for GitHub Cloud. You can add these actions to any automation rule in your project.


Search pull requests

Use this action to search for pull requests in a GitHub Cloud repository and return their details based on filter criteria such as state, author, or branch. The results can then be used in later steps or conditions in your rule.

Fields:

Field

Description

Required

Organization

The GitHub organization that owns the repository.

Yes

Repository

The repository where you want to search for pull requests.

Yes

State

Filter pull requests by state (for example, open, closed, or merged).

No

Head branch

Filter pull requests by the source branch name.

No

Base branch

Filter pull requests by the target branch name.

No

Author

Filter pull requests by the GitHub username of the author.

No


Get branches

Use this action to retrieve a list of branches in a GitHub Cloud repository. You can use the results in later steps or conditions in your rule — for example, to check whether a branch already exists before creating one.

Fields:

Field

Description

Required

Organization

The GitHub organization that owns the repository.

Yes

Repository

The repository whose branches you want to retrieve.

Yes


Get tags

Use this action to retrieve a list of tags from a GitHub Cloud repository so they can be referenced in later steps in the rule.

Fields:

Field

Description

Required

Organization

The GitHub organization that owns the repository.

Yes

Repository

The repository whose tags you want to retrieve.

Yes


Approve pull request

Use this action to add an approval review to a pull request in GitHub Cloud on behalf of the connection user, when your process requires approvals. This is useful for automating code review gates — for example, automatically approving a pull request when a linked issue moves to an approved status.

Fields:

Field

Description

Required

Organization

The GitHub organization that owns the repository containing the pull request.

Yes

Repository

The repository that contains the pull request to approve.

Yes

Pull request number

The numeric identifier of the pull request you want to approve.

Yes

Note: The authenticated GitHub user must have sufficient permissions to approve pull requests in the target repository. If the user doesn't have the required role, the action will fail.


Reject pull request

Use this action to submit a review that requests changes on a pull request in GitHub Cloud, effectively rejecting it until the requested updates are made.

Fields:

Field

Description

Required

Organization

The GitHub organization that owns the repository containing the pull request.

Yes

Repository

The repository that contains the pull request to reject.

Yes

Pull request number

The numeric identifier of the pull request you want to reject.

Yes

Review comment

A message explaining why the pull request is being rejected and what changes are needed.

No

Note: The authenticated GitHub user must have sufficient permissions to submit pull request reviews in the target repository.


Get pull request collaborators

Use this action to get the list of collaborators associated with a pull request in GitHub Cloud, such as authors, reviewers, or assignees, so you can reference them later in the rule.

Fields:

Field

Description

Required

Organization

The GitHub organization that owns the repository containing the pull request.

Yes

Repository

The repository that contains the pull request whose collaborators you want to retrieve.

Yes

Pull request number

The numeric identifier of the pull request.

Yes


Get repositories

Use this action to get repositories visible to the authenticated GitHub user so they can be used later in the rule. This is useful when you need to dynamically select a repository in a later automation step.

Tip: Results vary by the authenticated user's visibility and membership. Only repositories the user has access to will be returned.


Add comment to pull request

Use this action to add a direct comment to a pull request in GitHub Cloud. This is useful for posting automated status updates, linking to related Jira issues, or notifying reviewers of changes.

Fields:

Field

Description

Required

Repository owner name

The owner of the repository (organization or user).

Yes

Repository name

The name of the repository.

Yes

Pull request ID

The numeric ID shown in the pull request URL.

Yes

Comment

The content of the comment. You can use smart values to dynamically include issue details — for example, {{issue.key}}: {{issue.summary}}.

Yes

Tip: Use smart values like {{issue.key}} and {{issue.summary}} in the comment to automatically include Jira issue details in your GitHub pull request comments.


Example: Automatically approve a pull request when an issue is resolved

Here's how you might use the Approve pull request action in a real automation rule:

  1. Trigger: Issue transitioned → Status changed to Done

  2. Condition: Issue has a linked pull request in GitHub

  3. Action: GitHub Cloud — Approve pull request

    • Organization: Your GitHub organization

    • Repository: Your repository name

    • Pull request number: From linked development info

  4. Action: GitHub Cloud — Add comment to pull request

    • Comment: Approved via Jira automation. Issue {{issue.key}} resolved.

  5. Result: The pull request is approved and a comment is posted, linking the approval back to the resolved Jira issue.



Still need help?

The Atlassian Community is here for you.