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 |
|---|---|---|
| The GitHub organization that owns the repository. | Yes |
| The repository where you want to search for pull requests. | Yes |
| Filter pull requests by state (for example, | No |
| Filter pull requests by the source branch name. | No |
| Filter pull requests by the target branch name. | No |
| 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 |
|---|---|---|
| The GitHub organization that owns the repository. | Yes |
| 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 |
|---|---|---|
| The GitHub organization that owns the repository. | Yes |
| 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 |
|---|---|---|
| The GitHub organization that owns the repository containing the pull request. | Yes |
| The repository that contains the pull request to approve. | Yes |
| 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 |
|---|---|---|
| The GitHub organization that owns the repository containing the pull request. | Yes |
| The repository that contains the pull request to reject. | Yes |
| The numeric identifier of the pull request you want to reject. | Yes |
| 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 |
|---|---|---|
| The GitHub organization that owns the repository containing the pull request. | Yes |
| The repository that contains the pull request whose collaborators you want to retrieve. | Yes |
| 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 |
|---|---|---|
| The owner of the repository (organization or user). | Yes |
| The name of the repository. | Yes |
| The numeric ID shown in the pull request URL. | Yes |
| The content of the comment. You can use smart values to dynamically include issue details — for example, | 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:
Trigger: Issue transitioned → Status changed to Done
Condition: Issue has a linked pull request in GitHub
Action: GitHub Cloud — Approve pull request
Organization: Your GitHub organization
Repository: Your repository name
Pull request number: From linked development info
Action: GitHub Cloud — Add comment to pull request
Comment:
Approved via Jira automation. Issue {{issue.key}} resolved.
Result: The pull request is approved and a comment is posted, linking the approval back to the resolved Jira issue.
Was this helpful?