Details
| ID | GitHub |
|---|---|
| Provider | Microsoft |
| Category | Utilities |
| From Version | 5.0.0 |
| Docker Image | demisto/auth-utils:1.0.0.11671917 |
| Supported Modules | Agentix Cloud Runtime Security Cloud Posture Security XSIAM EDR Cortex Cloud |
README
Overview
GitHub is an internet hosting provider that uses Git for software development and version control. It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features. It provides access control and collaboration features such as bug tracking, feature requests, task management, continuous integration, and wikis for every project.
Use Cases
This integration enables you to:
- Create, close, or update a GitHub issue.
- Get a list of all GitHub issues you have access to.
- Create a branch in GitHub.
- Get a list of a GitHub issue comments.
- Create or update a GitHub pull request.
- Search for a GitHub pull request.
- Get a list of files for a GitHub pull request.
- Get a list of inactive GitHub pull requests.
- Get the contents of a file in GitHub.
- Create a release.
Configuration
To configure the GitHub integration on Cortex XSOAR you need to do the following (see below for more details):
- Configure access to GitHub.
- Configure integration parameters.
Configure Access to GitHub
You can configure access to GitHub by either creating a personal access token or by creating a new GitHub app for Cortex XSOAR.
Create a Personal Access Token
Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the GitHub API.
To generate a new token:
- Navigate to the upper-right corner of any page and click your profile photo.
- In the left sidebar, click Developer settings.
- In the left sidebar, click Personal access tokens and click Generate new token.
- Give your token a descriptive name.
- To give your token an expiration, select the Expiration drop-down menu, then click a default or use the calendar picker.
- Select the scopes, or permissions, you want to grant this token. The minimum is read-only on repo.
- Click Generate token and copy the token generated.
Create a new GitHub App for Cortex XSOAR
Another authentication option is to create and register a GitHub app under your personal account or under any organization you have administrative access to.
- Navigate to the upper-right corner of any page and click your profile photo:
- For a personal account owned app, click Settings.
- For an organization owned app, click Organizations. To the right of the organization, click Settings.
- In the left sidebar, click Developer settings. From the sub-menu, click GitHub Apps.
- Click New GitHub App.
- In GitHub App name, type the name of your app.
- In Homepage URL, type any URL (this field is required).
- Deselect the Active option under the Webhook settings.
- In Permissions, choose the permissions within your app. For each item, use the drop-down menu and select Read-only, Read and write, or No access. The minimum repository permission for Contents, Issues, Pull requests, Checks, and Commit statuses is read only.
- Click Create GitHub App.
- Click to generate and download a private key for your GitHub app.
- Once you create a GitHub app, you can install it on one or more of your org or user repositories.
- From the Developer settings > GitHub Apps page, select your app.
- In the left sidebar, click Install App.
- Click Install next to the organization or user account containing the correct repository.
- Install the app on all repositories or on selected repositories.
- Once installed, you will see configuration options for the app on your selected account.
- Copy the private key from the .pem file generated and downloaded above. Include the lines
-----BEGIN RSA PRIVATE KEY-----and-----END RSA PRIVATE KEY-----. In Cortex, navigate to Settings > Credentials and click + New Credential. Give the credential a name and paste the private key into the Certificate field. When you configure the integration instance, for the Credentials parameter, you must select Switch to credentials and select the credential you just created. - Set the GitHub app integration ID.
a. In the GitHub Apps page, click the app name.
b. Copy the Client ID (a string of letters and numbers).
c. Under the integration instance settings configuration Advanced Settings, paste the client ID in the GitHub app integration ID field.

- Set the GitHub app installation ID.
a. Navigate to the repository where you installed the app > Settings > GitHub Apps.
b. To the right of the app name, click Configure. The installation ID is the number at the end of the URL.
c. Under the integration instance settings configuration Advanced Settings, paste the installation ID in the GitHub app installation ID field.
Configure Integration Parameters
- Navigate to Settings > Integrations > Servers & Services.
- Search for GitHub.
- Click Add instance to create and configure a new integration instance.
| Parameter | Description | Required |
|---|---|---|
| Fetch incidents | Whether to fetch. | False |
| Select an Issue or Pull requests to Fetch | Item type to fetch. | False |
| Server URL | The REST API URL. | False |
| API Token | GitHub token. | False |
| Credentials | GitHub username or, if using a GitHub app, this is where you select the Credential containing the app private key. | False |
| Username of the repository owner, for example: github.com/repos/{owner}/{repo}/issues | Repository owner org name/username. | False |
| The name of the requested repository | Repository name. | False |
| First fetch interval (in days) | First fetch interval. | False |
| Use system proxy settings | Whether to use system proxy settings. | False |
| Trust any certificate (not secure) | Whether to trust any certificate. | False |
| Incident type | Incident/issue type, if fetching. | False |
| GitHub app integration ID | GitHub app Client ID from app settings page. | False |
| GitHub app installation ID | GitHub app installation ID from installed app page URL. | False |
| Incidents Fetch Interval | Fetch interval. | False |
- Click Test to validate the URLs, token, and connection.
Commands
You can execute these commands from the Cortex XSOAR CLI as part of an automation or in a playbook. After you successfully
execute a command, a DBot message appears in the War Room with the command details.
GitHub-create-issue
Deprecated. Use github-create-issue instead.
Creates an issue in GitHub.
Base Command
GitHub-create-issue
Input
| Argument Name | Description | Required |
|---|---|---|
| title | The title of the issue. | Required |
| body | The contents of the issue. | Optional |
| labels | Labels to associate with this issue. | Optional |
| assignees | Logins for Users to assign to this issue. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the created issue. |
| GitHub.Issue.Repository | String | The repository of the created issue. |
| GitHub.Issue.Title | String | The title of the created issue. |
| GitHub.Issue.Body | Unknown | The body of the created issue. |
| GitHub.Issue.State | String | The state of the created issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | The users assigned to this issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository owner. |
Command Example
!GitHub-create-issue title=“newbug” body=“found a new bug” lable=bug,new
Human Readable Output
Issues
| ID | Repository | Organization | Title | State | Body | Created_at | Updated_at |
|---|---|---|---|---|---|---|---|
| 138 | Git-Integration | demisto | “newbug” | open | “found | 2019-06-17T15:14:10Z | 2019-06-17T15:14:10Z |
GitHub-close-issue
Deprecated. Use github-close-issue instead.
Closes an existing issue.
Base Command
GitHub-close-issue
Input
| Argument Name | Description | Required |
|---|---|---|
| ID | The number of the issue to close. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the closed issue. |
| GitHub.Issue.Repository | String | The repository of the closed issue. |
| GitHub.Issue.Title | String | The title of the closed issue |
| GitHub.Issue.Body | Unknown | The body of the closed issue. |
| GitHub.Issue.State | String | The state of the closed issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | The users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository owner. |
Command Example
!GitHub-close-issue ID=136
Human Readable Output
Issues
| ID | Repository | Organization | Title | State | Created_at | Updated_at | Closed_at | Closed_by | Labels |
|---|---|---|---|---|---|---|---|---|---|
| 136 | Git-Integration | demisto | new | closed | 2019-06-17T14:48:15Z | 2019-06-17T15:14:12Z | 2019-06-17T15:14:12Z | roysagi | bug, else, new |
GitHub-update-issue
Deprecated. Use github-update-issue instead.
Updates the parameters of a specified issue.
Base Command
GitHub-update-issue
Input
| Argument Name | Description | Required |
|---|---|---|
| ID | The number of the issue to update. | Required |
| title | The title of the issue. | Optional |
| body | The contents of the issue. | Optional |
| state | State of the issue. Either open or closed. | Optional |
| labels | Labels to apply to this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue. . | Optional |
| assignees | Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the updated issue. |
| GitHub.Issue.Repository | String | The repository of the updated issue. |
| GitHub.Issue.Title | String | The title of the updated issue. |
| GitHub.Issue.Body | Unknown | The body of the updated issue. |
| GitHub.Issue.State | String | The state of the updated issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | The users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository owner. |
Command Example
!GitHub-update-issue ID=137 title=“new_title” body=“new info” state=open
Human Readable Output
Issues
| ID | Repository | Organization | Title | State | Body | Created_at | Updated_at |
|---|---|---|---|---|---|---|---|
| 137 | Git-Integration | demisto | “new_title” | open | “new | 2019-06-17T15:09:50Z | 2019-06-17T15:14:13Z |
GitHub-list-all-issues
Deprecated. Use github-list-all-issues instead.
Lists all issues that the user has access to view.
Base Command
GitHub-list-all-issues
Input
| Argument Name | Description | Required |
|---|---|---|
| state | The state of the issues to return. Can be ‘open’, ‘closed’ or ‘all’. Default is ‘open’. Possible values are: open, closed, all. Default is open. | Required |
| limit | The number of issues to return. Default is 50. Maximum is 200. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the issue. |
| GitHub.Issue.Repository | String | The repository of the issue. |
| GitHub.Issue.Title | String | The title of the issue. |
| GitHub.Issue.Body | Unknown | The body of the issue. |
| GitHub.Issue.State | String | The state of the issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | The users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository owner. |
Command Example
!GitHub-list-all-issues state=all limit=2
Human Readable Output
Issues
| ID | Repository | Organization | Title | State | Body | Created_at | Updated_at | Closed_at | Labels |
|---|---|---|---|---|---|---|---|---|---|
| 109 | Git-Integration | demisto | “new issue” | closed | “new information” | 2019-06-04T11:52:11Z | 2019-06-04T11:52:13Z | 2019-06-04T11:52:13Z | newbug |
| 110 | Git-Integration | demisto | “new issue” | closed | “new information” | 2019-06-04T11:53:19Z | 2019-06-04T11:53:22Z | 2019-06-04T11:53:22Z | newbug |
GitHub-search-code
Deprecated. Use github-search-code instead.
Searches for code in repositories that match a given query.
Base Command
GitHub-search-code
Input
| Argument Name | Description | Required |
|---|---|---|
| query | The query line for the search. For more information see the GitHub documentation. | Required |
| page_number | The page number. | Optional |
| page_size | The size of the requested page. Maximum is 100. | Optional |
| limit | The number of results to return. Default is 50. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.CodeSearchResults.name | String | The file name where the code is found. |
| GitHub.CodeSearchResults.path | String | The full file path where the code is found. |
| GitHub.CodeSearchResults.html_url | String | The URL to the file. |
| GitHub.CodeSearchResults.repository.full_name | String | The repository name. |
| GitHub.CodeSearchResults.repository.html_url | String | The URL to the repository. |
| GitHub.CodeSearchResults.repository.description | String | The repository description. |
| GitHub.CodeSearchResults.repository.private | Boolean | True if the repository is private, false if public. |
| GitHub.CodeSearchResults.repository.id | String | The ID of the repository. |
| GitHub.CodeSearchResults.repository.releases_url | String | The URL to the releases of the repository. |
| GitHub.CodeSearchResults.repository.branches_url | String | The URL to the branches of the repository. |
| GitHub.CodeSearchResults.repository.commits_url | String | The URL to the commits of the repository. |
Command Example
!GitHub-search-code query="create_artifacts+repo:demisto/demisto-sdk" page_size="2" limit="5"
Context Example
{
"GitHub": {
"CodeSearchResults": [
{
"html_url": "https://github.com/demisto/demisto-sdk/blob/bfd4c375f9c61d4fdd4974ecf244a4bede13b8ed/.pre-commit-config.yaml",
"name": ".pre-commit-config.yaml",
"path": ".pre-commit-config.yaml",
"repository": {
"branches_url": "https://api.github.com/repos/demisto/demisto-sdk/branches{/branch}",
"commits_url": "https://api.github.com/repos/demisto/demisto-sdk/commits{/sha}",
"desrciption": "Demisto SDK - Create Demisto Content with ease and efficiency",
"full_name": "demisto/demisto-sdk",
"html_url": "https://github.com/demisto/demisto-sdk",
"id": 219291269,
"private": false,
"releases_url": "https://api.github.com/repos/demisto/demisto-sdk/releases{/id}"
}
},
{
"html_url": "https://github.com/demisto/demisto-sdk/blob/bfd4c375f9c61d4fdd4974ecf244a4bede13b8ed/demisto_sdk/tests/integration_tests/content_create_artifacts_integration_test.py",
"name": "content_create_artifacts_integration_test.py",
"path": "demisto_sdk/tests/integration_tests/content_create_artifacts_integration_test.py",
"repository": {
"branches_url": "https://api.github.com/repos/demisto/demisto-sdk/branches{/branch}",
"commits_url": "https://api.github.com/repos/demisto/demisto-sdk/commits{/sha}",
"desrciption": "Demisto SDK - Create Demisto Content with ease and efficiency",
"full_name": "demisto/demisto-sdk",
"html_url": "https://github.com/demisto/demisto-sdk",
"id": 219291269,
"private": false,
"releases_url": "https://api.github.com/repos/demisto/demisto-sdk/releases{/id}"
}
},
{
"html_url": "https://github.com/demisto/demisto-sdk/blob/bfd4c375f9c61d4fdd4974ecf244a4bede13b8ed/demisto_sdk/commands/create_artifacts/tests/content_artifacts_creator_test.py",
"name": "content_artifacts_creator_test.py",
"path": "demisto_sdk/commands/create_artifacts/tests/content_artifacts_creator_test.py",
"repository": {
"branches_url": "https://api.github.com/repos/demisto/demisto-sdk/branches{/branch}",
"commits_url": "https://api.github.com/repos/demisto/demisto-sdk/commits{/sha}",
"desrciption": "Demisto SDK - Create Demisto Content with ease and efficiency",
"full_name": "demisto/demisto-sdk",
"html_url": "https://github.com/demisto/demisto-sdk",
"id": 219291269,
"private": false,
"releases_url": "https://api.github.com/repos/demisto/demisto-sdk/releases{/id}"
}
},
{
"html_url": "https://github.com/demisto/demisto-sdk/blob/bfd4c375f9c61d4fdd4974ecf244a4bede13b8ed/demisto_sdk/commands/common/content/tests/objects/pack_objects/pack_metadata/pack_metadata_test.py",
"name": "pack_metadata_test.py",
"path": "demisto_sdk/commands/common/content/tests/objects/pack_objects/pack_metadata/pack_metadata_test.py",
"repository": {
"branches_url": "https://api.github.com/repos/demisto/demisto-sdk/branches{/branch}",
"commits_url": "https://api.github.com/repos/demisto/demisto-sdk/commits{/sha}",
"desrciption": "Demisto SDK - Create Demisto Content with ease and efficiency",
"full_name": "demisto/demisto-sdk",
"html_url": "https://github.com/demisto/demisto-sdk",
"id": 219291269,
"private": false,
"releases_url": "https://api.github.com/repos/demisto/demisto-sdk/releases{/id}"
}
}
]
}
}
Human Readable Output
Returned 5 out of 6 total results
Name Path Repository Name Repository Description Is Repository Private .pre-commit-config.yaml .pre-commit-config.yaml demisto/demisto-sdk Demisto SDK - Create Demisto Content with ease and efficiency false content_create_artifacts_integration_test.py demisto_sdk/tests/integration_tests/content_create_artifacts_integration_test.py demisto/demisto-sdk Demisto SDK - Create Demisto Content with ease and efficiency false content_artifacts_creator_test.py demisto_sdk/commands/create_artifacts/tests/content_artifacts_creator_test.py demisto/demisto-sdk Demisto SDK - Create Demisto Content with ease and efficiency false pack_metadata_test.py demisto_sdk/commands/common/content/tests/objects/pack_objects/pack_metadata/pack_metadata_test.py demisto/demisto-sdk Demisto SDK - Create Demisto Content with ease and efficiency false content_artifacts_creator_test.py demisto_sdk/commands/create_artifacts/tests/content_artifacts_creator_test.py demisto/demisto-sdk Demisto SDK - Create Demisto Content with ease and efficiency false
GitHub-search-issues
Deprecated. Use github-search-issues instead.
Searches for and returns issues that match a given query.
Base Command
GitHub-search-issues
Input
| Argument Name | Description | Required |
|---|---|---|
| query | The query line for the search. For more information see the GitHub documentation at https://help.github.com/en/articles/searching-issues-and-pull-requests. | Required |
| limit | The number of issues to return. Default is 50. Maximum is 100. Default is 50. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the issue. |
| GitHub.Issue.Repository | String | The repository of the issue. |
| GitHub.Issue.Title | String | The title of the issue. |
| GitHub.Issue.Body | Unknown | The body of the issue. |
| GitHub.Issue.State | String | The state of the issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | The users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository owner. |
Command Example
!GitHub-search-issues query=“label:bug state:open” limit=1
Human Readable Output
Issues
| ID | Repository | Organization | Title | State | Body | Created_at | Updated_at | Closed_at | Assignees | Labels |
|---|---|---|---|---|---|---|---|---|---|---|
| 109 | Git-Integration | demisto | “new issue” | open | “new information” | 2019-06-04T11:52:11Z | 2019-06-04T11:52:13Z | 2019-06-04T11:52:13Z | teizenman | newbug |
GitHub-get-download-count
Deprecated. Use github-get-download-count instead.
Returns the total number of downloads for all releases for the specified repository.
Base Command
GitHub-get-download-count
Input
There are no input arguments for this command.
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Release.ID | Number | The ID of the release. |
| GitHub.Release.Download_count | Number | The download count for the release. |
| GitHub.Release.Name | String | The name of the release. |
| GitHub.Release.Body | String | The body of the release. |
| GitHub.Release.Created_at | Date | The date the release was created. |
| GitHub.Release.Published_at | Date | The date the release was published. |
Command Example
#### Human Readable Output
## Releases
|ID|Name|Download_count|Body|Created_at|Published_at|
|--- |--- |--- |--- |--- |--- |
|17519182|anotherone|5|this is another release|2019-05-22T15:00:51Z|2019-05-22T15:06:48Z|
|17519007|test|1|this is a test|2019-05-22T15:00:51Z|2019-05-22T15:02:16Z|
### GitHub-get-stale-prs
**Deprecated.** Use _**github-get-stale-prs**_ instead.
***
Gets inactive pull requests.
#### Base Command
`GitHub-get-stale-prs`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| stale_time | Time of inactivity after which a PR is considered stale. Default is 3 days. | Required |
| label | The label used to identify PRs of interest. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.URL | String | The html URL of the PR |
| GitHub.PR.Number | Number | The GitHub pull request number |
| GitHub.PR.RequestedReviewer | Unknown | A list of the PR's requested reviewers |
#### Command Example
``!GitHub-get-stale-prs stale_time="2 days"``
#### Human Readable Output
## Stale PRs
|Number|URL|
|--- |--- |
|18|https://github.com/example-user1/content/pull/18|
|16|https://github.com/example-user1/content/pull/16|
|15|https://github.com/example-user1/content/pull/15|
|14|https://github.com/example-user1/content/pull/14|
### GitHub-get-branch
**Deprecated.** Use _**github-get-branch**_ instead.
***
Get a branch
#### Base Command
`GitHub-get-branch`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| branch_name | The name of the branch to retrieve. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.Branch.Name | String | The name of the branch. |
| GitHub.Branch.CommitSHA | String | The SHA of the commit the branch references. |
| GitHub.Branch.CommitNodeID | String | The Node ID of the commit the branch references. |
| GitHub.Branch.CommitAuthorID | Number | The GitHub ID number of the author of the commit the branch references. |
| GitHub.Branch.CommitAuthorLogin | String | The GitHub login of the author of the commit the branch references. |
| GitHub.Branch.CommitParentSHA | String | The SHAs of parent commits. |
| GitHub.Branch.Protected | Boolean | Whether the branch is protected. |
#### Command Example
```!GitHub-get-pull-request pull_number=1```
#### Human Readable Output
## Branch "master"
|CommitAuthorID|CommitAuthorLogin|CommitNodeID|CommitParentSHA|CommitSHA|Name|Protected|
|--- |--- |--- |--- |--- |--- |--- |
|55035720|example-user1|MDY6Q29tbWl0MjA3NzQ0Njg1OjhhNjdhMDc4MTM5NDk4ZjNlOGUxYmQyZTI2ZmZjNWEyZmVhMWI5MTg=|d6bafef5a0021a6d9ab0a22e11bd0afd5801d936|8a67a078139498f3e8e1bd2e26ffc5a2fea1b918|master|false|
### GitHub-create-branch
**Deprecated.** Use _**github-create-branch**_ instead.
***
Create a new branch
#### Base Command
`GitHub-create-branch`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| branch_name | The name for the new branch. | Required |
| commit_sha | The SHA hash of the commit to reference. Try executing the 'GitHub-get-branch' command to find a commit SHA hash to reference. | Required |
#### Context Output
There is no context output for this command.
#### Command Example
```GitHub-create-branch branch_name=new-branch-example commit_sha=8a67a078139498f3e8e1bd2e26ffc5a2fea1b918```
#### Human Readable Output
Branch "new-branch-example" Created Successfully.
### GitHub-get-team-membership
**Deprecated.** Use _**github-get-team-membership**_ instead.
***
Retrieves a user membership status with a team.
#### Base Command
`GitHub-get-team-membership`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| team_id | The ID number by which the team is identified. Try executing the 'GitHub-list-teams' command to find team IDs to reference. | Required |
| user_name | The login of the user whose membership you wish to check. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.Team.Member.Role | String | The user's role on a team .|
| GitHub.Team.Member.State | String | The user's state for a team. |
| GitHub.Team.ID | Number | The ID number of the team. |
| GitHub.Team.Member.Login | String | The login of the team member. |
#### Command Example
```!GitHub-get-team-membership team_id=3043448 user_name=example-user2```
#### Human Readable Output
## Team Membership of example-user2
|ID|Role|State|Login|
|--- |--- |--- |--- |
|3043448|member|active|example-user2|
### GitHub-request-review
**Deprecated.** Use _**github-request-review**_ instead.
***
Requests reviews from GitHub users for a given pull request.
#### Base Command
`GitHub-request-review`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| pull_number | The number of the pull request you want to request review for. | Required |
| reviewers | A CSV list of GitHub users to request review from for a pull request. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.Number | Number | The number of the pull request. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site admin. |
#### Command Example
```!GitHub-request-review pull_number=1 reviewers=example-user1```
#### Human Readable Output
## Requested Reviewers for #1
|ID|Login|NodeID|SiteAdmin|Type|
|--- |--- |--- |--- |--- |
|30797606|example-user3|MDQ6VXNlcjMwNzk3NjA2|false|User|
|55035720|example-user1|MDQ6VXNlcjU1MDM1NzIw|false|User|
### GitHub-create-comment
**Deprecated.** Use _**github-create-comment**_ instead.
***
Creates a comment for a given issue.
#### Base Command
`GitHub-create-comment`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| issue_number | The number of the issue to comment on. | Required |
| body | The contents of the comment. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.Comment.IssueNumber | Number | The number of the issue to which the comment belongs. |
| GitHub.Comment.ID | Number | The ID of the comment. |
| GitHub.Comment.NodeID | String | The node ID of the comment. |
| GitHub.Comment.Body | String | The body content of the comment. |
| GitHub.Comment.User.Login | String | The login of the user who commented. |
| GitHub.Comment.User.ID | Number | The ID of the user who commented. |
| GitHub.Comment.User.NodeID | String | The node ID of the user who commented. |
| GitHub.Comment.User.Type | String | The type of the user who commented. |
| GitHub.Comment.User.SiteAdmin | Boolean | Whether the user who commented is a site admin. |
#### Command Example
```!GitHub-create-comment issue_number=1 body="Look this comment was made using the GitHub integration"```
#### Human Readable Output
## Created Comment
|Body|ID|IssueNumber|NodeID|User|
|--- |--- |--- |--- |--- |
|This comment was made using the GitHub integration|532700206|1|MDEyOklzc3VlQ29tbWVudDUzMjcwMDIwNg==|Login: example-user1 ID: 55035720 NodeID: MDQ6VXNlcjU1MDM1NzIw Type: User SiteAdmin: false|
### GitHub-list-issue-comments
**Deprecated.** Use _**github-list-issue-comments**_ instead.
***
Lists comments on an issue.
#### Base Command
`GitHub-list-issue-comments`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| issue_number | The number of the issue to list comments for. | Required |
| since | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.Comment.IssueNumber | Number | The number of the issue to which the comment belongs. |
| GitHub.Comment.ID | Number | The ID of the comment. |
| GitHub.Comment.NodeID | String | The node ID of the comment. |
| GitHub.Comment.Body | String | The body content of the comment. |
| GitHub.Comment.User.Login | String | The login of the user who commented. |
| GitHub.Comment.User.ID | Number | The ID of the user who commented. |
| GitHub.Comment.User.NodeID | String | The node ID of the user who commented. |
| GitHub.Comment.User.Type | String | The type of the user who commented. |
| GitHub.Comment.User.SiteAdmin | Boolean | Whether the user who commented is a site admin. |
#### Command Example
```!GitHub-list-issue-comments issue_number=1```
#### Human Readable Output
## Comments for Issue #1
|Body|ID|IssueNumber|NodeID|User|
|--- |--- |--- |--- |--- |
|Thank you for your contribution. Your generosity and caring are unrivaled! Rest assured - our content wizard @example-user3 will very shortly look over your proposed changes.|530276333|1|MDEyOklzc3VlQ29tbWVudDUzMDI3NjMzMw==|Login: example-user1 ID: 55035720 NodeID: MDQ6VXNlcjU1MDM1NzIw Type: User SiteAdmin: false|
|what about my pr eh|530313678|1|MDEyOklzc3VlQ29tbWVudDUzMDMxMzY3OA==|Login: example-user4 ID: 46294017 NodeID: MDQ6VXNlcjQ2Mjk0MDE3 Type: User SiteAdmin: false|
|@example-user4 can we close?|530774162|1|MDEyOklzc3VlQ29tbWVudDUzMDc3NDE2Mg==|Login: example-user3 ID: 30797606 NodeID: MDQ6VXNlcjMwNzk3NjA2 Type: User SiteAdmin: false|
|Look this comment was made using the GitHub integration|532700206|1|MDEyOklzc3VlQ29tbWVudDUzMjcwMDIwNg==|Login: example-user1 ID: 55035720 NodeID: MDQ6VXNlcjU1MDM1NzIw Type: User SiteAdmin: false|
### GitHub-list-pr-files
**Deprecated.** Use _**github-list-pr-files**_ instead.
***
Lists the pull request files.
#### Base Command
`GitHub-list-pr-files`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| pull_number | The number of the pull request. | Required |
| organization | The name of the organization. | Optional |
| repository | The repository of the pull request. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.Number | Number | The number of the pull request. |
| GitHub.PR.File.SHA | String | The SHA hash of the last commit involving the file. |
| GitHub.PR.File.Name | String | The name of the file. |
| GitHub.PR.File.Status | String | The status of the file. |
| GitHub.PR.File.Additions | Number | The number of additions to the file. |
| GitHub.PR.File.Deletions | Number | The number of deletions in the file. |
| GitHub.PR.File.Changes | Number | The number of changes made in the file. |
#### Command Example
```!GitHub-list-pr-files pull_number=1```
#### Human Readable Output
## Pull Request Files for #1
|Additions|Changes|Deletions|Name|SHA|Status|
|--- |--- |--- |--- |--- |--- |
|4|4|0|TEST.md|4e7fd23b44ef46ebd04a9812dda55cecb487fcbe|added|
### GitHub-list-pr-reviews
**Deprecated.** Use _**github-list-pr-reviews**_ instead.
***
Lists reviews on a pull request.
#### Base Command
`GitHub-list-pr-reviews`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| pull_number | The number of the pull request. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.Number | Number | The number of the pull request. |
| GitHub.PR.Review.ID | Number | The ID of the review. |
| GitHub.PR.Review.NodeID | String | The node ID of the review. |
| GitHub.PR.Review.Body | String | The content of the review. |
| GitHub.PR.Review.CommitID | String | The ID of the commit the review is for. |
| GitHub.PR.Review.State | String | The state of the review. |
| GitHub.PR.Review.User.Login | String | The reviewer's user login. |
| GitHub.PR.Review.User.ID | Number | The reviewer's user ID. |
| GitHub.PR.Review.User.NodeID | String | The reviewer's user node ID. |
| GitHub.PR.Review.User.Type | String | The reviewer user type. |
| GitHub.PR.Review.User.SiteAdmin | Boolean | Whether the reviewer is a site admin. |
#### Command Example
```!GitHub-list-pr-reviews pull_number=1```
#### Human Readable Output
## Pull Request Reviews for #1
|Body|CommitID|ID|NodeID|State|User|
|--- |--- |--- |--- |--- |--- |
|review comment|b6cf0431e2aea2b345ea1d66d18aa72be63936a9|287327154|MDE3OlB1bGxSZXF1ZXN0UmV2aWV3Mjg3MzI3MTU0|COMMENTED|Login: example-user2 ID: 31018228 NodeID: MDQ6VXNlcjMxMDE4MjI4 Type: User SiteAdmin: false|
### GitHub-get-commit
**Deprecated.** Use _**github-get-commit**_ instead.
***
Gets a commit.
#### Base Command
`GitHub-get-commit`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| commit_sha | The SHA hash of the commit. Try executing the 'GitHub-get-branch' command to find a commit SHA hash to reference. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.Commit.SHA | String | The SHA hash of the commit. |
| GitHub.Commit.Author.Date | String | The commit author date. |
| GitHub.Commit.Author.Name | String | The name of the author. |
| GitHub.Commit.Author.Email | String | The email of the author. |
| GitHub.Commit.Committer.Date | String | The date the committer committed. |
| GitHub.Commit.Committer.Name | String | The name of the committer. |
| GitHub.Commit.Committer.Email | String | The email of the committer.|
| GitHub.Commit.Message | String | The message associated with the commit. |
| GitHub.Commit.Parent | Unknown | List of parent SHA hashes. |
| GitHub.Commit.TreeSHA | String | The SHA hash of the commit's tree. |
| GitHub.Commit.Verification.Verified | Boolean | Whether the commit was verified. |
| GitHub.Commit.Verification.Reason | String | The reason why the commit was or was not verified. |
| GitHub.Commit.Verification.Signature | Unknown | The commit verification signature. |
| GitHub.Commit.Verification.Payload | Unknown | The commit verification payload. |
#### Command Example
```!GitHub-get-commit commit_sha=8a67a078139498f3e8e1bd2e26ffc5a2fea1b918```
#### Human Readable Output
## Commit _8a67a07813_
|Author|Committer|Message|Parent|SHA|TreeSHA|Verification|
|--- |--- |--- |--- |--- |--- |--- |
|Date: 2019-09-16T15:42:43Z Name: example-user1 Email: 55035720example.user1@users.noreply.github.com|Date: 2019-09-16T15:42:43Z Name: GitHub Email: noreply@github.com|Update config.yml|{'SHA': 'd6bafef5a0021a6d9ab0a22e11bd0afd5801d936'}|8a67a078139498f3e8e1bd2e26ffc5a2fea1b918|42fdb6c89538099a141e94fabe4bbc58098f4d90|Verified: true Reason: valid Signature: -----BEGIN PGP SIGNATURE----- wsBcBAABCAAQBQJ****************************sIKrPT2jUSWyzfu5wnu oWz7+2KMdaglV****************************M08HXTm a9eO/ahlodARkgH/bWjulomeO+jDEgbZenlPUrBnX136QzPPqgl4uvxfquAOj1/a a89YtPAFh2X1+1q7pl5dVtZfYpo6mYJoY9dwVpDRbLoVHJRa1wnqEv4kxRHrrRL9 mGWSMHqK8I6j9zXi4niod8pQpl0k4O/2SlNh81RyeILEYb587Zs1XGuIYQEDrcAf u+FURxEHSuT4yaZ+oBwhhcIsmsWQMGkfABbwo1Fi2BMtEgZpzd/TScNg1KeSrVI= =dWrz -----END PGP SIGNATURE----- Payload: tree 42fdb6c89538099a141e94fabe4bbc58098f4d90 parent d6bafef5a0021a6d9ab0a22e11bd0afd5801d936 author example-user1 <55035720example.user1@users.noreply.github.com> 1568648563 +0300 committer GitHub <noreply@github.com> 1568648563 +0300 Update config.yml|
### GitHub-add-label
**Deprecated.** Use _**github-add-label**_ instead.
***
Adds labels to an issue.
#### Base Command
`GitHub-add-label`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| issue_number | The number of the issue to add labels to. | Required |
| labels | A CSV list of labels to add to an issue. | Required |
#### Context Output
There is no context output for this command.
#### Command Example
```!GitHub-add-label issue_number=1 labels=Content```
#### Human Readable Output
Label "Content" Successfully Added to Issue #1
### GitHub-get-pull-request
**Deprecated.** Use _**github-get-pull-request**_ instead.
***
Gets a pull request.
#### Base Command
`GitHub-get-pull-request`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| pull_number | The number of the pull request to retrieve. | Required |
| organization | The name of the organization. | Optional |
| repository | The repository of the pull request. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.Title | String | The title of the pull request. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The type of the user who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site admin. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site admin. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request's merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site admin. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site admin. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch that HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch that HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit that HEAD points to. |
| GitHub.PR.Head.User.Login | String | The login of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.ID | Number | The ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The node ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The type of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | Topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads. |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been archived. |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled. |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out branch. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out branch. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The login of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The node ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.Type | String | The user type of the committer of the commit that the base branch points to |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit that the base branch points to is a site admin. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The node ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository that the base branch belongs to is a site admin. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository that the base branch belongs to is private. |
| GitHub.PR.Base.Repo.Description | String | The description of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository that the base branch belongs to is a fork. |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times that the repository that the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times that the repository that the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | Topics listed for the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository that the base branch belongs to has issues. |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository that the base branch belongs to has projects. |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository that the base branch belongs to has a wiki. |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository that the base branch belongs to has pages. |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository that the base branch belongs to has downloads. |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository that the base branch belongs to is archived. |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository that the base branch belongs to is disabled. |
| GitHub.PR.Base.Repo.PushedAt | String | The date that the repository that the base branch belongs to was last pushed to. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date that the repository that the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository that the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository that the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository that the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities that subscribe to the repository that the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The type of the user who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site admin. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
#### Command Example
```!GitHub-get-pull-request pull_number=1```
#### Human Readable Output
## Pull Request #1
|Additions|AuthorAssociation|Base|Body|ChangedFiles|Comments|Commits|CreatedAt|Deletions|Head|ID|Label|Locked|MaintainerCanModify|MergeCommitSHA|Mergeable|MergeableState|Merged|NodeID|Number|Rebaseable|RequestedReviewer|ReviewComments|State|UpdatedAt|User|
|--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |
|4|FIRST_TIME_CONTRIBUTOR|Label: example-user1:master Ref: master SHA: b27ea6ac9836d2e756b44eb1d66f02d3d4299362 User: {"Login": "example-user1", "ID": 55035720, "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "Type": "User", "SiteAdmin": false} Repo: {"ID": 207744685, "NodeID": "MDEwOlJlcG9zaXRvcnkyMDc3NDQ2ODU=", "Name": "content", "FullName": "example-user1/content", "Owner": {"Login": "example-user1", "ID": 55035720, "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "Type": "User", "SiteAdmin": false}, "Private": false, "Description": "This repository contains all Demisto content and from here we share content updates", "Fork": true, "Language": "Python", "ForksCount": 0, "StargazersCount": 0, "WatchersCount": 0, "Size": 96530, "DefaultBranch": "master", "OpenIssuesCount": 10, "Topics": null, "HasIssues": false, "HasProjects": true, "HasWiki": false, "HasPages": false, "HasDownloads": true, "Archived": false, "Disabled": false, "PushedAt": "2019-09-18T14:05:43Z", "CreatedAt": "2019-09-11T06:59:20Z", "UpdatedAt": "2019-09-16T15:42:46Z", "AllowRebaseMerge": null, "AllowSquashMerge": null, "AllowMergeCommit": null, "SucscribersCount": null}|## Status Ready/In Progress/In Hold(Reason for hold) ## Related Issues fixes: link to the issue ## Description A few sentences describing the overall goals of the pull request's commits. ## Screenshots Paste here any images that will help the reviewer ## Related PRs List related PRs against other branches: branch \ PR ------ \ ## Required version of Demistox.x.x ## Does it break backward compatibility?- Yes- Further details:- No ## Must have- [ ] Tests- [ ] Documentation (with link to it)- [ ] Code Review ## DependenciesMention the dependencies of the entity you changed as given from the precommit hooks in checkboxes, and tick after tested them.- [ ] Dependency 1- [ ] Dependency 2- [ ] Dependency 3 ## Additional changesDescribe additional changes done, for example adding a function to common server.|1|5|4|2019-09-11T07:06:26Z|0|Label: example-user4:patch-1 Ref: patch-1 SHA: c01238eea80e35bb76a5c51ac0c95eba4010d8e5 User: {"Login": "example-user4", "ID": 46294017, "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "Type": "User", "SiteAdmin": false} Repo: {"ID": 205137013, "NodeID": "MDEwOlJlcG9zaXRvcnkyMDUxMzcwMTM=", "Name": "content", "FullName": "example-user4/content", "Owner": {"Login": "example-user4", "ID": 46294017, "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "Type": "User", "SiteAdmin": false}, "Private": false, "Description": "This repository contains all Demisto content and from here we share content updates", "Fork": true, "Language": "Python", "ForksCount": 2, "StargazersCount": 0, "WatchersCount": 0, "Size": 95883, "DefaultBranch": "master", "OpenIssuesCount": 2, "Topics": null, "HasIssues": false, "HasProjects": true, "HasWiki": false, "HasPages": false, "HasDownloads": true, "Archived": false, "Disabled": false, "PushedAt": "2019-09-16T15:43:54Z", "CreatedAt": "2019-08-29T10:18:15Z", "UpdatedAt": "2019-08-29T10:18:18Z", "AllowRebaseMerge": null, "AllowSquashMerge": null, "AllowMergeCommit": null, "SucscribersCount": null}|316303415|'ID': 1563600288, 'NodeID': 'MDU6TGFiZWwxNTYzNjAwMjg4', 'Name': 'Content', 'Description': None, 'Color': None, 'Default': False},{'ID': 1549466359, 'NodeID': 'MDU6TGFiZWwxNTQ5NDY2MzU5', 'Name': 'Contribution', 'Description': None, 'Color': None, 'Default': False},{'ID': 1549411616, 'NodeID': 'MDU6TGFiZWwxNTQ5NDExNjE2', 'Name': 'bug', 'Description': None, 'Color': None, 'Default': True}|false|true|5714b1359b9d7549c89c35fe9fdc266a3db3b766|true|unstable|false|MDExOlB1bGxSZXF1ZXN0MzE2MzAzNDE1|1|true|{'Login': 'example-user3', 'ID': 30797606, 'NodeID': 'MDQ6VXNlcjMwNzk3NjA2', 'Type': 'User', 'SiteAdmin': False}, {'Login': 'example-user1', 'ID': 55035720, 'NodeID': 'MDQ6VXNlcjU1MDM1NzIw', 'Type': 'User', 'SiteAdmin': False}|0|open|2019-09-18T14:05:51Z|Login: example-user4 ID: 46294017 NodeID: MDQ6VXNlcjQ2Mjk0MDE3 Type: User SiteAdmin: false|
### GitHub-list-teams
**Deprecated.** Use _**github-list-teams**_ instead.
***
Lists the teams for an organization. Note that this API call is only available to authenticated members of the organization.
#### Base Command
`GitHub-list-teams`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| organization | The name of the organization. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.Team.ID | Number | The ID of the team. |
| GitHub.Team.NodeID | String | The node ID of the team. |
| GitHub.Team.Name | String | The name of the team. |
| GitHub.Team.Slug | String | The slug of the team. |
| GitHub.Team.Description | String | The description of the team. |
| GitHub.Team.Privacy | String | The privacy setting of the team. |
| GitHub.Team.Permission | String | The permissions of the team. |
| GitHub.Team.Parent | Unknown | The parent of the team. |
#### Command Example
```!GitHub-list-teams organization=demisto```
#### Human Readable Output
## Teams for Organization "demisto"
|Description|ID|Name|NodeID|Permission|Privacy|Slug|
|--- |--- |--- |--- |--- |--- |--- |
|Our customer success team|2276690|customer-success|MDQ6VGVhbTIyNzY2NzA=|pull|closed|customer-success|
|Our beloved content team|3043998|Content|MDQ6VGVhbTMwNDM0NDg=|pull|closed|content|
### GitHub-delete-branch
**Deprecated.** Use _**github-delete-branch**_ instead.
***
Deletes a branch.
#### Base Command
`GitHub-delete-branch`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| branch_name | The name of the branch to delete. | Required |
#### Context Output
There is no context output for this command.
#### Command Example
```!GitHub-delete-branch branch_name=new-branch-example```
#### Human Readable Output
Branch "new-branch-example" Deleted Successfully
### GitHub-list-pr-review-comments
**Deprecated.** Use _**github-list-pr-review-comments**_ instead.
***
Lists all the review comments for a pull request.
#### Base Command
`GitHub-list-pr-review-comments`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| pull_number | The issue number of the pull request. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.ReviewComment.ID | Number | The ID number of the pull request review comment. |
| GitHub.PR.ReviewComment.NodeID | String | The Node ID of the pull request review comment. |
| GitHub.PR.ReviewComment.PullRequestReviewID | Number | The ID of the pull request review. |
| GitHub.PR.ReviewComment.DiffHunk | String | The diff hunk the review comment applies to. |
| GitHub.PR.ReviewComment.Path | String | The file path of the proposed file changes the review comment applies to. |
| GitHub.PR.ReviewComment.Position | Number | The position of the change the review comment applies to. |
| GitHub.PR.ReviewComment.OriginalPosition | Number | The original position of the change the review comment applies to. |
| GitHub.PR.ReviewComment.CommitID | String | The commit ID of the proposed change. |
| GitHub.PR.ReviewComment.OriginalCommitID | String | The commit ID of the commit before the proposed change. |
| GitHub.PR.ReviewComment.InReplyToID | Number | The reply ID of the comment the review comment applies to. |
| GitHub.PR.ReviewComment.User.Login | String | The login of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.ID | Number | The ID of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.NodeID | String | The Node ID of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.Type | String | The type of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.SiteAdmin | Boolean | Whether the user who created the review comment is a site administrator. |
| GitHub.PR.ReviewComment.Body | String | The body content of the review comment. |
| GitHub.PR.ReviewComment.CreatedAt | String | The time the review comment was created. |
| GitHub.PR.ReviewComment.UpdatedAt | String | The time the review comment was updated. |
| GitHub.PR.ReviewComment.AuthorAssociation | String | The association of the user who created the review comment. |
#### Command Example
```!GitHub-list-pr-review-comments pull_number=1```
#### Human Readable Output
## Pull Request Review Comments for #1
|AuthorAssociation|Body|CommitID|CreatedAt|DiffHunk|ID|NodeID|OriginalCommitID|OriginalPosition|Path|Position|PullRequestReviewID|UpdatedAt|User|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|COLLABORATOR|Change it|1af17e73721dbe0c40011b82ed4bb1a7dbe3ce29|2021-04-08T11:00:21Z|@@ -9,7 +9,7 @@ "url": "some url" } ], - "another key": [ + "fixed key": [|609573611|df35047fffd38a65b8fe6963579254e8b09db25e1234567890==|df35047fffd38a65b8fe6963579254e8b09db25e|5|file.json|5|631256917|2021-04-08T11:00:28Z|Login: teizenman ID: 50326704 NodeID: MDQ6VXNlcjUwMzI2NzA0 Type: User SiteAdmin: false|
### GitHub-update-pull-request
**Deprecated.** Use _**github-update-pull-request**_ instead.
***
Updates a pull request in a repository.
#### Base Command
`GitHub-update-pull-request`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| title | The new title of the pull request. | Optional |
| body | The new body content of the pull request. | Optional |
| state | The new state of the pull request. Possible values are: open, closed. | Optional |
| base | The name of the branch to pull your changes from. It must be an existing branch in the current repository. You cannot update the base branch in a pull request to point to another repository. | Optional |
| maintainer_can_modify | Indicates whether maintainers can modify the pull request. | Optional |
| pull_number | The issue number of the pull request to modify. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The Node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.Title | String | The title of the pull request. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The Node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The type of the user who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site administrator. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The Node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The Node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The Node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site administrator. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request's merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The Node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site administrator. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The Node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site administrator. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The Node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch the HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch the HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit the HEAD points to. |
| GitHub.PR.Head.User.Login | String | The committer login of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.ID | Number | The committer ID of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The Node committer ID of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The committer type of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The Node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | Topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads. |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been archived. |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled. |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out branch. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out branch. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The committer login of the commit the base branch points to. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The committer Node ID of the commit the base branch points to. |
| GitHub.PR.Base.User.Type | String | The user committer type of the commit the base branch points to. |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit the base branch points to is a site administrator. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The Node ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository the base branch belongs to is a site administrator. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository the base branch belongs to is private. |
| GitHub.PR.Base.Repo.Description | String | The description of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository the base branch to belongs to is a fork. |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times the repository the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times the repository the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | Topics listed for the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository the base branch belongs to has issues. |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository the base branch belongs to has projects. |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository the base branch belongs to has a wiki. |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository the base branch belongs to has pages. |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository the base branch belongs to has downloads. |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository the base branch belongs to is archived. |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository the base branch belongs to is disabled. |
| GitHub.PR.Base.Repo.PushedAt | String | The date the repository the base branch belongs to was last pushed. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date the repository the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities to subscribe to the repository that the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The Node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The type of the user who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site administrator. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
#### Command Example
```!GitHub-update-pull-request pull_number=1 body=Changing```
#### Human Readable Output
## Updated Pull Request #15
|Additions|AuthorAssociation|Base|Body|ChangedFiles|Comments|Commits|CreatedAt|Deletions|Draft|Head|ID|Locked|MaintainerCanModify|MergeCommitSHA|Mergeable|MergeableState|Merged|NodeID|Number|Rebaseable|ReviewComments|State|UpdatedAt|User|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|1|COLLABORATOR|Label: demisto:master Ref: master SHA: 56b289d4b1402b1492dd0cc681325b1f0ae47505 User: {"Login": "demisto", "ID": 11011767, "NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3", "Type": "Organization", "SiteAdmin": false} Repo: {"ID": 315109290, "NodeID": "MDEwOlJlcG9zaXRvcnkzMTUxMDkyOTA=", "Name": "content-internal-dist", "FullName": "demisto/content-internal-dist", "Owner": {"Login": "demisto", "ID": 11011767, "NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3", "Type": "Organization", "SiteAdmin": false}, "Private": true, "Description": null, "Fork": false, "Language": "Python", "ForksCount": 0, "StargazersCount": 0, "WatchersCount": 0, "Size": 226, "DefaultBranch": "master", "OpenIssuesCount": 1, "Topics": null, "HasIssues": true, "HasProjects": true, "HasWiki": true, "HasPages": false, "HasDownloads": true, "Archived": false, "Disabled": false, "PushedAt": "2021-04-08T10:59:28Z", "CreatedAt": "2020-11-22T18:51:37Z", "UpdatedAt": "2021-04-07T08:58:02Z", "AllowRebaseMerge": null, "AllowSquashMerge": null, "AllowMergeCommit": null, "SucscribersCount": null}|Changing|1|0|1|2021-04-08T10:59:27Z|1|false|Label: demisto:teizenman-gh-test Ref: teizenman-gh-test SHA: 87429cec185dfd82be0f2e6d98b0f5d2d0bb91b0 User: {"Login": "demisto", "ID": 11011767, "NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3", "Type": "Organization", "SiteAdmin": false} Repo: {"ID": 315109290, "NodeID": "MDEwOlJlcG9zaXRvcnkzMTUxMDkyOTA=", "Name": "content-internal-dist", "FullName": "demisto/content-internal-dist", "Owner": {"Login": "demisto", "ID": 11011767, "NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3", "Type": "Organization", "SiteAdmin": false}, "Private": true, "Description": null, "Fork": false, "Language": "Python", "ForksCount": 0, "StargazersCount": 0, "WatchersCount": 0, "Size": 226, "DefaultBranch": "master", "OpenIssuesCount": 1, "Topics": null, "HasIssues": true, "HasProjects": true, "HasWiki": true, "HasPages": false, "HasDownloads": true, "Archived": false, "Disabled": false, "PushedAt": "2021-04-08T10:59:28Z", "CreatedAt": "2020-11-22T18:51:37Z", "UpdatedAt": "2021-04-07T08:58:02Z", "AllowRebaseMerge": null, "AllowSquashMerge": null, "AllowMergeCommit": null, "SucscribersCount": null}|611450655|false|false|1af17e73721dbe0c40011b82ed4bb1a7dbe3ce29|true|blocked|false|1af17e73721dbe0c40011b82ed4bb1a7|15|true|1|open|2021-04-08T11:08:14Z|Login: teizenman ID: 50326704 NodeID: MDQ6VXNlcjUwMzI2NzA0 Type: User SiteAdmin: false|
### GitHub-is-pr-merged
**Deprecated.** Use _**github-is-pr-merged**_ instead.
***
Returns a merged pull request. If the pull request has been merged, the API returns 'Status: 204 No Content'. If the pull request
has not been merged, the API returns 'Status: 404 Not Found'
#### Base Command
`GitHub-is-pr-merged`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| pull_number | The issue number of the pull request to check. | Required |
#### Context Output
There is no context output for this command.
#### Command Example
```!GitHub-is-pr-merged pull_number=1```
#### Human Readable Output
Pull Request #1 was Merged
### GitHub-create-pull-request
**Deprecated.** Use _**github-create-pull-request**_ instead.
***
Creates a new pull request.
#### Base Command
`GitHub-create-pull-request`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| title | The title of the pull request. | Required |
| head | The name of the branch where the changes are made. | Required |
| base | The name of the branch you want the changes pulled into, which must be an existing branch on the current repository. | Required |
| body | The contents of the pull request. | Optional |
| maintainer_can_modify | Indicates whether maintainers can modify the pull request. | Optional |
| draft | Indicates whether the pull request is a draft. For more information, see https://help.github.com/en/articles/about-pull-requests#draft-pull-requests. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The Node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.Title | String | The title of the pull request. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The Node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The user type who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site administrator. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The Node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The Node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The Node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site administrator. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request's merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The Node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site administrator. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The Node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site administrator. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The Node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch the HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch the HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit the HEAD points to. |
| GitHub.PR.Head.User.Login | String | The committer login of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.ID | Number | The committer ID of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The Node ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The committer type of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The Node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user Node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | Topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads. |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been archived. |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled. |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The committer login of the commit the base branch points to. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The committer Node ID of the commit the base branch points to. |
| GitHub.PR.Base.User.Type | String | The user type of the committer the commit base branch points to. |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit the base branch points to is a site administrator. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The Node ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository the base branch belongs to is a site administrator. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository the base branch belongs to is private. |
| GitHub.PR.Base.Repo.Description | String | The description of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository the base branch belongs to is a fork. |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times the repository the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times the repository the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | Topics listed for the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository the base branch belongs to has issues. |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository the base branch belongs to has projects. |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository the base branch belongs to has a wiki. |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository the base branch belongs to has pages. |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository the base branch belongs to has downloads. |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository the base branch belongs to is archived. |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository the base branch belongs to is disabled. |
| GitHub.PR.Base.Repo.PushedAt | String | The date the repository the base branch belongs to was last pushed. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date the repository the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities that subscribe to the repository the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The Node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The user type who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site administrator. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
#### Command Example
```!GitHub-create-pull-request base=master head=branch-test title=Testing```
#### Human Readable Output
## Created Pull Request #16
|Additions|AuthorAssociation|Base|ChangedFiles|Comments|Commits|CreatedAt|Deletions|Draft|Head|ID|Locked|MaintainerCanModify|MergeableState|Merged|NodeID|Number|ReviewComments|State|UpdatedAt|User|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|1|COLLABORATOR|Label: demisto:master Ref: master SHA: 1af17e73721dbe0c40011b82ed4bb1a7dbe3ce29 User: {"Login": "demisto", "ID": XXXXX, "NodeID": "1af17e73721dbe0c40011b82ed4bb1a7", "Type": "Organization", "SiteAdmin": false} Repo: {"ID": 12345, "NodeID": "1af17e73721dbe0c40011b82ed4bb1a=", "Name": "repo", "FullName": "owner/repo", "Owner": {"Login": "login", "ID": 1234, "NodeID": "1af17e73721dbe0c40011b82ed4bb1a7", "Type": "Organization", "SiteAdmin": false}, "Private": true, "Description": null, "Fork": false, "Language": "Python", "ForksCount": 0, "StargazersCount": 0, "WatchersCount": 0, "Size": 229, "DefaultBranch": "master", "OpenIssuesCount": 1, "Topics": null, "HasIssues": true, "HasProjects": true, "HasWiki": true, "HasPages": false, "HasDownloads": true, "Archived": false, "Disabled": false, "PushedAt": "2021-04-08T10:59:28Z", "CreatedAt": "2020-11-22T18:51:37Z", "UpdatedAt": "2021-04-07T08:58:02Z", "AllowRebaseMerge": null, "AllowSquashMerge": null, "AllowMergeCommit": null, "SucscribersCount": null}|1|0|1|2021-04-08T13:13:31Z|1|true|Label: demisto:branch-test Ref: branch-test SHA: 1af17e73721dbe0c40011b82ed4bb1a7dbe3ce29 User: {"Login": "login", "ID": 12345, "NodeID": "1af17e73721dbe0c40011b82ed4bb1a7", "Type": "Organization", "SiteAdmin": false} Repo: {"ID": 12345, "NodeID": "1af17e73721dbe0c40011b82ed4bb1a=", "Name": "repo", "FullName": "owner/repo", "Owner": {"Login": "login", "ID": 12345, "NodeID": "1af17e73721dbe0c40011b82ed4bb1a7", "Type": "Organization", "SiteAdmin": false}, "Private": true, "Description": null, "Fork": false, "Language": "Python", "ForksCount": 0, "StargazersCount": 0, "WatchersCount": 0, "Size": 229, "DefaultBranch": "master", "OpenIssuesCount": 1, "Topics": null, "HasIssues": true, "HasProjects": true, "HasWiki": true, "HasPages": false, "HasDownloads": true, "Archived": false, "Disabled": false, "PushedAt": "2021-04-08T10:59:28Z", "CreatedAt": "2020-11-22T18:51:37Z", "UpdatedAt": "2021-04-07T08:58:02Z", "AllowRebaseMerge": null, "AllowSquashMerge": null, "AllowMergeCommit": null, "SucscribersCount": null}|611546693|false|false|draft|false|1af17e73721dbe0c40011b82ed4bb1a7|16|0|open|2021-04-08T13:13:31Z|Login: teizenman ID: 1234 NodeID: 1af17e73721dbe0c4001 Type: User SiteAdmin: false|
### Github-get-github-actions-usage
**Deprecated.** Use _**github-get-github-actions-usage**_ instead.
***
Gets the usage details of GitHub action workflows of private repositories by repository owner.
#### Base Command
`Github-get-github-actions-usage`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| owner | The repository owner. | Required |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.ActionsUsage.RepositoryName | String | The name of the private repository. |
| GitHub.ActionsUsage.WorkflowID | Number | The workflow ID of the GitHub action. |
| GitHub.ActionsUsage.WorkflowName | String | The display name of the GitHub action workflow. |
| GitHub.ActionsUsage.WorkflowUsage | Unknown | The GitHub action workflow usage on different OS. |
#### Command Example
```!Github-get-github-actions-usage owner=user```
#### Human Readable Output
## Github Actions Usage
|Repositoryname|Workflowid|Workflowname|Workflowusage|
|---|---|---|---|
|Git-Repo|12345|An Action|UBUNTU: {"total_ms": 12345}|
### Github-get-check-run
**Deprecated.** Use _**github-get-check-run**_ instead.
***
Gets a check run details
#### Base Command
`Github-get-check-run`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| owner | Organization or Owner. | Required |
| repository | Git Repository Name. | Required |
| run_id | Check Run ID. | Optional |
| commit_id | Head Commit ID. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.CheckRuns.CheckRunConclusion | String | Check Run Conculsion |
| GitHub.CheckRuns.CheckRunAppName | String | Check Run App Name |
| GitHub.CheckRuns.CheckExternalID | String | Check Run External ID |
| GitHub.CheckRuns.CheckRunName | String | Check Run Name |
| GitHub.CheckRuns.CheckRunStatus | String | Check Run Status |
| GitHub.CheckRuns.CheckRunID | String | Check Run ID |
### GitHub-get-file-content
**Deprecated.** Use _**github-get-file-content**_ instead.
***
Gets the content of a file from GitHub.
#### Base Command
`GitHub-get-file-content`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| file_path | The path of the file. | Required |
| branch_name | The branch name to get the file from. | Optional |
| media_type | The media type in which the file contents will be fetched. Possible values are: "raw" and "html". Default value is "raw". | Optional |
| create_file_from_content | Whether to create a file entry in the War Room with the file contents. Default value is "false". | Optional |
| organization | The name of the organization. | Optional |
| repository | The name of the repository. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.FileContent.Path | String | The path of the file. |
| GitHub.FileContent.Content | Number | The content of the file. |
| GitHub.FileContent.MediaType | String | The media type in which the file was fetched. |
| GitHub.FileContent.Branch | Unknown | The branch from which the file was fetched. |
#### Command Example
```!GitHub-get-file-content file_path=file.json branch_name=branch-test```
#### Human Readable Output
## File file.json successfully fetched
|Branch|Content|MediaType|Path|
|---|---|---|---|
|branch-test|This is the content of the file|raw|file.json|
### Github-list-files
**Deprecated.** Use _**github-list-files**_ instead.
***
Gets a list of files from the given path in the repository.
#### Base Command
`Github-list-files`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| path | The path in the branch to get the files from. | Optional |
| organization | The name of the organization. | Optional |
| repository | The name of the repository. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.File.Name | String | The name of the file. |
| GitHub.File.Type | String | Whether the item is file or directory. |
| GitHub.File.Size | Number | The size of the file in bytes. |
| GitHub.File.Path | String | The file path inside the repository. |
| GitHub.File.DownloadUrl | String | The link to download the file content. |
| GitHub.File.SHA | String | The SHA of the file. |
#### Command Example
```!Github-list-files path=Index```
#### Human Readable Output
## Files in path: Index
|Name|Path|Type|Size|DownloadUrl|
|--- |--- |--- |--- |--- |
|README.md|Index/README.md|file|1500|https://raw.githubusercontent.com/demisto/hello-world/master/index/README.md|
|images|Index/images|dir|0||
### GitHub-list-team-members
**Deprecated.** Use _**github-list-team-members**_ instead.
***
List team members.
#### Base Command
`GitHub-list-team-members`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| organization | The name of the organization. | Required |
| team_slug | The name of the team under the organization. | Required |
| maximum_users | The maximum number of users to return. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.TeamMember.ID | String | The ID of the team member. |
| GitHub.TeamMember.Login | String | The login name of the team member. |
| GitHub.TeamMember.Team | String | The user's team. |
#### Command Example
```!GitHub-list-team-members organization=demisto team_slug=content maximum_users=20```
##### Context Example
{
“GitHub.GitHub”: [
{
“ID”: 1234567,
“Login”: “user1”,
“Team”: “content”,
}
]
}
#### Human Readable Output
## Team Member of team content in organization XSOAR
|ID|Login|Team|
|--- |---|---|
|1234567|user1|content|
### GitHub-list-branch-pull-requests
**Deprecated.** Use _**github-list-branch-pull-requests**_ instead.
***
Get pull requests corresponding to the given branch name.
#### Base Command
`GitHub-list-branch-pull-requests`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| branch_name | The branch name from which to retrieve pull requests. | Required |
| organization | The name of the organization. | Optional |
| repository | The repository for the pull request. Defaults to the repository parameter if not provided. | Optional |
#### Context Output
| **Path** | **Type** | **Description** |
| --- | --- | --- |
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The type of the user who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site admin. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site admin. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request's merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site admin. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site admin. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch the HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch the HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit the HEAD points to. |
| GitHub.PR.Head.User.Login | String | The login of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.ID | Number | The ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The node ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The type of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | The topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads. |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been archived. |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled. |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out branch. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out branch. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The login of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The node ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.Type | String | The user type of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit that the base branch points to is a site admin. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The node ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository that the base branch belongs to is a site admin. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository that the base branch belongs to is private. |
| GitHub.PR.Base.Repo.Description | String | The description of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository that the base branch belongs to is a fork. |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times the repository that the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times the repository that the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | Topics listed for the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository that the base branch belongs to has issues. |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository that the base branch belongs to has projects. |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository that the base branch belongs to has a wiki. |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository that the base branch belongs to has pages. |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository that the base branch belongs to has downloads. |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository that the base branch belongs to is archived. |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository that the base branch belongs to is disabled. |
| GitHub.PR.Base.Repo.PushedAt | String | The date the repository the base branch belongs to was last pushed to. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date the repository the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities that subscribe to the repository the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The type of the user who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site admin. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
#### Command Example
```!GitHub-list-branch-pull-requests branch_name=Update-Docker-Image```
#### Context Example
```json
{
"GitHub": {
"PR": {
"ActiveLockReason": null,
"Additions": null,
"AuthorAssociation": "MEMBER",
"Base": {
"Label": "demisto:master",
"Ref": "master",
"Repo": {
"AllowMergeCommit": null,
"AllowRebaseMerge": null,
"AllowSquashMerge": null,
"Archived": false,
"CreatedAt": "2016-06-06T12:17:02Z",
"DefaultBranch": "master",
"Description": "Demisto is now Cortex XSOAR. Automate and orchestrate your Security Operations with Cortex XSOAR's ever-growing Content Repository. Pull Requests are always welcome and highly appreciated! ",
"Disabled": false,
"Fork": false,
"ForksCount": 678,
"FullName": "demisto/content",
"HasDownloads": true,
"HasIssues": false,
"HasPages": false,
"HasProjects": true,
"HasWiki": false,
"ID": 60525392,
"Language": "Python",
"Name": "content",
"NodeID": "MDEwOlJlcG9zaXRvcnk2MDUyNTM5Mg==",
"OpenIssuesCount": 181,
"Owner": {
"ID": 11011767,
"Login": "demisto",
"NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3",
"SiteAdmin": false,
"Type": "Organization"
},
"Private": false,
"PushedAt": "2021-05-06T11:49:07Z",
"Size": 371861,
"StargazersCount": 635,
"SucscribersCount": null,
"Topics": null,
"UpdatedAt": "2021-05-06T11:41:27Z",
"WatchersCount": 635
},
"SHA": "9adf770fb981ec8bc9d6e87669be75da23176693",
"User": {
"ID": 11011767,
"Login": "demisto",
"NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3",
"SiteAdmin": false,
"Type": "Organization"
}
},
"Body": "Updated Docker Images For Integrations",
"ChangedFiles": null,
"ClosedAt": null,
"Comments": null,
"Commits": null,
"CreatedAt": "2021-05-03T14:29:25Z",
"Deletions": null,
"Draft": false,
"Head": {
"Label": "demisto:Update-Docker-Image",
"Ref": "Update-Docker-Image",
"Repo": {
"AllowMergeCommit": null,
"AllowRebaseMerge": null,
"AllowSquashMerge": null,
"Archived": false,
"CreatedAt": "2016-06-06T12:17:02Z",
"DefaultBranch": "master",
"Description": "Demisto is now Cortex XSOAR. Automate and orchestrate your Security Operations with Cortex XSOAR's ever-growing Content Repository. Pull Requests are always welcome and highly appreciated! ",
"Disabled": false,
"Fork": false,
"ForksCount": 678,
"FullName": "demisto/content",
"HasDownloads": true,
"HasIssues": false,
"HasPages": false,
"HasProjects": true,
"HasWiki": false,
"ID": 60525392,
"Language": "Python",
"Name": "content",
"NodeID": "MDEwOlJlcG9zaXRvcnk2MDUyNTM5Mg==",
"OpenIssuesCount": 181,
"Owner": {
"ID": 11011767,
"Login": "demisto",
"NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3",
"SiteAdmin": false,
"Type": "Organization"
},
"Private": false,
"PushedAt": "2021-05-06T11:49:07Z",
"Size": 371861,
"StargazersCount": 635,
"SucscribersCount": null,
"Topics": null,
"UpdatedAt": "2021-05-06T11:41:27Z",
"WatchersCount": 635
},
"SHA": "baee6e30aaa0f52e676987c1968ffd3ce11d7e57",
"User": {
"ID": 11011767,
"Login": "demisto",
"NodeID": "MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3",
"SiteAdmin": false,
"Type": "Organization"
}
},
"ID": 629143674,
"Label": [
{
"Color": null,
"Default": false,
"Description": "",
"ID": 1523790036,
"Name": "docs-approved",
"NodeID": "MDU6TGFiZWwxNTIzNzkwMDM2"
}
],
"Locked": false,
"MaintainerCanModify": null,
"MergeCommitSHA": "5854633d909c5672ba6ccf118c4dae68eb4e38c0",
"Mergeable": null,
"MergeableState": null,
"Merged": null,
"MergedAt": null,
"NodeID": "MDExOlB1bGxSZXF1ZXN0NjI5MTQzNjc0",
"Number": 12510,
"Rebaseable": null,
"ReviewComments": null,
"State": "open",
"UpdatedAt": "2021-05-03T14:48:58Z",
"User": {
"ID": 55035720,
"Login": "content-bot",
"NodeID": "MDQ6VXNlcjU1MDM1NzIw",
"SiteAdmin": false,
"Type": "User"
}
}
}
}
Human Readable Output
Pull Request For Branch #Update-Docker-Image
AuthorAssociation Base Body CreatedAt Draft Head ID Label Locked MergeCommitSHA NodeID Number State UpdatedAt User MEMBER Label: demisto:master
Ref: master
SHA: 9adf770fb981ec8bc9d6e87669be75da23176693
User: {“Login”: “demisto”, “ID”: 11011767, “NodeID”: “MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3”, “Type”: “Organization”, “SiteAdmin”: false}
Repo: {“ID”: 60525392, “NodeID”: “MDEwOlJlcG9zaXRvcnk2MDUyNTM5Mg==”, “Name”: “content”, “FullName”: “demisto/content”, “Owner”: {“Login”: “demisto”, “ID”: 11011767, “NodeID”: “MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3”, “Type”: “Organization”, “SiteAdmin”: false}, “Private”: false, “Description”: “Demisto is now Cortex XSOAR. Automate and orchestrate your Security Operations with Cortex XSOAR’s ever-growing Content Repository. Pull Requests are always welcome and highly appreciated! “, “Fork”: false, “Language”: “Python”, “ForksCount”: 678, “StargazersCount”: 635, “WatchersCount”: 635, “Size”: 371861, “DefaultBranch”: “master”, “OpenIssuesCount”: 181, “Topics”: null, “HasIssues”: false, “HasProjects”: true, “HasWiki”: false, “HasPages”: false, “HasDownloads”: true, “Archived”: false, “Disabled”: false, “PushedAt”: “2021-05-06T11:49:07Z”, “CreatedAt”: “2016-06-06T12:17:02Z”, “UpdatedAt”: “2021-05-06T11:41:27Z”, “AllowRebaseMerge”: null, “AllowSquashMerge”: null, “AllowMergeCommit”: null, “SucscribersCount”: null}Updated Docker Images For Integrations 2021-05-03T14:29:25Z false Label: demisto:Update-Docker-Image
Ref: Update-Docker-Image
SHA: baee6e30aaa0f52e676987c1968ffd3ce11d7e57
User: {“Login”: “demisto”, “ID”: 11011767, “NodeID”: “MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3”, “Type”: “Organization”, “SiteAdmin”: false}
Repo: {“ID”: 60525392, “NodeID”: “MDEwOlJlcG9zaXRvcnk2MDUyNTM5Mg==”, “Name”: “content”, “FullName”: “demisto/content”, “Owner”: {“Login”: “demisto”, “ID”: 11011767, “NodeID”: “MDEyOk9yZ2FuaXphdGlvbjExMDExNzY3”, “Type”: “Organization”, “SiteAdmin”: false}, “Private”: false, “Description”: “Demisto is now Cortex XSOAR. Automate and orchestrate your Security Operations with Cortex XSOAR’s ever-growing Content Repository. Pull Requests are always welcome and highly appreciated! “, “Fork”: false, “Language”: “Python”, “ForksCount”: 678, “StargazersCount”: 635, “WatchersCount”: 635, “Size”: 371861, “DefaultBranch”: “master”, “OpenIssuesCount”: 181, “Topics”: null, “HasIssues”: false, “HasProjects”: true, “HasWiki”: false, “HasPages”: false, “HasDownloads”: true, “Archived”: false, “Disabled”: false, “PushedAt”: “2021-05-06T11:49:07Z”, “CreatedAt”: “2016-06-06T12:17:02Z”, “UpdatedAt”: “2021-05-06T11:41:27Z”, “AllowRebaseMerge”: null, “AllowSquashMerge”: null, “AllowMergeCommit”: null, “SucscribersCount”: null}629143674 {‘ID’: 1523790036, ‘NodeID’: ‘MDU6TGFiZWwxNTIzNzkwMDM2’, ‘Name’: ‘docs-approved’, ‘Description’: ‘’, ‘Color’: None, ‘Default’: False} false 5854633d909c5672ba6ccf118c4dae68eb4e38c0 MDExOlB1bGxSZXF1ZXN0NjI5MTQzNjc0 12510 open 2021-05-03T14:48:58Z Login: content-bot
ID: 55035720
NodeID: MDQ6VXNlcjU1MDM1NzIw
Type: User
SiteAdmin: false
Github-commit-file
Deprecated. Use github-commit-file instead.
Commits a given file.
Base Command
Github-commit-file
Input
| Argument Name | Description | Required |
|---|---|---|
| commit_message | Commit message. | Required |
| path_to_file | The path to the file in the GitHub repo (including file name and file ending). | Required |
| entry_id | The entry ID for the file to commit. Either “entry_id” or “file_text” must be provided. | Optional |
| file_text | The plain text for the file to commit. Either “entry_id” or “file_text” must be provided. | Optional |
| branch_name | The branch name. | Required |
| file_sha | The blob SHA of the file being replaced. Use the GitHub-list-files command to get the SHA value of the file. Required if you are updating a file. | Optional |
Context Output
There is no context output for this command.
Command Example
!Github-commit-file commit_message="test commit" path_to_file="TEST.md" branch_name=branch-for-pr file_sha=hjashd878ad file_text=Test
Human Readable Output
The file TEST.md committed successfully. Link to the commit: https://github.com/content-bot/hello-world/commit/7678213ghg72136
GitHub-create-release
Deprecated. Use github-create-release instead.
Creates a release.
Base Command
GitHub-create-release
Input
| Argument Name | Description | Required |
|---|---|---|
| name | The name of the release. | Optional |
| tag_name | The name of the release tag. | Required |
| body | Text describing the contents of the tag. | Optional |
| ref | The target branch/commit SHA from where to create the release. | Optional |
| draft | Set to true to create a draft (unpublished) release, set to false to create a published one. Default is True. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Release.draft | Boolean | Whether the release is a draft. |
| GitHub.Release.html_url | String | The release URL. |
| GitHub.Release.id | Number | The ID of the release. |
| GitHub.Release.url | String | GitHub API URL link to the release. |
Command Example
!GitHub-create-release tag_name=1.0.0 body=`First release` draft=True name=1.0.0
Context Example
{
"GitHub.Release": [
{
"draft": true,
"html_url": "https://github.com/demisto/sdk/releases/tag/1.0.0",
"id": 4785254,
"url": "https://api.github.com/repos/demisto/sdk/releases/1.0.0"
}
]
}
Human Readable Output
Release 1.0.0 created successfully for repo sdk: https://github.com/demisto/sdk/releases/tag/1.0.0
Github-list-issue-events
Deprecated. Use github-list-issue-events instead.
Returns events corresponding to the given issue.
Base Command
Github-list-issue-events
Input
| Argument Name | Description | Required |
|---|---|---|
| issue_number | The issue number to retrieve events for. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.IssueEvent.id | Number | Event ID. |
| GitHub.IssueEvent.node_id | String | Event node ID. |
| GitHub.IssueEvent.url | String | Event URL. |
| GitHub.IssueEvent.actor.login | String | Event actor login username. |
| GitHub.IssueEvent.actor.id | Number | Event actor ID. |
| GitHub.IssueEvent.actor.node_id | String | Event actor node ID. |
| GitHub.IssueEvent.actor.avatar_url | String | Event actor avatar URL. |
| GitHub.IssueEvent.actor.gravatar_id | String | Event actor gravatar ID. |
| GitHub.IssueEvent.actor.url | String | Event actor URL. |
| GitHub.IssueEvent.actor.html_url | String | Event actor HTML URL. |
| GitHub.IssueEvent.actor.followers_url | String | Event actor followers URL. |
| GitHub.IssueEvent.actor.following_url | String | Event actor following URL. |
| GitHub.IssueEvent.actor.gists_url | String | Event actor gists URL. |
| GitHub.IssueEvent.actor.starred_url | String | Event actor starred URL. |
| GitHub.IssueEvent.actor.subscriptions_url | String | Event actor subscriptions URL. |
| GitHub.IssueEvent.actor.organizations_url | String | Event actor organizations URL. |
| GitHub.IssueEvent.actor.repos_url | String | Event actor repos URL. |
| GitHub.IssueEvent.actor.events_url | String | Event actor events URL. |
| GitHub.IssueEvent.actor.received_events_url | String | Event actor received events URL. |
| GitHub.IssueEvent.actor.type | String | Event actor type. |
| GitHub.IssueEvent.actor.site_admin | Boolean | Indicates whether the event actor is the site admin. |
| GitHub.IssueEvent.event | String | Issue event type, for example labeled, closed. |
| GitHub.IssueEvent.commit_id | Unknown | Event commit ID. |
| GitHub.IssueEvent.commit_url | Unknown | Event commit URL. |
| GitHub.IssueEvent.created_at | Date | Event created time. |
| GitHub.IssueEvent.label.name | String | Event label name. |
| GitHub.IssueEvent.label.color | String | Event label color. |
| GitHub.IssueEvent.performed_via_github_app | Unknown | Indicates whether event was performed via a GitHub application. |
| GitHub.IssueEvent.assignee.login | String | Assignee login username. |
| GitHub.IssueEvent.assignee.id | Number | Assignee ID. |
| GitHub.IssueEvent.assignee.node_id | String | Assignee node ID. |
| GitHub.IssueEvent.assignee.avatar_url | String | Assignee avatar URL. |
| GitHub.IssueEvent.assignee.gravatar_id | String | Assignee gravatar ID. |
| GitHub.IssueEvent.assignee.url | String | Assignee URL. |
| GitHub.IssueEvent.assignee.html_url | String | Assignee HTML URL. |
| GitHub.IssueEvent.assignee.followers_url | String | Assignee followers URL. |
| GitHub.IssueEvent.assignee.following_url | String | Assignee following URL. |
| GitHub.IssueEvent.assignee.gists_url | String | Assignee gists URL. |
| GitHub.IssueEvent.assignee.starred_url | String | Assignee starred URL. |
| GitHub.IssueEvent.assignee.subscriptions_url | String | Assignee subscriptions URL. |
| GitHub.IssueEvent.assignee.organizations_url | String | Assignee organizations URL. |
| GitHub.IssueEvent.assignee.repos_url | String | Assignee repos URL. |
| GitHub.IssueEvent.assignee.events_url | String | Assignee events URL. |
| GitHub.IssueEvent.assignee.received_events_url | String | Assignee received events URL. |
| GitHub.IssueEvent.assignee.type | String | Assignee type. |
| GitHub.IssueEvent.assignee.site_admin | Boolean | Indicates whether the assignee is a site admin. |
| GitHub.IssueEvent.assigner.login | String | Assigner login username. |
| GitHub.IssueEvent.assigner.id | Number | Assigner ID. |
| GitHub.IssueEvent.assigner.node_id | String | Assigner node ID. |
| GitHub.IssueEvent.assigner.avatar_url | String | Assigner avatar URL. |
| GitHub.IssueEvent.assigner.gravatar_id | String | Assigner gravatar ID. |
| GitHub.IssueEvent.assigner.url | String | Assigner URL. |
| GitHub.IssueEvent.assigner.html_url | String | Assigner HTML URL. |
| GitHub.IssueEvent.assigner.followers_url | String | Assigner followers URL. |
| GitHub.IssueEvent.assigner.following_url | String | Assigner following URL. |
| GitHub.IssueEvent.assigner.gists_url | String | Assigner gists URL. |
| GitHub.IssueEvent.assigner.starred_url | String | Assigner starred URL. |
| GitHub.IssueEvent.assigner.subscriptions_url | String | Assigner subscriptions URL. |
| GitHub.IssueEvent.assigner.organizations_url | String | Assigner organizations URL. |
| GitHub.IssueEvent.assigner.repos_url | String | Assigner repos URL. |
| GitHub.IssueEvent.assigner.events_url | String | Assigner events URL. |
| GitHub.IssueEvent.assigner.received_events_url | String | Assigner received events URL. |
| GitHub.IssueEvent.assigner.type | String | Assigner type. |
| GitHub.IssueEvent.assigner.site_admin | Boolean | Indicates whether the assignee is a site admin. |
Command Example
!Github-list-issue-events issue_number=1079
Context Example
{
"GitHub": {
"IssueEvent": [
{
"actor": {
"avatar_url": "https://avatars.githubusercontent.com/u/70005542?v=4",
"events_url": "https://api.github.com/users/tomneeman151293/events{/privacy}",
"followers_url": "https://api.github.com/users/tomneeman151293/followers",
"following_url": "https://api.github.com/users/tomneeman151293/following{/other_user}",
"gists_url": "https://api.github.com/users/tomneeman151293/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tomneeman151293",
"id": 70005542,
"login": "tomneeman151293",
"node_id": "MDQ6VXNlcjcwMDA1NTQy",
"organizations_url": "https://api.github.com/users/tomneeman151293/orgs",
"received_events_url": "https://api.github.com/users/tomneeman151293/received_events",
"repos_url": "https://api.github.com/users/tomneeman151293/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tomneeman151293/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tomneeman151293/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tomneeman151293"
},
"commit_id": null,
"commit_url": null,
"created_at": "2021-01-28T13:00:26Z",
"event": "labeled",
"id": 4260960414,
"label": {
"color": "d73a4a",
"name": "bug"
},
"node_id": "MDEyOkxhYmVsZWRFdmVudDQyNjA5NjA0MTQ=",
"performed_via_github_app": null,
"url": "https://api.github.com/repos/demisto/demisto-sdk/issues/events/4260960414"
},
{
"actor": {
"avatar_url": "https://avatars.githubusercontent.com/u/70005542?v=4",
"events_url": "https://api.github.com/users/tomneeman151293/events{/privacy}",
"followers_url": "https://api.github.com/users/tomneeman151293/followers",
"following_url": "https://api.github.com/users/tomneeman151293/following{/other_user}",
"gists_url": "https://api.github.com/users/tomneeman151293/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tomneeman151293",
"id": 70005542,
"login": "tomneeman151293",
"node_id": "MDQ6VXNlcjcwMDA1NTQy",
"organizations_url": "https://api.github.com/users/tomneeman151293/orgs",
"received_events_url": "https://api.github.com/users/tomneeman151293/received_events",
"repos_url": "https://api.github.com/users/tomneeman151293/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tomneeman151293/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tomneeman151293/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tomneeman151293"
},
"commit_id": null,
"commit_url": null,
"created_at": "2021-01-28T15:20:27Z",
"event": "closed",
"id": 4261648354,
"node_id": "MDExOkNsb3NlZEV2ZW50NDI2MTY0ODM1NA==",
"performed_via_github_app": null,
"url": "https://api.github.com/repos/demisto/demisto-sdk/issues/events/4261648354"
}
]
}
}
Human Readable Output
GitHub Issue Events For Issue 1079
actor commit_id commit_url created_at event id label node_id performed_via_github_app url login: tomneeman151293
id: 70005542
node_id: MDQ6VXNlcjcwMDA1NTQy
avatar_url: https://avatars.githubusercontent.com/u/70005542?v=4
gravatar_id:
url: https://api.github.com/users/tomneeman151293
html_url: https://github.com/tomneeman151293
followers_url: https://api.github.com/users/tomneeman151293/followers
following_url: https://api.github.com/users/tomneeman151293/following{/other_user}
gists_url: https://api.github.com/users/tomneeman151293/gists{/gist_id}
starred_url: https://api.github.com/users/tomneeman151293/starred{/owner}{/repo}
subscriptions_url: https://api.github.com/users/tomneeman151293/subscriptions
organizations_url: https://api.github.com/users/tomneeman151293/orgs
repos_url: https://api.github.com/users/tomneeman151293/repos
events_url: https://api.github.com/users/tomneeman151293/events{/privacy}
received_events_url: https://api.github.com/users/tomneeman151293/received_events
type: User
site_admin: false2021-01-28T13:00:26Z labeled 4260960414 name: bug
color: d73a4aMDEyOkxhYmVsZWRFdmVudDQyNjA5NjA0MTQ= https://api.github.com/repos/demisto/demisto-sdk/issues/events/4260960414 login: tomneeman151293
id: 70005542
node_id: MDQ6VXNlcjcwMDA1NTQy
avatar_url: https://avatars.githubusercontent.com/u/70005542?v=4
gravatar_id:
url: https://api.github.com/users/tomneeman151293
html_url: https://github.com/tomneeman151293
followers_url: https://api.github.com/users/tomneeman151293/followers
following_url: https://api.github.com/users/tomneeman151293/following{/other_user}
gists_url: https://api.github.com/users/tomneeman151293/gists{/gist_id}
starred_url: https://api.github.com/users/tomneeman151293/starred{/owner}{/repo}
subscriptions_url: https://api.github.com/users/tomneeman151293/subscriptions
organizations_url: https://api.github.com/users/tomneeman151293/orgs
repos_url: https://api.github.com/users/tomneeman151293/repos
events_url: https://api.github.com/users/tomneeman151293/events{/privacy}
received_events_url: https://api.github.com/users/tomneeman151293/received_events
type: User
site_admin: false2021-01-28T15:20:27Z closed 4261648354 MDExOkNsb3NlZEV2ZW50NDI2MTY0ODM1NA== https://api.github.com/repos/demisto/demisto-sdk/issues/events/4261648354
GitHub-list-all-projects
Deprecated. Use github-list-all-projects instead.
Lists all project boards a user can see.
Base Command
GitHub-list-all-projects
Input
| Argument Name | Description | Required |
|---|---|---|
| project_filter | Only list projects with the specified numbers (IDs). | Optional |
| limit | The number of projects to return. Default is 20. Maximum is 100. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Project.Name | String | The name of the project board. |
| GitHub.Project.ID | Number | The ID of the project board. |
| GitHub.Project.Number | Number | The project board number. |
| GitHub.Project.Columns.Name | String | The column Name. |
| GitHub.Project.Columns.ColumnID | Number | The ID of the column. |
| GitHub.Project.Columns.Cards.CardID | Number | The ID of the card. |
| GitHub.Project.Columns.Cards.ContentNumber | Number | The content number of this card, usually this is the issue number. |
| GitHub.Project.Issues | List | List of all issue numbers that are in this project board. |
Command Example
!GitHub-list-all-projects project_filter="1,2"
Context Example
{
"GitHub": {
"Project": {
"XSOAR Data": {
"Number": 23,
"ID": 2,
"Columns": {
"In progress": {
"Cards": [
{
"CardID": 55555,
"ContentNumber": 33883
},
{
"CardID": 66666,
"ContentNumber": 34852
},
],
"Name": "In progress",
"ColumnID": 13241511
},
"Done": {
"Cards": [
{
"CardID": 61858005,
"ContentNumber": 37480
},
{
"CardID": 60428728,
"ContentNumber": 36608
},
],
"Name": "Done",
"ColumnID": 13437971
}
},
"Issues": [
33883,
34852,
37480,
36608
],
"Name": "XSOAR Data"
}
}
}
GitHub-move-issue-to-project-board
Deprecated. Use github-move-issue-to-project-board instead.
Moves an issue in the project board to a different column.
Base Command
GitHub-move-issue-to-project-board
Input
| Argument Name | Description | Required |
|---|---|---|
| column_id | The destination column ID. | Required |
| card_id | The card ID to move. | Required |
| position | The position of the card in the new column. | Optional |
Command Example
!GitHub-move-issue-to-project-board card_id=1111 column_id=1234 position="top"
GitHub-add-issue-to-project-board
Deprecated. Use github-add-issue-to-project-board instead.
Adds an Issue as a card in column of a spesific project.
Base Command
GitHub-add-issue-to-project-board
Input
| Argument Name | Description | Required |
|---|---|---|
| column_id | Column unique id . | Required |
| issue_unique_id | Issue unique ID. | Required |
| content_type | Content type of the project card. Default is Issue. | Optional |
Context Output
There is no context output for this command.
GitHub-get-path-data
Deprecated. Use github-get-path-data instead.
Gets the data of the a given path.
Base Command
GitHub-get-path-data
Input
| Argument Name | Description | Required |
|---|---|---|
| relative_path | Relative path to retrieve its data. | Required |
| branch_name | The branch name from which to get the file data. Default is master. | Optional |
| organization | The name of the organization containing the file. | Optional |
| repository | The repository of the file. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PathData.name | String | Path name. |
| GitHub.PathData.path | String | Relative path for the given repository. |
| GitHub.PathData.sha | String | Path SHA. |
| GitHub.PathData.size | Number | Path size in bytes. Will be 0 if path to a dir was given. |
| GitHub.PathData.url | String | Path URL. |
| GitHub.PathData.html_url | String | Path HTML URL. |
| GitHub.PathData.git_url | String | Path Git URL. |
| GitHub.PathData.download_url | String | Path download URL. If a directory path was given will be empty. |
| GitHub.PathData.type | String | Path data, for example file, dir. |
| GitHub.PathData.content | String | Content of the path if a file path was given. |
| GitHub.PathData.encoding | String | Encoding method if path to a file was given. |
| GitHub.PathData.entries.name | String | If a dir was given in file_path, name of the dir entry. |
| GitHub.PathData.entries.path | String | If a dir was given in file_path, path of the dir entry. |
| GitHub.PathData.entries.sha | String | If a dir was given in file_path, SHA of the dir entry. |
| GitHub.PathData.entries.size | Number | If a dir was given in file_path, size of the dir entry. Will be 0 if entry is also a dir. |
| GitHub.PathData.entries.url | String | If a dir was given in file_path, URL of the dir entry. |
| GitHub.PathData.entries.html_url | String | If a dir was given in file_path, HTML URL of the dir entry. |
| GitHub.PathData.entries.git_url | String | If a dir was given in file_path, Git URL of the dir entry. |
| GitHub.PathData.entries.download_url | String | If a dir was given in file_path, download URL of the dir entry. Will be empty if entry is also a dir. |
| GitHub.PathData.entries.type | String | If a dir was given in file_path, type of the dir entry. |
Command Example
!GitHub-get-path-data organization=demisto repository=content relative_path=Packs/BitcoinAbuse/Integrations/BitcoinAbuse
Context Example
{
"GitHub": {
"PathData": {
"download_url": null,
"entries": [
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/23b55cb33aadaa6753e3df1e1d90d3cdc951c745",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py",
"name": "BitcoinAbuse.py",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py",
"sha": "23b55cb33aadaa6753e3df1e1d90d3cdc951c745",
"size": 14395,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py?ref=master"
},
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/17bbcfd9270570727c2e0f48591fcb9a98a0711e",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml",
"name": "BitcoinAbuse.yml",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml",
"sha": "17bbcfd9270570727c2e0f48591fcb9a98a0711e",
"size": 3929,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml?ref=master"
},
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/7d969d68833e2424ba8411c93fb8110face60414",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md",
"name": "BitcoinAbuse_description.md",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md",
"sha": "7d969d68833e2424ba8411c93fb8110face60414",
"size": 1305,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md?ref=master"
},
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/52bef504f8dc4b58ddc6f200cdd135bcdfe9719a",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png",
"name": "BitcoinAbuse_image.png",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png",
"sha": "52bef504f8dc4b58ddc6f200cdd135bcdfe9719a",
"size": 3212,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png?ref=master"
},
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/dc2c4106cc3589461c7470a5c26e6e8927192d7f",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py",
"name": "BitcoinAbuse_test.py",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py",
"sha": "dc2c4106cc3589461c7470a5c26e6e8927192d7f",
"size": 7150,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py?ref=master"
},
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/3523d3b6b93bd611859c23e1f63a774d78a0363a",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile",
"name": "Pipfile",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile",
"sha": "3523d3b6b93bd611859c23e1f63a774d78a0363a",
"size": 257,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile?ref=master"
},
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/6bdb9313414e337e128df3715f17d372f5691608",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock",
"name": "Pipfile.lock",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock",
"sha": "6bdb9313414e337e128df3715f17d372f5691608",
"size": 15993,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock?ref=master"
},
{
"download_url": "https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md",
"git_url": "https://api.github.com/repos/demisto/content/git/blobs/fba823cddcc3637b2989598b7ae08731002f8feb",
"html_url": "https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md",
"name": "README.md",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md",
"sha": "fba823cddcc3637b2989598b7ae08731002f8feb",
"size": 7188,
"type": "file",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md?ref=master"
},
{
"download_url": null,
"git_url": "https://api.github.com/repos/demisto/content/git/trees/ed2025b734667dfde3b405f8a131b785e9d8fc9d",
"html_url": "https://github.com/demisto/content/tree/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/test_data",
"name": "test_data",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse/test_data",
"sha": "ed2025b734667dfde3b405f8a131b785e9d8fc9d",
"size": 0,
"type": "dir",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/test_data?ref=master"
}
],
"git_url": "https://api.github.com/repos/demisto/content/git/trees/1a0c49c84e7bcd02af5587082b6ed48634a20402",
"html_url": "https://github.com/demisto/content/tree/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse",
"name": "BitcoinAbuse",
"path": "Packs/BitcoinAbuse/Integrations/BitcoinAbuse",
"sha": "1a0c49c84e7bcd02af5587082b6ed48634a20402",
"size": 0,
"type": "dir",
"url": "https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse?ref=master"
}
}
}
Human Readable Output
File Data For File Packs/BitcoinAbuse/Integrations/BitcoinAbuse
entries git_url html_url name path sha size type url {‘name’: ‘BitcoinAbuse.py’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py’, ‘sha’: ‘23b55cb33aadaa6753e3df1e1d90d3cdc951c745’, ‘size’: 14395, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/23b55cb33aadaa6753e3df1e1d90d3cdc951c745’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py’, ‘type’: ‘file’},
{‘name’: ‘BitcoinAbuse.yml’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml’, ‘sha’: ‘17bbcfd9270570727c2e0f48591fcb9a98a0711e’, ‘size’: 3929, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/17bbcfd9270570727c2e0f48591fcb9a98a0711e’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.yml’, ‘type’: ‘file’},
{‘name’: ‘BitcoinAbuse_description.md’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md’, ‘sha’: ‘7d969d68833e2424ba8411c93fb8110face60414’, ‘size’: 1305, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/7d969d68833e2424ba8411c93fb8110face60414’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_description.md’, ‘type’: ‘file’},
{‘name’: ‘BitcoinAbuse_image.png’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png’, ‘sha’: ‘52bef504f8dc4b58ddc6f200cdd135bcdfe9719a’, ‘size’: 3212, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/52bef504f8dc4b58ddc6f200cdd135bcdfe9719a’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_image.png’, ‘type’: ‘file’},
{‘name’: ‘BitcoinAbuse_test.py’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py’, ‘sha’: ‘dc2c4106cc3589461c7470a5c26e6e8927192d7f’, ‘size’: 7150, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/dc2c4106cc3589461c7470a5c26e6e8927192d7f’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse_test.py’, ‘type’: ‘file’},
{‘name’: ‘Pipfile’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile’, ‘sha’: ‘3523d3b6b93bd611859c23e1f63a774d78a0363a’, ‘size’: 257, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/3523d3b6b93bd611859c23e1f63a774d78a0363a’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile’, ‘type’: ‘file’},
{‘name’: ‘Pipfile.lock’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock’, ‘sha’: ‘6bdb9313414e337e128df3715f17d372f5691608’, ‘size’: 15993, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/6bdb9313414e337e128df3715f17d372f5691608’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/Pipfile.lock’, ‘type’: ‘file’},
{‘name’: ‘README.md’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md’, ‘sha’: ‘fba823cddcc3637b2989598b7ae08731002f8feb’, ‘size’: 7188, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/blob/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/blobs/fba823cddcc3637b2989598b7ae08731002f8feb’, ‘download_url’: ‘https://raw.githubusercontent.com/demisto/content/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/README.md’, ‘type’: ‘file’},
{‘name’: ‘test_data’, ‘path’: ‘Packs/BitcoinAbuse/Integrations/BitcoinAbuse/test_data’, ‘sha’: ‘ed2025b734667dfde3b405f8a131b785e9d8fc9d’, ‘size’: 0, ‘url’: ‘https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/test_data?ref=master’, ‘html_url’: ‘https://github.com/demisto/content/tree/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse/test_data’, ‘git_url’: ‘https://api.github.com/repos/demisto/content/git/trees/ed2025b734667dfde3b405f8a131b785e9d8fc9d’, ‘download_url’: None, ‘type’: ‘dir’}https://api.github.com/repos/demisto/content/git/trees/1a0c49c84e7bcd02af5587082b6ed48634a20402 https://github.com/demisto/content/tree/master/Packs/BitcoinAbuse/Integrations/BitcoinAbuse BitcoinAbuse Packs/BitcoinAbuse/Integrations/BitcoinAbuse 1a0c49c84e7bcd02af5587082b6ed48634a20402 0 dir https://api.github.com/repos/demisto/content/contents/Packs/BitcoinAbuse/Integrations/BitcoinAbuse?ref=master
GitHub-releases-list
Deprecated. Use github-releases-list instead.
Gets release data from a given repository and organization.
Base Command
GitHub-releases-list
Input
| Argument Name | Description | Required |
|---|---|---|
| page | The page number to retrieve releases from. If limit argument is not given, defaults to 1. | Optional |
| page_size | The size of the page. If the limit argument is not specified, defaults to 50. | Optional |
| limit | The maximum number of releases to retrieve data for. Will get results of the first pages. Cannot be given with page_size or page arguments. | Optional |
| organization | The name of the organization containing the repository. Defaults to the organization instance parameter if not given. | Optional |
| repository | The repository containing the releases. Defaults to repository instance parameter if not given. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Release.url | String | The release URL. |
| GitHub.Release.assets_url | String | The release assets URL. |
| GitHub.Release.upload_url | String | The upload URL. |
| GitHub.Release.html_url | String | The HTML URL. |
| GitHub.Release.id | Number | The release ID. |
| GitHub.Release.author.login | String | The release author login username. |
| GitHub.Release.author.id | Number | The release author user ID. |
| GitHub.Release.author.node_id | String | The release author node ID. |
| GitHub.Release.author.avatar_url | String | The release author avatar URL. |
| GitHub.Release.author.gravatar_id | String | The release author gravatar ID. |
| GitHub.Release.author.url | String | The release author URL. |
| GitHub.Release.author.html_url | String | The release author HTML URL. |
| GitHub.Release.author.followers_url | String | The release author followers URL. |
| GitHub.Release.author.following_url | String | The release author following URL. |
| GitHub.Release.author.gists_url | String | The release author gists URL. |
| GitHub.Release.author.starred_url | String | The release author starred URL. |
| GitHub.Release.author.subscriptions_url | String | The release author subscriptions URL. |
| GitHub.Release.author.organizations_url | String | The release author organizations URL. |
| GitHub.Release.author.repos_url | String | The release author repos URL. |
| GitHub.Release.author.events_url | String | The release author events URL. |
| GitHub.Release.author.received_events_url | String | The release author received events URL. |
| GitHub.Release.author.type | String | The release author type, for example “User”. |
| GitHub.Release.author.site_admin | Boolean | Whether the release author is the site admin. |
| GitHub.Release.node_id | String | The release Node ID. |
| GitHub.Release.tag_name | String | The release tag name. |
| GitHub.Release.target_commitish | String | The release target commit. |
| GitHub.Release.name | String | The release name. |
| GitHub.Release.draft | Boolean | Whether the release is a draft. |
| GitHub.Release.prerelease | Boolean | Whether the release is a pre release. |
| GitHub.Release.created_at | Date | The date the release was created. |
| GitHub.Release.published_at | Date | The date the release was published. |
| GitHub.Release.tarball_url | String | The release tar URL download. |
| GitHub.Release.zipball_url | String | The release zip URL download. |
| GitHub.Release.body | String | The release body. |
Command Example
!GitHub-releases-list limit=1
Context Example
{
"GitHub": {
"Release": {
"assets": [],
"assets_url": "https://api.github.com/repos/content-bot/hello-world/releases/48262112/assets",
"author": {
"avatar_url": "https://avatars.githubusercontent.com/u/55035720?v=4",
"events_url": "https://api.github.com/users/content-bot/events{/privacy}",
"followers_url": "https://api.github.com/users/content-bot/followers",
"following_url": "https://api.github.com/users/content-bot/following{/other_user}",
"gists_url": "https://api.github.com/users/content-bot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/content-bot",
"id": 55035720,
"login": "content-bot",
"node_id": "MDQ6VXNlcjU1MDM1NzIw",
"organizations_url": "https://api.github.com/users/content-bot/orgs",
"received_events_url": "https://api.github.com/users/content-bot/received_events",
"repos_url": "https://api.github.com/users/content-bot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/content-bot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/content-bot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/content-bot"
},
"body": "test",
"created_at": "2021-08-23T07:54:37Z",
"draft": true,
"html_url": "https://github.com/content-bot/hello-world/releases/tag/untagged-e106615f0216817665d8",
"id": 48262112,
"name": "1.0.0",
"node_id": "MDc6UmVsZWFzZTQ4MjYyMTEy",
"prerelease": false,
"published_at": null,
"tag_name": "1.0.0",
"tarball_url": null,
"target_commitish": "master",
"upload_url": "https://uploads.github.com/repos/content-bot/hello-world/releases/48262112/assets{?name,label}",
"url": "https://api.github.com/repos/content-bot/hello-world/releases/48262112",
"zipball_url": null
}
}
}
Human Readable Output
Releases Data Of hello-world
assets_url author body created_at draft html_url id name node_id prerelease tag_name target_commitish upload_url url https://api.github.com/repos/content-bot/hello-world/releases/48262112/assets login: content-bot
id: 55035720
node_id: MDQ6VXNlcjU1MDM1NzIw
avatar_url: https://avatars.githubusercontent.com/u/55035720?v=4
gravatar_id:
url: https://api.github.com/users/content-bot
html_url: https://github.com/content-bot
followers_url: https://api.github.com/users/content-bot/followers
following_url: https://api.github.com/users/content-bot/following{/other_user}
gists_url: https://api.github.com/users/content-bot/gists{/gist_id}
starred_url: https://api.github.com/users/content-bot/starred{/owner}{/repo}
subscriptions_url: https://api.github.com/users/content-bot/subscriptions
organizations_url: https://api.github.com/users/content-bot/orgs
repos_url: https://api.github.com/users/content-bot/repos
events_url: https://api.github.com/users/content-bot/events{/privacy}
received_events_url: https://api.github.com/users/content-bot/received_events
type: User
site_admin: falsetest 2021-08-23T07:54:37Z true https://github.com/content-bot/hello-world/releases/tag/untagged-e106615f0216817665d8 48262112 1.0.0 MDc6UmVsZWFzZTQ4MjYyMTEy false 1.0.0 master https://uploads.github.com/repos/content-bot/hello-world/releases/48262112/assets{?name,label} https://api.github.com/repos/content-bot/hello-world/releases/48262112
GitHub-update-comment
Deprecated. Use github-update-comment instead.
Update an already existing comment.
Base Command
GitHub-update-comment
Input
| Argument Name | Description | Required |
|---|---|---|
| issue_number | The number of the issue to comment on. | Required |
| comment_id | the comment id to update. | Required |
| body | The contents of the comment. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Comment.IssueNumber | Number | The number of the issue to which the comment belongs. |
| GitHub.Comment.ID | Number | The ID of the comment. |
| GitHub.Comment.NodeID | String | The node ID of the comment. |
| GitHub.Comment.Body | String | The body content of the comment. |
| GitHub.Comment.User.Login | String | The login of the user who commented. |
| GitHub.Comment.User.ID | Number | The ID of the user who commented. |
| GitHub.Comment.User.NodeID | String | The node ID of the user who commented. |
| GitHub.Comment.User.Type | String | The type of the user who commented. |
| GitHub.Comment.User.SiteAdmin | Boolean | Whether the user who commented is a site admin. |
GitHub-delete-comment
Deprecated. Use github-delete-comment instead.
Deletes a comment.
Base Command
GitHub-delete-comment
Input
| Argument Name | Description | Required |
|---|---|---|
| comment_id | The id of comment to delete. | Required |
Context Output
There is no context output for this command.
GitHub-add-assignee
Deprecated. Use github-add-assignee instead.
Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
Base Command
GitHub-add-assignee
Input
| Argument Name | Description | Required |
|---|---|---|
| assignee | Users to assign, can be a list of users | Required |
| pull_request_number | The number of PR/Issue to assign users to | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Assignees.assignees | String | assignees to the issue |
| GitHub.Assignees.assignees.login | String | Gists URL for user |
| GitHub.Assignees.assignees.gists_url | String | assignees to the issue |
| GitHub.Assignees.assignees.following_url | String | Following URL for user |
| GitHub.Assignees.assignees.followers_url | String | Followers URL for user |
| GitHub.Assignees.assignees.subscriptions_url | String | Subscriptions URL for user |
| GitHub.Assignees.assignees.received_events_url | String | Received events URL for user |
| GitHub.Assignees.assignees.events_url | String | Events URL for user |
| GitHub.Assignees.assignees.avatar_url | String | Avatar URL for user |
| GitHub.Assignees.assignees.url | String | URL for user for user |
| GitHub.Assignees.assignees.starred_url | String | Starred URL for user |
| GitHub.Assignees.assignees.organizations_url | String | Organizations URL for user |
| GitHub.Assignees.assignees.repos_url | String | Repos URL for user |
| GitHub.Assignees.assignees.gravatar_id | String | Gravatar_id for user |
| GitHub.Assignees.assignees.site_admin | String | Is user site admin |
| GitHub.Assignees.assignees.node_id | String | Node ID for user |
| GitHub.Assignees.assignees.type | String | Type of user |
| GitHub.Assignees.assignees.id | String | User ID |
| GitHub.Assignees.assignees.html_url | String | HTML URL for user |
GitHub-trigger-workflow
Deprecated. Use github-trigger-workflow instead.
Triggers a GitHub workflow on a given repository and workflow.
Base Command
GitHub-trigger-workflow
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The GitHub owner (organization or username) of the repository. | Optional |
| repository | The GitHub repository name. | Optional |
| branch | The branch to trigger the workflow on. | Optional |
| workflow | The name of your workflow file. | Required |
| inputs | The inputs for the workflow. | Optional |
Context Output
There is no context output for this command.
GitHub-cancel-workflow
Deprecated. Use github-cancel-workflow instead.
Cancels a GitHub workflow.
Base Command
GitHub-cancel-workflow
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The GitHub owner (organization or username) of the repository. | Optional |
| repository | The GitHub repository name. | Optional |
| workflow_id | The ID of the workflow to cancel. | Required |
Context Output
There is no context output for this command.
GitHub-list-workflows
Deprecated. Use github-list-workflows instead.
Returns a list of GitHub workflows on a given repository.
Base Command
GitHub-list-workflows
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The GitHub owner (organization or username) of the repository. | Optional |
| repository | The GitHub repository name. | Optional |
| workflow | The name of your workflow file. | Required |
| limit | The number of workflows to return. Default is 100. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Workflow.id | Number | The GitHub workflow ID (per run). |
| GitHub.Workflow.name | String | The GitHub workflow name. |
| GitHub.Workflow.head_branch | String | The branch on which the workflow ran. |
| GitHub.Workflow.head_sha | String | The commit SHA on which the workflow ran. |
| GitHub.Workflow.path | String | The GitHub workflow name path. |
| GitHub.Workflow.display_title | String | The GitHub workflow title. |
| GitHub.Workflow.run_number | Number | The GitHub workflow run number. |
| GitHub.Workflow.event | String | The GitHub workflow trigger type (scheduled, dispatch). |
| GitHub.Workflow.status | String | The GitHub workflow status (in_progress, completed). |
| GitHub.Workflow.conclusion | String | The GitHub workflow conclusion (cancelled, success). |
| GitHub.Workflow.workflow_id | String | The GitHub workflow ID (per workflow). |
| GitHub.Workflow.url | String | The GitHub workflow API URL. |
| GitHub.Workflow.html_url | String | The GitHub workflow HTML URL. |
| GitHub.Workflow.created_at | Date | Datetime the GitHub workflow was created at. |
| GitHub.Workflow.updated_at | Date | Datetime the GitHub workflow was updated at. |
Command example
!GitHub-list-workflows workflow=nightly.yml limit=1
Context Example
{
"GitHub": {
"Workflow": {
"conclusion": null,
"created_at": "2023-07-04T08:36:31Z",
"display_title": "Private repo nightly build",
"event": "workflow_dispatch",
"head_branch": "master",
"head_sha": "123456abcdef",
"html_url": "https://github.com/demisto/content-private/actions/runs/123456",
"id": 123456,
"name": "Private repo nightly build",
"path": ".github/workflows/nightly.yml",
"run_number": 1178,
"status": "in_progress",
"updated_at": "2023-07-04T08:36:41Z",
"url": "https://api.github.com/repos/demisto/content-private/actions/runs/123456",
"workflow_id": 1212121
}
}
}
Human Readable Output
GitHub workflows
created_at display_title event head_branch head_sha html_url id name path run_number status updated_at url workflow_id 2023-07-04T08:36:31Z Private repo nightly build workflow_dispatch master 123456abcdef https://github.com/demisto/content-private/actions/runs/123456 123456 Private repo nightly build .github/workflows/nightly.yml 1178 in_progress 2023-07-04T08:36:41Z https://api.github.com/repos/demisto/content-private/actions/runs/123456 1212121 GitHub-delete-file
Deprecated. Use github-delete-file instead.
Delete a file on a Github branch.
Base Command
GitHub-delete-file
Input
| Argument Name | Description | Required |
|---|---|---|
| path_to_file | The full path to the file in the repository (e.g., path/to/file.txt). | Required |
| branch_name | The branch to delete the file from (e.g., main or master). | Required |
| commit_message | The commit message for the file deletion. Default is Deleted file via Cortex XSOAR. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.File.path | string | The path of the deleted file. |
| GitHub.File.sha | string | The SHA of the commit that deleted the file. |
| GitHub.File.deleted | boolean | True if the file was deleted. |
github-commit-file
Commits a given file.
Base Command
github-commit-file
Input
| Argument Name | Description | Required |
|---|---|---|
| commit_message | Commit message. | Required |
| path_to_file | The path to the file in the Github repo (including file name and file ending). | Required |
| entry_id | The entry ID for the file to commit. Either “entry_id” or “file_text” must be provided. | Optional |
| file_text | The plain text for the file to commit. Either “entry_id” or “file_text” must be provided. | Optional |
| branch_name | The branch name. | Required |
| file_sha | The blob SHA of the file being replaced. Use the GitHub-list-files command to get the SHA value of the file. Required if you are updating a file. | Optional |
Context Output
There is no context output for this command.
github-list-team-members
Lists team members.
Base Command
github-list-team-members
Input
| Argument Name | Description | Required |
|---|---|---|
| organization | The name of the organization. | Required |
| team_slug | Team name. | Required |
| maximum_users | Miximum number of users to return. Default is 30. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.TeamMember.ID | Number | The ID of the team member. |
| GitHub.TeamMember.Login | String | The login name of the team member. |
| GitHub.TeamMember.Team | String | The user’s team. |
github-search-issues
Searches for and returns issues that match a given query.
Base Command
github-search-issues
Input
| Argument Name | Description | Required |
|---|---|---|
| query | The query line for the search. For more information see the GitHub documentation at https://help.github.com/en/articles/searching-issues-and-pull-requests. | Required |
| limit | The number of issues to return. Default is 50. Maximum is 100. Default is 50. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the issue. |
| GitHub.Issue.Repository | String | The repository of the issue. |
| GitHub.Issue.Title | String | The title of the issue. |
| GitHub.Issue.Body | Unknown | The body of the issue. |
| GitHub.Issue.State | String | The state of the issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | Users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository organization. |
github-create-comment
Creates a comment for a given issue.
Base Command
github-create-comment
Input
| Argument Name | Description | Required |
|---|---|---|
| issue_number | The number of the issue to comment on. | Required |
| body | The contents of the comment. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Comment.IssueNumber | Number | The number of the issue to which the comment belongs. |
| GitHub.Comment.ID | Number | The ID of the comment. |
| GitHub.Comment.NodeID | String | The node ID of the comment. |
| GitHub.Comment.Body | String | The body content of the comment. |
| GitHub.Comment.User.Login | String | The login of the user who commented. |
| GitHub.Comment.User.ID | Number | The ID of the user who commented. |
| GitHub.Comment.User.NodeID | String | The node ID of the user who commented. |
| GitHub.Comment.User.Type | String | The type of the user who commented. |
| GitHub.Comment.User.SiteAdmin | Boolean | Whether the user who commented is a site admin. |
github-add-label
Adds labels to an issue.
Base Command
github-add-label
Input
| Argument Name | Description | Required |
|---|---|---|
| issue_number | The number of the issue to add labels to. | Required |
| labels | A CSV list of labels to add to an issue. | Required |
Context Output
There is no context output for this command.
github-delete-branch
Deletes a branch.
Base Command
github-delete-branch
Input
| Argument Name | Description | Required |
|---|---|---|
| branch_name | The name of the branch to delete. | Required |
Context Output
There is no context output for this command.
github-add-issue-to-project-board
Adds an Issue as a card in column of a spesific project.
Base Command
github-add-issue-to-project-board
Input
| Argument Name | Description | Required |
|---|---|---|
| column_id | Column unique id. | Required |
| issue_unique_id | Issue unique ID. | Required |
| content_type | Content type of the project card. Default is Issue. | Optional |
Context Output
There is no context output for this command.
github-releases-list
Gets releases data from a given repository and organization.
Base Command
github-releases-list
Input
| Argument Name | Description | Required |
|---|---|---|
| page | The page number to retrieve releases from. If limit argument is not given, defaults to 1. | Optional |
| page_size | The size of the page. If limit argument is not given, defaults to 50. | Optional |
| limit | The maximum number of releases data to retrieve. Will get results of the first pages. Cannot be given with page_size or page arguments. | Optional |
| organization | The name of the organization containing the repository. Defaults to organization instance parameter if not given. | Optional |
| repository | The repository containing the releases. Defaults to repository instance parameter if not given. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Release.url | String | The release URL. |
| GitHub.Release.assets_url | String | The release assets URL. |
| GitHub.Release.upload_url | String | Upload URL. |
| GitHub.Release.html_url | String | HTML URL. |
| GitHub.Release.id | Number | The release ID. |
| GitHub.Release.author.login | String | The release author login username. |
| GitHub.Release.author.id | Number | The release author user ID. |
| GitHub.Release.author.node_id | String | The release author node ID. |
| GitHub.Release.author.avatar_url | String | The release author avatar URL. |
| GitHub.Release.author.gravatar_id | String | The release author gravatar ID. |
| GitHub.Release.author.url | String | The release author URL. |
| GitHub.Release.author.html_url | String | The release author HTML URL. |
| GitHub.Release.author.followers_url | String | The release author followers URL. |
| GitHub.Release.author.following_url | String | The release author following URL. |
| GitHub.Release.author.gists_url | String | The release author gists URL. |
| GitHub.Release.author.starred_url | String | The release author starred URL. |
| GitHub.Release.author.subscriptions_url | String | The release author subscriptions URL. |
| GitHub.Release.author.organizations_url | String | The release author organizations URL. |
| GitHub.Release.author.repos_url | String | The release author repos URL. |
| GitHub.Release.author.events_url | String | The release author events URL. |
| GitHub.Release.author.received_events_url | String | The release author received events URL. |
| GitHub.Release.author.type | String | The release author type. (E.g, “User”). |
| GitHub.Release.author.site_admin | Boolean | Whether the release author is a site admin. |
| GitHub.Release.node_id | String | The release Node ID. |
| GitHub.Release.tag_name | String | The release tag name. |
| GitHub.Release.target_commitish | String | The release target commit. |
| GitHub.Release.name | String | The release name. |
| GitHub.Release.draft | Boolean | Whether release is draft. |
| GitHub.Release.prerelease | Boolean | Whether release is pre release. |
| GitHub.Release.created_at | Date | Date when release was created. |
| GitHub.Release.published_at | Date | Date when release was published. |
| GitHub.Release.tarball_url | String | The release tar URL download. |
| GitHub.Release.zipball_url | String | The release zip URL download. |
| GitHub.Release.body | String | The release body. |
github-is-pr-merged
Returns a merged pull request. If the pull request has been merged, the API returns ‘Status: 204 No Content’. If the pull request has not been merged the API returns ‘Status: 404 Not Found’.
Base Command
github-is-pr-merged
Input
| Argument Name | Description | Required |
|---|---|---|
| pull_number | The issue number of the pull request to check. | Required |
Context Output
There is no context output for this command.
github-list-all-issues
Lists all issues that the user has access to view.
Base Command
github-list-all-issues
Input
| Argument Name | Description | Required |
|---|---|---|
| state | The state of the issues to return. Can be ‘open’, ‘closed’ or ‘all’. Default is ‘open’. Possible values are: open, closed, all. Default is open. | Required |
| limit | The number of issues to return. Default is 50. Maximum is 100. Default is 50. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the issue. |
| GitHub.Issue.Repository | String | The repository of the issue. |
| GitHub.Issue.Title | String | The title of the issue. |
| GitHub.Issue.Body | Unknown | The body of the issue. |
| GitHub.Issue.State | String | The state of the issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | Users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository organization. |
github-create-branch
Create a new branch.
Base Command
github-create-branch
Input
| Argument Name | Description | Required |
|---|---|---|
| branch_name | The name for the new branch. | Required |
| commit_sha | The SHA hash of the commit to reference. Try executing the ‘GitHub-get-branch’ command to find a commit SHA hash to reference. | Required |
Context Output
There is no context output for this command.
github-list-pr-files
Lists the pull request files.
Base Command
github-list-pr-files
Input
| Argument Name | Description | Required |
|---|---|---|
| pull_number | The number of the pull request. | Required |
| organization | The name of the organization. | Optional |
| repository | The repository of the pull request. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.Number | Number | The number of the pull request. |
| GitHub.PR.File.SHA | String | The SHA hash of the last commit involving the file. |
| GitHub.PR.File.Name | String | The name of the file. |
| GitHub.PR.File.Status | String | The status of the file. |
| GitHub.PR.File.Additions | Number | The number of additions to the file. |
| GitHub.PR.File.Deletions | Number | The number of deletions in the file. |
| GitHub.PR.File.Changes | Number | The number of changes made in the file. |
github-search-code
Searches for code in repositories that match a given query.
Base Command
github-search-code
Input
| Argument Name | Description | Required |
|---|---|---|
| query | The query line for the search. For more information see the GitHub documentation at https://docs.github.com/en/github/searching-for-information-on-github/searching-code. | Required |
| page_number | The page number. | Optional |
| page_size | The size of the requested page. Maximum is 100. | Optional |
| limit | The number of results to return. Default is 50. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.CodeSearchResults.name | String | The file name where the code is found. |
| GitHub.CodeSearchResults.path | String | The full file path where the code is found. |
| GitHub.CodeSearchResults.html_url | String | The URL to the file. |
| GitHub.CodeSearchResults.repository.full_name | String | The repository name. |
| GitHub.CodeSearchResults.repository.html_url | String | The URL to the repository. |
| GitHub.CodeSearchResults.repository.description | String | The repository description. |
| GitHub.CodeSearchResults.repository.private | Boolean | True if the repository is private, false if public. |
| GitHub.CodeSearchResults.repository.id | String | The ID of the repository. |
| GitHub.CodeSearchResults.repository.releases_url | String | The URL to the releases of the repository. |
| GitHub.CodeSearchResults.repository.branches_url | String | The URL to the branches of the repository. |
| GitHub.CodeSearchResults.repository.commits_url | String | The URL to the commits of the repository. |
github-update-pull-request
Updates a pull request in a repository.
Base Command
github-update-pull-request
Input
| Argument Name | Description | Required |
|---|---|---|
| title | The new title of the pull request. | Optional |
| body | The new body content of the pull request. | Optional |
| state | The new state of the pull request. Can be “open”, or “closed”. Possible values are: open, closed. | Optional |
| base | The name of the branch to pull your changes from. It must be an existing branch in the current repository. You cannot update the base branch in a pull request to point to another repository. | Optional |
| maintainer_can_modify | Indicates whether maintainers can modify the pull request. Possible values are: true, false. | Optional |
| pull_number | The issue number of the pull request to modify. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The Node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.Title | String | The title of the pull request. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The Node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The type of the user who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site administrator. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The Node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The Node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The Node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site administrator. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request’s merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The Node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site administrator. not. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The Node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site administrator. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The Node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch the HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch the HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit the HEAD points to. |
| GitHub.PR.Head.User.Login | String | The committer login of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.ID | Number | The committer ID of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The Node committer ID of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The committer type of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The Node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | The topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads. |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been archived. |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled. |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out branch. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out branch. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The committer login of the commit the base branch points to. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The committer Node ID of the commit the base branch points to. |
| GitHub.PR.Base.User.Type | String | The user committer type of the commit the base branch points to. |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit the base branch points to is a site administrator. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The Node ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository the base branch belongs to is a site administrator. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository the base branch belongs to is private. |
| GitHub.PR.Base.Repo.Description | String | The description of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository the base branch belongs to is a fork. |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times that the repository the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times that the repository the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | The topics listed for the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository the base branch belongs to has issues. |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository the base branch belongs to has projects. |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository the base branch belongs to has a wiki. |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository the base branch belongs to has pages. |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository the base branch belongs to has downloads. |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository the base branch belongs to is archived. |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository the base branch belongs to is disabled. |
| GitHub.PR.Base.Repo.PushedAt | String | The date that the repository the base branch belongs to was last pushed. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date that the repository the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities subscribe to the repository that the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The Node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The type of the user who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site administrator. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
github-delete-file
Delete a file on a Github branch.
Base Command
github-delete-file
Input
| Argument Name | Description | Required |
|---|---|---|
| path_to_file | The full path to the file in the repository (e.g., path/to/file.txt). | Required |
| branch_name | The branch to delete the file from (e.g., main or master). | Required |
| commit_message | The commit message for the file deletion. Default is Deleted file via Cortex XSOAR. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.File.path | string | The path of the deleted file. |
| GitHub.File.sha | string | The SHA of the commit that deleted the file. |
| GitHub.File.deleted | boolean | True if the file was deleted. |
github-get-download-count
Returns the total number of downloads for all releases for the specified repository.
Base Command
github-get-download-count
Input
| Argument Name | Description | Required |
| — | — | — |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Release.ID | Number | ID of the release. |
| GitHub.Release.Download_count | Number | The download count for the release. |
| GitHub.Release.Name | String | The name of the release. |
| GitHub.Release.Body | String | The body of the release. |
| GitHub.Release.Created_at | Date | The date when the release was created. |
| GitHub.Release.Published_at | Date | The date when the release was published. |
github-create-pull-request
Creates a new pull request.
Base Command
github-create-pull-request
Input
| Argument Name | Description | Required |
|---|---|---|
| title | The title of the pull request. | Required |
| head | The name of the branch where the changes are made. | Required |
| base | The name of the branch you want the changes pulled into, which must be an existing branch on the current repository. | Required |
| body | The contents of the pull request. | Optional |
| maintainer_can_modify | Indicates whether maintainers can modify the pull request. Possible values are: true, false. | Optional |
| draft | Indicates whether the pull request is a draft. For more information, see https://help.github.com/en/articles/about-pull-requests#draft-pull-requests. Possible values are: true, false. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The Node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.Title | String | The title of the pull request. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The Node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The user type who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site administrator. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The Node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The Node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The Node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site administrator. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request’s merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The Node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site administrator. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The Node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site administrator. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The Node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch the HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch the HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit the HEAD points to. |
| GitHub.PR.Head.User.Login | String | The committer login of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.ID | Number | The committer ID of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The Node ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The committer type of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The Node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user Node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site administrator. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | The topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads. |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been archived. |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled. |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The committer login of the commit the base branch points. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The committer Node ID of the commit the base branch points. |
| GitHub.PR.Base.User.Type | String | The user type of the committer the commit base branch points. |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit the base branch points to is a site administrator. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The Node ID of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository that the base branch belongs to is a site administrator. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository the base branch belongs to is private. |
| GitHub.PR.Base.Repo.Description | String | The description of the repository the base branch belong to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository that the base branch belongs to is a fork. |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times that the repository the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times that the repository that the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | The topics listed for the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository the base branch belongs to has issues. |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository the base branch belongs to has projects. |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository the base branch belongs to has a wiki. |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository the base branch belongs to has pages. |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository the base branch belongs to has downloads. |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository the base branch belongs to is archived. |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository the base branch belongs to is disabled. |
| GitHub.PR.Base.Repo.PushedAt | String | The date that the repository the base branch belongs to was last pushed. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date that the repository the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities that subscribe to the repository for which the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The Node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The user type who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site administrator. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
github-update-comment
Update an already existing comment.
Base Command
github-update-comment
Input
| Argument Name | Description | Required |
|---|---|---|
| issue_number | The number of the issue to comment on. | Required |
| comment_id | the comment id to update. | Required |
| body | The contents of the comment. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Comment.IssueNumber | Number | The number of the issue to which the comment belongs. |
| GitHub.Comment.ID | Number | The ID of the comment. |
| GitHub.Comment.NodeID | String | The node ID of the comment. |
| GitHub.Comment.Body | String | The body content of the comment. |
| GitHub.Comment.User.Login | String | The login of the user who commented. |
| GitHub.Comment.User.ID | Number | The ID of the user who commented. |
| GitHub.Comment.User.NodeID | String | The node ID of the user who commented. |
| GitHub.Comment.User.Type | String | The type of the user who commented. |
| GitHub.Comment.User.SiteAdmin | Boolean | Whether the user who commented is a site admin. |
github-create-release
Create a release.
Base Command
github-create-release
Input
| Argument Name | Description | Required |
|---|---|---|
| name | The name of the release. | Optional |
| tag_name | The name of the release tag. | Required |
| body | Text describing the contents of the tag. | Optional |
| ref | The target branch/commit SHA from where to create the release. | Optional |
| draft | Whether to create a draft (unpublished) release. Possible values are: True, False. Default is True. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Release.draft | Boolean | Whether the release is a draft. |
| GitHub.Release.html_url | String | The release URL. |
| GitHub.Release.id | Number | The ID of the release. |
| GitHub.Release.url | String | GitHub API URL link to the release. |
github-get-pull-request
Gets a pull request.
Base Command
github-get-pull-request
Input
| Argument Name | Description | Required |
|---|---|---|
| pull_number | The number of the pull request to retrieve. | Required |
| organization | The name of the organization. | Optional |
| repository | The repository of the pull request. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.Title | String | The title of the pull request. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The type of the user who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site admin or not. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site admin. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request’s merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site admin or not. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site admin. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch that HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch that HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit that HEAD points to. |
| GitHub.PR.Head.User.Login | String | The login of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.ID | Number | The ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The node ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The type of the committer of the HEAD commit of the checked out. branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private or not. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | The topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues or not. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects or not. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki or not. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads . |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been arvhived . |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled . |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out branch. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out branch. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The login of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The node ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.Type | String | The user type of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit that the base branch points to is a site admin. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The node ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository that the base branch belongs to is a site admin. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository that the base branch belongs to is private . |
| GitHub.PR.Base.Repo.Description | String | The description of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository that the base branch belongs to is a fork . |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times that the repository that the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times that the repository that the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | The topics listed for the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository that the base branch belongs to has issues . |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository that the base branch belongs to has projects . |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository that the base branch belongs to has a wiki . |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository that the base branch belongs to has pages . |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository that the base branch belongs to has downloads . |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository that the base branch belongs to is archived . |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository that the base branch belongs to is disabled . |
| GitHub.PR.Base.Repo.PushedAt | String | The date that the repository that the base branch belongs to was last pushed to. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date that the repository that the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository that the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository that the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository that the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities that subscribe to the repository that the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The type of the user who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site admin or not. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
github-list-pr-review-comments
Lists all the review comments for a pull request.
Base Command
github-list-pr-review-comments
Input
| Argument Name | Description | Required |
|---|---|---|
| pull_number | The issue number of the pull request. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.ReviewComment.ID | Number | The ID number of the pull request review comment. |
| GitHub.PR.ReviewComment.NodeID | String | The Node ID of the pull request review comment. |
| GitHub.PR.ReviewComment.PullRequestReviewID | Number | The ID of the pull request review. |
| GitHub.PR.ReviewComment.DiffHunk | String | The diff hunk the review comment applies to. |
| GitHub.PR.ReviewComment.Path | String | The file path of the proposed file changes the review comment applies to. |
| GitHub.PR.ReviewComment.Position | Number | The position of the change the review comment applies to. |
| GitHub.PR.ReviewComment.OriginalPosition | Number | The original position of the change the review comment applies to. |
| GitHub.PR.ReviewComment.CommitID | String | The commit ID of the proposed change. |
| GitHub.PR.ReviewComment.OriginalCommitID | String | The commit ID of the commit before the proposed change. |
| GitHub.PR.ReviewComment.InReplyToID | Number | The reply ID of the comment the review comment applies to. |
| GitHub.PR.ReviewComment.User.Login | String | The login of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.ID | Number | The ID of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.NodeID | String | The Node ID of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.Type | String | The type of the user who created the review comment. |
| GitHub.PR.ReviewComment.User.SiteAdmin | Boolean | Whether the user who created the review comment is a site administrator. |
| GitHub.PR.ReviewComment.Body | String | The body content of the review comment. |
| GitHub.PR.ReviewComment.CreatedAt | String | The time the review comment was created. |
| GitHub.PR.ReviewComment.UpdatedAt | String | The time the review comment was updated. |
| GitHub.PR.ReviewComment.AuthorAssociation | String | The association of the user who created the review comment. |
github-close-issue
Closes an existing issue.
Base Command
github-close-issue
Input
| Argument Name | Description | Required |
|---|---|---|
| ID | The number of the issue to close. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the closed issue. |
| GitHub.Issue.Repository | String | The repository of the closed issue. |
| GitHub.Issue.Title | String | The title of the closed issue. |
| GitHub.Issue.Body | Unknown | The body of the closed issue. |
| GitHub.Issue.State | String | The state of the closed issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | Users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository organization. |
github-get-file-content
Gets the content of a file from GitHub.
Base Command
github-get-file-content
Input
| Argument Name | Description | Required |
|---|---|---|
| file_path | The path of the file. | Required |
| branch_name | The branch name to get the file from. | Optional |
| media_type | The media type in which the file contents will be fetched. Possible values are: “raw” and “html”. Default value is “raw”. Possible values are: raw, html. Default is raw. | Optional |
| create_file_from_content | Whether to create a file entry in the War Room with the file contents. Possible values are: “true” and “false”. Default value is “false”. Possible values are: true, false. Default is false. | Optional |
| organization | The name of the organization. | Optional |
| repository | The name of the repository. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.FileContent.Path | String | The path of the file. |
| GitHub.FileContent.Content | Number | The content of the file. |
| GitHub.FileContent.MediaType | String | The media type in which the file was fetched. |
| GitHub.FileContent.Branch | Unknown | The branch from which the file was fetched. |
github-list-issue-events
Returns events corresponding to the given issue.
Base Command
github-list-issue-events
Input
| Argument Name | Description | Required |
|---|---|---|
| issue_number | The issue number to retrieve events for. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.IssueEvent.id | Number | Event ID. |
| GitHub.IssueEvent.node_id | String | Event node ID. |
| GitHub.IssueEvent.url | String | Event URL. |
| GitHub.IssueEvent.actor.login | String | Event actor login username. |
| GitHub.IssueEvent.actor.id | Number | Event actor ID. |
| GitHub.IssueEvent.actor.node_id | String | Event actor node ID. |
| GitHub.IssueEvent.actor.avatar_url | String | Event actor avatar URL. |
| GitHub.IssueEvent.actor.gravatar_id | String | Event actor gravatar ID. |
| GitHub.IssueEvent.actor.url | String | Event actor URL. |
| GitHub.IssueEvent.actor.html_url | String | Event actor HTML URL. |
| GitHub.IssueEvent.actor.followers_url | String | Event actor followers URL. |
| GitHub.IssueEvent.actor.following_url | String | Event actor following URL. |
| GitHub.IssueEvent.actor.gists_url | String | Event actor gists URL. |
| GitHub.IssueEvent.actor.starred_url | String | Event actor starred URL. |
| GitHub.IssueEvent.actor.subscriptions_url | String | Event actor subscriptions URL. |
| GitHub.IssueEvent.actor.organizations_url | String | Event actor organizations URL. |
| GitHub.IssueEvent.actor.repos_url | String | Event actor repos URL. |
| GitHub.IssueEvent.actor.events_url | String | Event actor events URL. |
| GitHub.IssueEvent.actor.received_events_url | String | Event actor received events URL. |
| GitHub.IssueEvent.actor.type | String | Event actor type. |
| GitHub.IssueEvent.actor.site_admin | Boolean | Indicates whether the event actor is site admin. |
| GitHub.IssueEvent.event | String | Issue event type, for example labeled, closed. |
| GitHub.IssueEvent.commit_id | Unknown | Event commit ID. |
| GitHub.IssueEvent.commit_url | Unknown | Event commit URL. |
| GitHub.IssueEvent.created_at | Date | Event created time. |
| GitHub.IssueEvent.label.name | String | Event label name. |
| GitHub.IssueEvent.label.color | String | Event label color. |
| GitHub.IssueEvent.performed_via_github_app | Unknown | Indicates whether event was performed via a GitHub application. |
| GitHub.IssueEvent.assignee.login | String | Assignee login username. |
| GitHub.IssueEvent.assignee.id | Number | Assignee ID. |
| GitHub.IssueEvent.assignee.node_id | String | Assignee node ID. |
| GitHub.IssueEvent.assignee.avatar_url | String | Assignee avatar URL. |
| GitHub.IssueEvent.assignee.gravatar_id | String | Assignee gravatar ID. |
| GitHub.IssueEvent.assignee.url | String | Assignee URL. |
| GitHub.IssueEvent.assignee.html_url | String | Assignee HTML URL. |
| GitHub.IssueEvent.assignee.followers_url | String | Assignee followers URL. |
| GitHub.IssueEvent.assignee.following_url | String | Assignee following URL. |
| GitHub.IssueEvent.assignee.gists_url | String | Assignee gists URL. |
| GitHub.IssueEvent.assignee.starred_url | String | Assignee starred URL. |
| GitHub.IssueEvent.assignee.subscriptions_url | String | Assignee subscriptions URL. |
| GitHub.IssueEvent.assignee.organizations_url | String | Assignee organizations URL. |
| GitHub.IssueEvent.assignee.repos_url | String | Assignee repos URL. |
| GitHub.IssueEvent.assignee.events_url | String | Assignee events URL. |
| GitHub.IssueEvent.assignee.received_events_url | String | Assignee received events URL. |
| GitHub.IssueEvent.assignee.type | String | Assignee type. |
| GitHub.IssueEvent.assignee.site_admin | Boolean | Indicates whether the assignee is a site admin. |
| GitHub.IssueEvent.assigner.login | String | Assigner login username. |
| GitHub.IssueEvent.assigner.id | Number | Assigner ID. |
| GitHub.IssueEvent.assigner.node_id | String | Assigner node ID. |
| GitHub.IssueEvent.assigner.avatar_url | String | Assigner avatar URL. |
| GitHub.IssueEvent.assigner.gravatar_id | String | Assigner gravatar ID. |
| GitHub.IssueEvent.assigner.url | String | Assigner URL. |
| GitHub.IssueEvent.assigner.html_url | String | Assigner HTML URL. |
| GitHub.IssueEvent.assigner.followers_url | String | Assigner followers URL. |
| GitHub.IssueEvent.assigner.following_url | String | Assigner following URL. |
| GitHub.IssueEvent.assigner.gists_url | String | Assigner gists URL. |
| GitHub.IssueEvent.assigner.starred_url | String | Assigner starred URL. |
| GitHub.IssueEvent.assigner.subscriptions_url | String | Assigner subscriptions URL. |
| GitHub.IssueEvent.assigner.organizations_url | String | Assigner organizations URL. |
| GitHub.IssueEvent.assigner.repos_url | String | Assigner repos URL. |
| GitHub.IssueEvent.assigner.events_url | String | Assigner events URL. |
| GitHub.IssueEvent.assigner.received_events_url | String | Assigner received events URL. |
| GitHub.IssueEvent.assigner.type | String | Assigner type. |
| GitHub.IssueEvent.assigner.site_admin | Boolean | Indicates whether the assignee is a site admin. |
github-delete-comment
Deletes a comment.
Base Command
github-delete-comment
Input
| Argument Name | Description | Required |
|---|---|---|
| comment_id | The id of comment to delete. | Required |
Context Output
There is no context output for this command.
github-list-pr-reviews
Lists reviews on a pull request.
Base Command
github-list-pr-reviews
Input
| Argument Name | Description | Required |
|---|---|---|
| pull_number | The number of the pull request. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.Number | Number | The number of the pull request. |
| GitHub.PR.Review.ID | Number | The ID of the review. |
| GitHub.PR.Review.NodeID | String | The node ID of the review. |
| GitHub.PR.Review.Body | String | The content of the review. |
| GitHub.PR.Review.CommitID | String | The ID of the commit the review is for. |
| GitHub.PR.Review.State | String | The state of the review. |
| GitHub.PR.Review.User.Login | String | The reviewer’s user login. |
| GitHub.PR.Review.User.ID | Number | The reviewer’s user ID. |
| GitHub.PR.Review.User.NodeID | String | The reviewer’s user node ID. |
| GitHub.PR.Review.User.Type | String | The reviewer user type. |
| GitHub.PR.Review.User.SiteAdmin | Boolean | Whether the reviewer is a site admin. |
github-list-branch-pull-requests
Gets pull requests corresponding to the given branch name.
Base Command
github-list-branch-pull-requests
Input
| Argument Name | Description | Required |
|---|---|---|
| branch_name | The branch name from which to retrieve pull requests. | Required |
| organization | The name of the organization. | Optional |
| repository | The repository for the pull request. Defaults to the repository parameter if not provided. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.ID | Number | The ID number of the pull request. |
| GitHub.PR.NodeID | String | The node ID of the pull request. |
| GitHub.PR.Number | Number | The issue number of the pull request. |
| GitHub.PR.State | String | The state of the pull request. |
| GitHub.PR.Locked | Boolean | Whether the pull request is locked. |
| GitHub.PR.User.Login | String | The login of the user who opened the pull request. |
| GitHub.PR.User.ID | Number | The ID of the user who opened the pull request. |
| GitHub.PR.User.NodeID | String | The node ID of the user who opened the pull request. |
| GitHub.PR.User.Type | String | The type of the user who opened the pull request. |
| GitHub.PR.User.SiteAdmin | Boolean | Whether the user who opened the pull request is a site admin or not. |
| GitHub.PR.Body | String | The body content of the pull request. |
| GitHub.PR.Label.ID | Number | The ID of the label. |
| GitHub.PR.Label.NodeID | String | The node ID of the label. |
| GitHub.PR.Label.Name | String | The name of the label. |
| GitHub.PR.Label.Description | String | The description of the label. |
| GitHub.PR.Label.Color | String | The hex color value of the label. |
| GitHub.PR.Label.Default | Boolean | Whether the label is a default. |
| GitHub.PR.Milestone.ID | Number | The ID of the milestone. |
| GitHub.PR.Milestone.NodeID | String | The node ID of the milestone. |
| GitHub.PR.Milestone.Number | Number | The number of the milestone. |
| GitHub.PR.Milestone.State | String | The state of the milestone. |
| GitHub.PR.Milestone.Title | String | The title of the milestone. |
| GitHub.PR.Milestone.Description | String | The description of the milestone. |
| GitHub.PR.Milestone.Creator.Login | String | The login of the milestone creator. |
| GitHub.PR.Milestone.Creator.ID | Number | The ID the milestone creator. |
| GitHub.PR.Milestone.Creator.NodeID | String | The node ID of the milestone creator. |
| GitHub.PR.Milestone.Creator.Type | String | The type of the milestone creator. |
| GitHub.PR.Milestone.Creator.SiteAdmin | Boolean | Whether the milestone creator is a site admin. |
| GitHub.PR.Milestone.OpenIssues | Number | The number of open issues with this milestone. |
| GitHub.PR.Milestone.ClosedIssues | Number | The number of closed issues with this milestone. |
| GitHub.PR.Milestone.CreatedAt | String | The date the milestone was created. |
| GitHub.PR.Milestone.UpdatedAt | String | The date the milestone was updated. |
| GitHub.PR.Milestone.ClosedAt | String | The date the milestone was closed. |
| GitHub.PR.Milestone.DueOn | String | The due date for the milestone. |
| GitHub.PR.ActiveLockReason | String | The reason the pull request is locked. |
| GitHub.PR.CreatedAt | String | The date the pull request was created. |
| GitHub.PR.UpdatedAt | String | The date the pull request was updated. |
| GitHub.PR.ClosedAt | String | The date the pull request was closed. |
| GitHub.PR.MergedAt | String | The date the pull request was merged. |
| GitHub.PR.MergeCommitSHA | String | The SHA hash of the pull request’s merge commit. |
| GitHub.PR.Assignee.Login | String | The login of the user assigned to the pull request. |
| GitHub.PR.Assignee.ID | Number | The ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.NodeID | String | The node ID of the user assigned to the pull request. |
| GitHub.PR.Assignee.Type | String | The type of the user assigned to the pull request. |
| GitHub.PR.Assignee.SiteAdmin | Boolean | Whether the user assigned to the pull request is a site admin or not. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site admin. |
| GitHub.PR.RequestedTeam.ID | Number | The ID of the team requested for review. |
| GitHub.PR.RequestedTeam.NodeID | String | The node ID of the team requested for review. |
| GitHub.PR.RequestedTeam.Name | String | The name of the team requested for review. |
| GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for review. |
| GitHub.PR.RequestedTeam.Description | String | The description of the team requested for review. |
| GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for review. |
| GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for review. |
| GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for review. |
| GitHub.PR.Head.Label | String | The label of the branch that HEAD points to. |
| GitHub.PR.Head.Ref | String | The reference of the branch that HEAD points to. |
| GitHub.PR.Head.SHA | String | The SHA hash of the commit that HEAD points to. |
| GitHub.PR.Head.User.Login | String | The login of the committer of the HEAD commit of the checked out. branch. |
| GitHub.PR.Head.User.ID | Number | The ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.NodeID | String | The node ID of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.Type | String | The type of the committer of the HEAD commit of the checked out branch. |
| GitHub.PR.Head.User.SiteAdmin | Boolean | Whether the committer of the HEAD commit of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.ID | Number | The ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.NodeID | String | The node ID of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Name | String | The name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.FullName | String | The full name of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Login | String | The user login of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.ID | Number | The user ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.NodeID | String | The user node ID of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.Type | String | The user type of the owner of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository of the checked out branch is a site admin. |
| GitHub.PR.Head.Repo.Private | Boolean | Whether the repository of the checked out branch is private or not. |
| GitHub.PR.Head.Repo.Description | String | The description of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Fork | Boolean | Whether the repository of the checked out branch is a fork. |
| GitHub.PR.Head.Repo.Language | Unknown | The language of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.ForksCount | Number | The number of forks of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.StargazersCount | Number | The number of stars of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.WatchersCount | Number | The number of entities watching the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Size | Number | The size of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.DefaultBranch | String | The default branch of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.OpenIssuesCount | Number | The open issues of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.Topics | Unknown | The topics listed for the repository of the checked out branch. |
| GitHub.PR.Head.Repo.HasIssues | Boolean | Whether the repository of the checked out branch has issues or not. |
| GitHub.PR.Head.Repo.HasProjects | Boolean | Whether the repository of the checked out branch has projects or not. |
| GitHub.PR.Head.Repo.HasWiki | Boolean | Whether the repository of the checked out branch has a wiki or not. |
| GitHub.PR.Head.Repo.HasPages | Boolean | Whether the repository of the checked out branch has pages. |
| GitHub.PR.Head.Repo.HasDownloads | Boolean | Whether the repository of the checked out branch has downloads . |
| GitHub.PR.Head.Repo.Archived | Boolean | Whether the repository of the checked out branch has been arvhived . |
| GitHub.PR.Head.Repo.Disabled | Boolean | Whether the repository of the checked out branch has been disabled . |
| GitHub.PR.Head.Repo.PushedAt | String | The date of the latest push to the repository of the checked out branch. |
| GitHub.PR.Head.Repo.CreatedAt | String | The date of creation of the repository of the checked out branch. |
| GitHub.PR.Head.Repo.UpdatedAt | String | The date the repository of the checked out branch was last updated. |
| GitHub.PR.Head.Repo.AllowRebaseMerge | Boolean | Whether the repository of the checked out branch permits rebase-style merges. |
| GitHub.PR.Head.Repo.AllowSquashMerge | Boolean | Whether the repository of the checked out branch permits squash merges. |
| GitHub.PR.Head.Repo.AllowMergeCommit | Boolean | Whether the repository of the checked out branch permits merge commits. |
| GitHub.PR.Head.Repo.SubscribersCount | Number | The number of entities subscribing to the repository of the checked out branch. |
| GitHub.PR.Base.Label | String | The label of the base branch. |
| GitHub.PR.Base.Ref | String | The reference of the base branch. |
| GitHub.PR.Base.SHA | String | The SHA hash of the base branch. |
| GitHub.PR.Base.User.Login | String | The login of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.ID | Number | The ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.NodeID | String | The node ID of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.Type | String | The user type of the committer of the commit that the base branch points to. |
| GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit that the base branch points to is a site admin. |
| GitHub.PR.Base.Repo.ID | Number | The ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.NodeID | String | The node ID of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Name | String | The name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.FullName | String | The full name of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Owner.SiteAdmin | Boolean | Whether the owner of the repository that the base branch belongs to is a site admin. |
| GitHub.PR.Base.Repo.Private | Boolean | Whether the repository that the base branch belongs to is private . |
| GitHub.PR.Base.Repo.Description | String | The description of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Fork | Boolean | Whether the repository that the base branch belongs to is a fork . |
| GitHub.PR.Base.Repo.Language | Unknown | The language of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.ForksCount | Number | The number of times that the repository that the base branch belongs to has been forked. |
| GitHub.PR.Base.Repo.StargazersCount | Number | The number of times that the repository that the base branch belongs to has been starred. |
| GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Size | Number | The size of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.Topics | String | The topics listed for the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository that the base branch belongs to has issues . |
| GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository that the base branch belongs to has projects . |
| GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository that the base branch belongs to has a wiki . |
| GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository that the base branch belongs to has pages . |
| GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository that the base branch belongs to has downloads . |
| GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository that the base branch belongs to is archived . |
| GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository that the base branch belongs to is disabled . |
| GitHub.PR.Base.Repo.PushedAt | String | The date that the repository that the base branch belongs to was last pushed to. |
| GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository that the base branch belongs to. |
| GitHub.PR.Base.Repo.UpdatedAt | String | The date that the repository that the base branch belongs to was last updated. |
| GitHub.PR.Base.Repo.AllowRebaseMerge | Boolean | Whether the repository that the base branch belongs to allows rebase-style merges. |
| GitHub.PR.Base.Repo.AllowSquashMerge | Boolean | Whether the repository that the base branch belongs to allows squash merges. |
| GitHub.PR.Base.Repo.AllowMergeCommit | Boolean | Whether the repository that the base branch belongs to allows merge commits. |
| GitHub.PR.Base.Repo.SubscribersCount | Number | The number of entities that subscribe to the repository that the base branch belongs to. |
| GitHub.PR.AuthorAssociation | String | The pull request author association. |
| GitHub.PR.Draft | Boolean | Whether the pull request is a draft. |
| GitHub.PR.Merged | Boolean | Whether the pull request is merged. |
| GitHub.PR.Mergeable | Boolean | Whether the pull request is mergeable. |
| GitHub.PR.Rebaseable | Boolean | Whether the pull request is rebaseable. |
| GitHub.PR.MergeableState | String | The mergeable state of the pull request. |
| GitHub.PR.MergedBy.Login | String | The login of the user who merged the pull request. |
| GitHub.PR.MergedBy.ID | Number | The ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.NodeID | String | The node ID of the user who merged the pull request. |
| GitHub.PR.MergedBy.Type | String | The type of the user who merged the pull request. |
| GitHub.PR.MergedBy.SiteAdmin | Boolean | Whether the user who merged the pull request is a site admin or not. |
| GitHub.PR.Comments | Number | The number of comments on the pull request. |
| GitHub.PR.ReviewComments | Number | The number of review comments on the pull request. |
| GitHub.PR.MaintainerCanModify | Boolean | Whether the maintainer can modify the pull request. |
| GitHub.PR.Commits | Number | The number of commits in the pull request. |
| GitHub.PR.Additions | Number | The number of additions in the pull request. |
| GitHub.PR.Deletions | Number | The number of deletions in the pull request. |
| GitHub.PR.ChangedFiles | Number | The number of changed files in the pull request. |
github-list-files
Gets list of files from the given path in the repository.
Base Command
github-list-files
Input
| Argument Name | Description | Required |
|---|---|---|
| path | The path in the branch to get the files from. | Optional |
| organization | The name of the organization. | Optional |
| repository | The name of the repository. | Optional |
| branch | The branch name from which to get the files. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.File.Name | String | The name of the file. |
| GitHub.File.Type | String | Whether the item is file or directory. |
| GitHub.File.Size | Number | The size of the file in bytes. |
| GitHub.File.Path | String | The file path inside the repository. |
| GitHub.File.DownloadUrl | String | The link to download the file content. |
| GitHub.File.SHA | String | The SHA of the file. |
github-get-team-membership
Retrieves a user membership status with a team.
Base Command
github-get-team-membership
Input
| Argument Name | Description | Required |
|---|---|---|
| team_id | The ID number by which the team is identified. Try executing the ‘GitHub-list-teams’ command to find team IDs to reference. | Required |
| user_name | The login of the user whose membership you wish to check. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Team.Member.Role | String | The user’s role on a team. |
| GitHub.Team.Member.State | String | The user’s state for a team. |
| GitHub.Team.ID | Number | The ID number of the team. |
| GitHub.Team.Member.Login | String | The login of the team member. |
github-get-github-actions-usage
Gets the usage details of GitHub action workflows of private repositories by repository owner.
Base Command
github-get-github-actions-usage
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The repository owner. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.ActionsUsage.RepositoryName | String | The name of the private repository. |
| GitHub.ActionsUsage.WorkflowID | Number | The workflow ID of the GitHub action. |
| GitHub.ActionsUsage.WorkflowName | String | The display name of the GitHub action workflow. |
| GitHub.ActionsUsage.WorkflowUsage | Unknown | The GitHub action workflow usage on different OS. |
github-trigger-workflow
Triggers a GitHub workflow on a given repository and workflow.
Base Command
github-trigger-workflow
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The GitHub owner (organization or username) of the repository. | Optional |
| repository | The GitHub repository name. | Optional |
| branch | The branch to trigger the workflow on. | Optional |
| workflow | The name of your workflow file. | Required |
| inputs | The inputs for the workflow. | Optional |
Context Output
There is no context output for this command.
github-get-stale-prs
Gets inactive pull requests.
Base Command
github-get-stale-prs
Input
| Argument Name | Description | Required |
|---|---|---|
| stale_time | Time of inactivity after which a PR is considered stale. Default is 3 days. | Required |
| label | The label used to identify PRs of interest. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.URL | String | The html URL of the PR. |
| GitHub.PR.Number | Number | The GitHub pull request number. |
| GitHub.PR.RequestedReviewer | Unknown | A list of the PR’s requested reviewers. |
github-add-assignee
Adds up to 10 assignees to an issue/PR. Users already assigned to an issue are not replaced.
Base Command
github-add-assignee
Input
| Argument Name | Description | Required |
|---|---|---|
| pull_request_number | The number of PR/Issue to assign users to. | Required |
| assignee | Users to assign, can be a list of users. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Assignees.assignees | String | Assignees to the issue. |
| GitHub.Assignees.assignees.login | String | Login of assigned user. |
| GitHub.Assignees.assignees.gists_url | String | Gists URL for user. |
| GitHub.Assignees.assignees.following_url | String | Following URL for user. |
| GitHub.Assignees.assignees.followers_url | String | Followers URL for user. |
| GitHub.Assignees.assignees.subscriptions_url | String | Subscriptions URL for user. |
| GitHub.Assignees.assignees.received_events_url | String | Received events URL for user. |
| GitHub.Assignees.assignees.events_url | String | Events URL for user. |
| GitHub.Assignees.assignees.avatar_url | String | Avatar URL for user. |
| GitHub.Assignees.assignees.url | String | URL for user for user. |
| GitHub.Assignees.assignees.starred_url | String | Starred URL for user. |
| GitHub.Assignees.assignees.organizations_url | String | Organizations URL for user. |
| GitHub.Assignees.assignees.repos_url | String | Repos URL for user. |
| GitHub.Assignees.assignees.gravatar_id | String | Gravatar_id for user. |
| GitHub.Assignees.assignees.site_admin | String | Is user site admin. |
| GitHub.Assignees.assignees.node_id | String | Node ID for user. |
| GitHub.Assignees.assignees.type | String | Type of user. |
| GitHub.Assignees.assignees.id | String | User ID. |
| GitHub.Assignees.assignees.html_url | String | HTML URL for user. |
github-get-check-run
Gets a check run details.
Base Command
github-get-check-run
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | Organization or Owner. | Required |
| repository | Git Repository Name. | Required |
| run_id | Check Run ID. | Optional |
| commit_id | Head Commit ID. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.CheckRuns.CheckRunConclusion | String | Check Run Conculsion. |
| GitHub.CheckRuns.CheckRunAppName | String | Check Run App Name. |
| GitHub.CheckRuns.CheckExternalID | String | Check Run External ID. |
| GitHub.CheckRuns.CheckRunName | String | Check Run Name. |
| GitHub.CheckRuns.CheckRunStatus | String | Check Run Status. |
| GitHub.CheckRuns.CheckRunID | String | Check Run ID. |
github-get-branch
Gets a branch.
Base Command
github-get-branch
Input
| Argument Name | Description | Required |
|---|---|---|
| branch_name | The name of the branch to retrieve. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Branch.Name | String | The name of the branch. |
| GitHub.Branch.CommitSHA | String | The SHA of the commit the branch references. |
| GitHub.Branch.CommitNodeID | String | The Node ID of the commit the branch references. |
| GitHub.Branch.CommitAuthorID | Number | The GitHub ID number of the author of the commit the branch references. |
| GitHub.Branch.CommitAuthorLogin | String | The GitHub login of the author of the commit the branch references. |
| GitHub.Branch.CommitParentSHA | String | The SHAs of parent commits. |
| GitHub.Branch.Protected | Boolean | Whether the branch is protected. |
github-get-commit
Gets a commit.
Base Command
github-get-commit
Input
| Argument Name | Description | Required |
|---|---|---|
| commit_sha | The SHA hash of the commit. Try executing the ‘GitHub-get-branch’ command to find a commit SHA hash to reference. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Commit.SHA | String | The SHA hash of the commit. |
| GitHub.Commit.Author.Date | String | The commit author date. |
| GitHub.Commit.Author.Name | String | The name of the author. |
| GitHub.Commit.Author.Email | String | The email of the author. |
| GitHub.Commit.Committer.Date | String | The date the committer committed. |
| GitHub.Commit.Committer.Name | String | The name of the committer. |
| GitHub.Commit.Committer.Email | String | The email of the committer. |
| GitHub.Commit.Message | String | The message associated with the commit. |
| GitHub.Commit.Parent | Unknown | Lists of parent SHA hashes. |
| GitHub.Commit.TreeSHA | String | The SHA hash of the commit’s tree. |
| GitHub.Commit.Verification.Verified | Boolean | Whether the commit was verified. |
| GitHub.Commit.Verification.Reason | String | The reason why the commit was or was not verified. |
| GitHub.Commit.Verification.Signature | Unknown | The commit verification signature. |
| GitHub.Commit.Verification.Payload | Unknown | The commit verification payload. |
github-list-issue-comments
Lists comments on an issue.
Base Command
github-list-issue-comments
Input
| Argument Name | Description | Required |
|---|---|---|
| issue_number | The number of the issue to list comments for. | Required |
| since | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Comment.IssueNumber | Number | The number of the issue to which the comment belongs. |
| GitHub.Comment.ID | Number | The ID of the comment. |
| GitHub.Comment.NodeID | String | The node ID of the comment. |
| GitHub.Comment.Body | String | The body content of the comment. |
| GitHub.Comment.User.Login | String | The login of the user who commented. |
| GitHub.Comment.User.ID | Number | The ID of the user who commented. |
| GitHub.Comment.User.NodeID | String | The node ID of the user who commented. |
| GitHub.Comment.User.Type | String | The type of the user who commented. |
| GitHub.Comment.User.SiteAdmin | Boolean | Whether the user who commented is a site admin. |
github-list-all-projects
Lists all issues that the user has access to view.
Base Command
github-list-all-projects
Input
| Argument Name | Description | Required |
|---|---|---|
| project_filter | Only list projects with the following numbers. | Optional |
| limit | The number of projects to return. Default is 20. Maximum is 100. Default is 20. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Project.Name | String | The name of the project board. |
| GitHub.Project.ID | Number | The ID of the project board. |
| GitHub.Project.Number | Number | The project board number. |
| GitHub.Project.Columns.Name | String | The column name. |
| GitHub.Project.Columns.ColumnID | Number | The ID of the column. |
| GitHub.Project.Columns.Cards.CardID | Number | The ID of the card. |
| GitHub.Project.Columns.Cards.ContentNumber | Number | The content number of this card, usually this is the issue number. |
| GitHub.Project.Issues | Unknown | Lists of all issue numbers that are in this project board. |
github-list-workflows
Returns a list of GitHub workflows on a given repository.
Base Command
github-list-workflows
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The GitHub owner (organization or username) of the repository. | Optional |
| repository | The GitHub repository name. | Optional |
| workflow | The name of your workflow file. | Required |
| limit | The number of workflows to return. Default is 100. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Workflow.id | Number | The GitHub workflow ID (per run). |
| GitHub.Workflow.name | String | The GitHub workflow name. |
| GitHub.Workflow.head_branch | String | The branch on which the workflow ran. |
| GitHub.Workflow.head_sha | String | The commit SHA on which the workflow ran. |
| GitHub.Workflow.path | String | The GitHub workflow name path. |
| GitHub.Workflow.display_title | String | The GitHub workflow title. |
| GitHub.Workflow.run_number | Number | The GitHub workflow run number. |
| GitHub.Workflow.event | String | The GitHub workflow trigger type (scheduled, dispatch). |
| GitHub.Workflow.status | String | The GitHub workflow status (in_progress, completed). |
| GitHub.Workflow.conclusion | String | The GitHub workflow conclusion (cancelled, success). |
| GitHub.Workflow.workflow_id | String | The GitHub workflow ID (per workflow). |
| GitHub.Workflow.url | String | The GitHub workflow API URL. |
| GitHub.Workflow.html_url | String | The GitHub workflow HTML URL. |
| GitHub.Workflow.created_at | Date | Datetime the GitHub workflow was created at. |
| GitHub.Workflow.updated_at | Date | Datetime the GitHub workflow was updated at. |
github-get-workflow-run
Gets a specific workflow run (dispatched event) in a repository.
Base Command
github-get-workflow-run
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The GitHub owner (organization or username) of the repository. | Optional |
| repository | The GitHub repository name. | Optional |
| run_id | The unique identifier of the workflow run. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.WorkflowRun.ID | Number | The workflow run ID. |
| GitHub.WorkflowRun.Name | String | The workflow run name. |
| GitHub.WorkflowRun.HeadBranch | String | The branch the workflow run was triggered on. |
| GitHub.WorkflowRun.HeadSha | String | The commit SHA that triggered the run. |
| GitHub.WorkflowRun.DisplayTitle | String | The display title of the workflow run. |
| GitHub.WorkflowRun.RunNumber | Number | The sequential run number for the workflow. |
| GitHub.WorkflowRun.Event | String | The event that triggered the workflow run (e.g. workflow_dispatch). |
| GitHub.WorkflowRun.Status | String | The status of the workflow run (queued, in_progress, completed). |
| GitHub.WorkflowRun.Conclusion | String | The conclusion of the workflow run (success, failure, cancelled, etc.). |
| GitHub.WorkflowRun.WorkflowID | Number | The ID of the parent workflow. |
| GitHub.WorkflowRun.CreatedAt | Date | The datetime the workflow run was created. (ISO8601 format: 2020-01-01T00:11:22Z) |
| GitHub.WorkflowRun.UpdatedAt | Date | The datetime the workflow run was last updated. (ISO8601 format: 2020-01-01T00:11:22Z) |
| GitHub.WorkflowRun.Url | String | The workflow run API URL. |
| GitHub.WorkflowRun.HtmlUrl | String | The workflow run HTML URL. |
github-list-teams
Lists the teams for an organization. Note that this API call is only available to authenticated members of the organization.
Base Command
github-list-teams
Input
| Argument Name | Description | Required |
|---|---|---|
| organization | The name of the organization. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Team.ID | Number | The ID of the team. |
| GitHub.Team.NodeID | String | The node ID of the team. |
| GitHub.Team.Name | String | The name of the team. |
| GitHub.Team.Slug | String | The slug of the team. |
| GitHub.Team.Description | String | The description of the team. |
| GitHub.Team.Privacy | String | The privacy setting of the team. |
| GitHub.Team.Permission | String | The permissions of the team. |
| GitHub.Team.Parent | Unknown | The parent of the team. |
github-create-issue
Creates an issue in GitHub.
Base Command
github-create-issue
Input
| Argument Name | Description | Required |
|---|---|---|
| title | The title of the issue. | Required |
| body | The contents of the issue. | Optional |
| labels | Labels to associate with this issue. | Optional |
| assignees | Logins for Users to assign to this issue. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the created issue. |
| GitHub.Issue.Repository | String | The repository of the created issue. |
| GitHub.Issue.Title | String | The title of the created issue. |
| GitHub.Issue.Body | Unknown | The body of the created issue. |
| GitHub.Issue.State | String | The state of the created issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | The users assigned to this issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository organization. |
github-get-path-data
Gets the data of the a given path.
Base Command
github-get-path-data
Input
| Argument Name | Description | Required |
|---|---|---|
| relative_path | Relative path to retrieve its data. | Required |
| branch_name | The branch name from which to get the file data. Default is master. | Optional |
| organization | The name of the organization containing the file. | Optional |
| repository | The repository of the file. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PathData.name | String | The path name. |
| GitHub.PathData.path | String | The Relative path for the given repository. |
| GitHub.PathData.sha | String | The path SHA. |
| GitHub.PathData.size | Number | The path size in bytes. Will be 0 if path to a dir was given. |
| GitHub.PathData.url | String | The path URL. |
| GitHub.PathData.html_url | String | The path HTML URL. |
| GitHub.PathData.git_url | String | The path Git URL. |
| GitHub.PathData.download_url | String | The path download URL. If a directory path was given will be empty. |
| GitHub.PathData.type | String | The path data, for example file, dir. |
| GitHub.PathData.content | String | The content of the path if a file path was given. |
| GitHub.PathData.encoding | String | The encoding method if path to a file was given. |
| GitHub.PathData.entries.name | String | If a dir was given in file_path, name of the dir entry. |
| GitHub.PathData.entries.path | String | If a dir was given in file_path, path of the dir entry. |
| GitHub.PathData.entries.sha | String | If a dir was given in file_path, SHA of the dir entry. |
| GitHub.PathData.entries.size | Number | If a dir was given in file_path, size of the dir entry. Will be 0 if entry is also a dir. |
| GitHub.PathData.entries.url | String | If a dir was given in file_path, URL of the dir entry. |
| GitHub.PathData.entries.html_url | String | If a dir was given in file_path, HTML URL of the dir entry. |
| GitHub.PathData.entries.git_url | String | If a dir was given in file_path, Git URL of the dir entry. |
| GitHub.PathData.entries.download_url | String | If a dir was given in file_path, download URL of the dir entry. Will be empty if entry is also a dir. |
| GitHub.PathData.entries.type | String | If a dir was given in file_path, type of the dir entry. |
github-update-issue
Updates the parameters of a specified issue.
Base Command
github-update-issue
Input
| Argument Name | Description | Required |
|---|---|---|
| ID | The number of the issue to update. | Required |
| title | The title of the issue. | Optional |
| body | The contents of the issue. | Optional |
| state | State of the issue. Either open or closed. | Optional |
| labels | Labels to apply to this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue. . | Optional |
| assignees | Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Issue.ID | Number | The ID of the updated issue. |
| GitHub.Issue.Repository | String | The repository of the updated issue. |
| GitHub.Issue.Title | String | The title of the updated issue. |
| GitHub.Issue.Body | Unknown | The body of the updated issue. |
| GitHub.Issue.State | String | The state of the updated issue. |
| GitHub.Issue.Labels | String | The labels applied to the issue. |
| GitHub.Issue.Assignees | String | Users assigned to the issue. |
| GitHub.Issue.Created_at | Date | The date the issue was created. |
| GitHub.Issue.Updated_at | Date | The date the issue was last updated. |
| GitHub.Issue.Closed_at | Date | The date the issue was closed. |
| GitHub.Issue.Closed_by | String | The user who closed the issue. |
| GitHub.Issue.Organization | String | The repository organization. |
github-request-review
Requests reviews from GitHub users for a given pull request.
Base Command
github-request-review
Input
| Argument Name | Description | Required |
|---|---|---|
| pull_number | The number of the pull request you want to request review for. | Required |
| reviewers | A CSV list of GitHub users to request review from for a pull request. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.PR.Number | Number | The number of the pull request. |
| GitHub.PR.RequestedReviewer.Login | String | The login of the user requested for review. |
| GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for review. |
| GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for review. |
| GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user requested for review is a site admin. |
github-cancel-workflow
Cancels a GitHub workflow.
Base Command
github-cancel-workflow
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The GitHub owner (organization or username) of the repository. | Optional |
| repository | The GitHub repository name. | Optional |
| workflow_id | The ID of the workflow to cancel. | Required |
Context Output
There is no context output for this command.
github-revoke-credentials
Revoke exposed GitHub credentials (tokens) via the GitHub credential revocation API. This endpoint is unauthenticated by design and does not use the configured token. Limited to 60 unauthenticated requests per hour.
Base Command
github-revoke-credentials
Input
| Argument Name | Description | Required |
|---|---|---|
| credentials | A comma-separated list of GitHub credential tokens to revoke. Supported prefixes are ghp_, github_pat_, gho_, ghu_, ghr_. Maximum 1000 per request. | Required |
Context Output
There is no context output for this command.
github-list-organization-repositories
Lists repositories for the specified organization.
Base Command
github-list-organization-repositories
Input
| Argument Name | Description | Required |
|---|---|---|
| organization | The name of the organization. Defaults to the instance configured owner if not given. | Optional |
| type | The type of repositories to list. Possible values are: all, public, private, forks, sources, member, internal. Default is all. | Optional |
| page | The page number of results to return (1-based). Default is 1. | Optional |
| per_page | The number of results per page (max 100). Default is 50. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.Repository.id | Number | The repository ID. |
| GitHub.Repository.name | String | The repository name. |
| GitHub.Repository.full_name | String | The full repository name (org/repo). |
| GitHub.Repository.private | Boolean | Whether the repository is private. |
| GitHub.Repository.default_branch | String | The default branch name. |
| GitHub.Repository.updated_at | Date | The date the repository was last updated, in ISO 8601 format (e.g., 2024-05-01T12:00:00Z). |
github-list-actions-caches
Lists GitHub Actions caches for a repository.
Base Command
github-list-actions-caches
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The owner (organization or username) of the repository. Defaults to the instance configured owner if not given. | Optional |
| repository | The repository name. Defaults to the instance configured repository if not given. | Optional |
| page | The page number of results to return (1-based). Default is 1. | Optional |
| per_page | The number of results per page (max 100). Default is 50. | Optional |
| ref | The full Git ref to filter caches by (e.g., refs/heads/main). | Optional |
| key | The cache key or prefix to filter by. | Optional |
| sort | The property to sort the results by. Possible values are: created_at, last_accessed_at, size_in_bytes. | Optional |
| direction | The sort direction. Possible values are: asc, desc. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.ActionsCache.id | Number | The cache ID. |
| GitHub.ActionsCache.key | String | The cache key. |
| GitHub.ActionsCache.ref | String | The Git ref the cache belongs to. |
| GitHub.ActionsCache.version | String | The cache version. |
| GitHub.ActionsCache.size_in_bytes | Number | The size of the cache in bytes. |
| GitHub.ActionsCache.last_accessed_at | Date | The date the cache was last accessed, in ISO 8601 format (e.g., 2024-05-01T12:00:00Z). |
| GitHub.ActionsCache.created_at | Date | The date the cache was created, in ISO 8601 format (e.g., 2024-05-01T12:00:00Z). |
github-delete-actions-cache
Deletes a GitHub Actions cache entry.
Base Command
github-delete-actions-cache
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The owner (organization or username) of the repository. Defaults to the instance configured owner if not given. | Optional |
| repository | The repository name. Defaults to the instance configured repository if not given. | Optional |
| cache_id | The ID of the cache to delete. | Required |
Context Output
There is no context output for this command.
github-list-actions-artifacts
Lists GitHub Actions artifacts for a repository.
Base Command
github-list-actions-artifacts
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The owner (organization or username) of the repository. Defaults to the instance configured owner if not given. | Optional |
| repository | The repository name. Defaults to the instance configured repository if not given. | Optional |
| page | The page number of results to return (1-based). Default is 1. | Optional |
| per_page | The number of results per page (max 100). Default is 50. | Optional |
| name | The exact artifact name to filter by. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GitHub.ActionsArtifact.id | Number | The artifact ID. |
| GitHub.ActionsArtifact.name | String | The artifact name. |
| GitHub.ActionsArtifact.size_in_bytes | Number | The size of the artifact in bytes. |
| GitHub.ActionsArtifact.expired | Boolean | Whether the artifact has expired. |
| GitHub.ActionsArtifact.created_at | Date | The date the artifact was created, in ISO 8601 format (e.g., 2024-05-01T12:00:00Z). |
| GitHub.ActionsArtifact.expires_at | Date | The date the artifact expires, in ISO 8601 format (e.g., 2024-05-01T12:00:00Z). |
github-delete-actions-artifact
Deletes a GitHub Actions artifact.
Base Command
github-delete-actions-artifact
Input
| Argument Name | Description | Required |
|---|---|---|
| owner | The owner (organization or username) of the repository. Defaults to the instance configured owner if not given. | Optional |
| repository | The repository name. Defaults to the instance configured repository if not given. | Optional |
| artifact_id | The ID of the artifact to delete. | Required |
Context Output
There is no context output for this command.
Configuration parameters
isFetch— Fetch incidentsfetch_object— Select an Issue or Pull requests to Fetchurl— Server URLapi_token—credentials— Credentialsuser— Username of the repository owner, for example: github.com/repos/{_owner_}/{repo}/issuesrepository— The name of the requested repositoryfetch_time— First fetch interval (in days)proxy— Use system proxy settingsinsecure— Trust any certificate (not secure)incidentType— Incident typeincidentFetchInterval— Incidents Fetch Intervalintegration_id— GitHub app integration IDinstallation_id— GitHub app installation IDtoken— API Token
Commands (97)
-
GitHub-add-assigneeDeprecatedDeprecated. Use ***github-add-assignee*** instead. Adds up to 10 assignees to an issue/PR. Users already assigned to an issue are not replaced.
-
GitHub-add-issue-to-project-boardDeprecatedDeprecated. Use ***github-add-issue-to-project-board*** instead. Adds an Issue as a card in column of a spesific project.
-
GitHub-add-labelDeprecatedDeprecated. Use ***github-add-label*** instead. Adds labels to an issue.
-
GitHub-cancel-workflowDeprecatedDeprecated. Use ***github-cancel-workflow*** instead. Cancels a GitHub workflow.
-
GitHub-close-issueDeprecatedDeprecated. Use ***github-close-issue*** instead. Closes an existing issue.
-
GitHub-create-branchDeprecatedDeprecated. Use ***github-create-branch*** instead. Create a new branch.
-
GitHub-create-commentDeprecatedDeprecated. Use ***github-create-comment*** instead. Creates a comment for a given issue.
-
GitHub-create-issueDeprecatedDeprecated. Use ***github-create-issue*** instead. Creates an issue in GitHub.
-
GitHub-create-pull-requestDeprecatedDeprecated. Use ***github-create-pull-request*** instead. Creates a new pull request.
-
GitHub-create-releaseDeprecatedDeprecated. Use ***github-create-release*** instead. Create a release.
-
GitHub-delete-branchDeprecatedDeprecated. Use ***github-delete-branch*** instead. Deletes a branch.
-
GitHub-delete-commentDeprecatedDeprecated. Use ***github-delete-comment*** instead. Deletes a comment.
-
GitHub-delete-fileDeprecatedDeprecated. Use ***github-delete-file*** instead. Delete a file on a Github branch.
-
GitHub-get-branchDeprecatedDeprecated. Use ***github-get-branch*** instead. Gets a branch.
-
GitHub-get-commitDeprecatedDeprecated. Use ***github-get-commit*** instead. Gets a commit.
-
GitHub-get-download-countDeprecatedDeprecated. Use ***github-get-download-count*** instead. Returns the total number of downloads for all releases for the specified repository.
-
GitHub-get-file-contentDeprecatedDeprecated. Use ***github-get-file-content*** instead. Gets the content of a file from GitHub.
-
GitHub-get-path-dataDeprecatedDeprecated. Use ***github-get-path-data*** instead. Gets the data of the a given path.
-
GitHub-get-pull-requestDeprecatedDeprecated. Use ***github-get-pull-request*** instead. Gets a pull request.
-
GitHub-get-stale-prsDeprecatedDeprecated. Use ***github-get-stale-prs*** instead. Gets inactive pull requests.
-
GitHub-get-team-membershipDeprecatedDeprecated. Use ***github-get-team-membership*** instead. Retrieves a user membership status with a team.
-
GitHub-is-pr-mergedDeprecatedDeprecated. Use ***github-is-pr-merged*** instead. Returns a merged pull request. If the pull request has been merged, the API returns 'Status: 204 No Content'. If the pull request has not been merged the API returns 'Status: 404 Not Found'.
-
GitHub-list-all-issuesDeprecatedDeprecated. Use ***github-list-all-issues*** instead. Lists all issues that the user has access to view.
-
GitHub-list-all-projectsDeprecatedDeprecated. Use ***github-list-all-projects*** instead. Lists all issues that the user has access to view.
-
GitHub-list-branch-pull-requestsDeprecatedDeprecated. Use ***github-list-branch-pull-requests*** instead. Gets pull requests corresponding to the given branch name.
-
GitHub-list-issue-commentsDeprecatedDeprecated. Use ***github-list-issue-comments*** instead. Lists comments on an issue.
-
GitHub-list-pr-filesDeprecatedDeprecated. Use ***github-list-pr-files*** instead. Lists the pull request files.
-
GitHub-list-pr-review-commentsDeprecatedDeprecated. Use ***github-list-pr-review-comments*** instead. Lists all the review comments for a pull request.
-
GitHub-list-pr-reviewsDeprecatedDeprecated. Use ***github-list-pr-reviews*** instead. Lists reviews on a pull request.
-
GitHub-list-team-membersDeprecatedDeprecated. Use ***github-list-team-members*** instead. Lists team members.
-
GitHub-list-teamsDeprecatedDeprecated. Use ***github-list-teams*** instead. Lists the teams for an organization. Note that this API call is only available to authenticated members of the organization.
-
GitHub-list-workflowsDeprecatedDeprecated. Use ***github-list-workflows*** instead. Returns a list of GitHub workflows on a given repository.
-
GitHub-releases-listDeprecatedDeprecated. Use ***github-releases-list*** instead. Gets releases data from a given repository and organization.
-
GitHub-request-reviewDeprecatedDeprecated. Use ***github-request-review*** instead. Requests reviews from GitHub users for a given pull request.
-
GitHub-search-codeDeprecatedDeprecated. Use ***github-search-code*** instead. Searches for code in repositories that match a given query.
-
GitHub-search-issuesDeprecatedDeprecated. Use ***github-search-issues*** instead. Searches for and returns issues that match a given query.
-
GitHub-trigger-workflowDeprecatedDeprecated. Use ***github-trigger-workflow*** instead. Triggers a GitHub workflow on a given repository and workflow.
-
GitHub-update-commentDeprecatedDeprecated. Use ***github-update-comment*** instead. Update an already existing comment.
-
GitHub-update-issueDeprecatedDeprecated. Use ***github-update-issue*** instead. Updates the parameters of a specified issue.
-
GitHub-update-pull-requestDeprecatedDeprecated. Use ***github-update-pull-request*** instead. Updates a pull request in a repository.
-
Github-commit-fileDeprecatedDeprecated. Use ***github-commit-file*** instead. Commits a given file.
-
Github-get-check-runDeprecatedDeprecated. Use ***github-get-check-run*** instead. Gets a check run details.
-
Github-get-github-actions-usageDeprecatedDeprecated. Use ***github-get-github-actions-usage*** instead. Gets the usage details of GitHub action workflows of private repositories by repository owner.
-
Github-list-filesDeprecatedDeprecated. Use ***github-list-files*** instead. Gets list of files from the given path in the repository.
-
Github-list-issue-eventsDeprecatedDeprecated. Use ***github-list-issue-events*** instead. Returns events corresponding to the given issue.
-
github-add-assigneeAdds up to 10 assignees to an issue/PR. Users already assigned to an issue are not replaced.
-
github-add-issue-to-project-boardAdds an Issue as a card in column of a spesific project.
-
github-add-labelAdds labels to an issue.
-
github-cancel-workflowCancels a GitHub workflow.
-
github-close-issueCloses an existing issue.
-
github-commit-fileCommits a given file.
-
github-create-branchCreate a new branch.
-
github-create-commentCreates a comment for a given issue.
-
github-create-issueCreates an issue in GitHub.
-
github-create-pull-requestCreates a new pull request.
-
github-create-releaseCreate a release.
-
github-delete-actions-artifactDeletes a GitHub Actions artifact.
-
github-delete-actions-cacheDeletes a GitHub Actions cache entry.
-
github-delete-branchDeletes a branch.
-
github-delete-commentDeletes a comment.
-
github-delete-fileDelete a file on a Github branch.
-
github-get-branchGets a branch.
-
github-get-check-runGets a check run details.
-
github-get-commitGets a commit.
-
github-get-download-countReturns the total number of downloads for all releases for the specified repository.
-
github-get-file-contentGets the content of a file from GitHub.
-
github-get-github-actions-usageGets the usage details of GitHub action workflows of private repositories by repository owner.
-
github-get-path-dataGets the data of the a given path.
-
github-get-pull-requestGets a pull request.
-
github-get-stale-prsGets inactive pull requests.
-
github-get-team-membershipRetrieves a user membership status with a team.
-
github-get-workflow-runGets a specific workflow run (dispatched event) in a repository.
-
github-is-pr-mergedReturns a merged pull request. If the pull request has been merged, the API returns 'Status: 204 No Content'. If the pull request has not been merged the API returns 'Status: 404 Not Found'.
-
github-list-actions-artifactsLists GitHub Actions artifacts for a repository.
-
github-list-actions-cachesLists GitHub Actions caches for a repository.
-
github-list-all-issuesLists all issues that the user has access to view.
-
github-list-all-projectsLists all issues that the user has access to view.
-
github-list-branch-pull-requestsGets pull requests corresponding to the given branch name.
-
github-list-filesGets list of files from the given path in the repository.
-
github-list-issue-commentsLists comments on an issue.
-
github-list-issue-eventsReturns events corresponding to the given issue.
-
github-list-organization-repositoriesLists repositories for the specified organization.
-
github-list-pr-filesLists the pull request files.
-
github-list-pr-review-commentsLists all the review comments for a pull request.
-
github-list-pr-reviewsLists reviews on a pull request.
-
github-list-team-membersLists team members.
-
github-list-teamsLists the teams for an organization. Note that this API call is only available to authenticated members of the organization.
-
github-list-workflowsReturns a list of GitHub workflows on a given repository.
-
github-releases-listGets releases data from a given repository and organization.
-
github-request-reviewRequests reviews from GitHub users for a given pull request.
-
github-revoke-credentialsRevoke exposed GitHub credentials (tokens) via the GitHub credential revocation API. This endpoint is unauthenticated by design and does not use the configured token. Limited to 60 unauthenticated requests per hour.
-
github-search-codeSearches for code in repositories that match a given query.
-
github-search-issuesSearches for and returns issues that match a given query.
-
github-trigger-workflowTriggers a GitHub workflow on a given repository and workflow.
-
github-update-commentUpdate an already existing comment.
-
github-update-issueUpdates the parameters of a specified issue.
-
github-update-pull-requestUpdates a pull request in a repository.
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 """ IMPORTS """ import codecs import copy import json from datetime import datetime from typing import Any import requests import urllib3 # Disable insecure warnings urllib3.disable_warnings() """ GLOBALS/PARAMS """ BASE_URL: str USER: str TOKEN: str PRIVATE_KEY: str INTEGRATION_ID: str INSTALLATION_ID: str REPOSITORY: str USE_SSL: bool FETCH_TIME: str MAX_FETCH_PAGE_RESULTS: int USER_SUFFIX: str ISSUE_SUFFIX: str PROJECT_SUFFIX: str RELEASE_SUFFIX: str PULLS_SUFFIX: str FILE_SUFFIX: str HEADERS: dict RELEASE_HEADERS = ["ID", "Name", "Download_count", "Body", "Created_at", "Published_at"] ISSUE_HEADERS = [ "ID", "Repository", "Organization", "Title", "State", "Body", "Created_at", "Updated_at", "Closed_at", "Closed_by", "Assignees", "Labels", ] PROJECT_HEADERS = ["Name", "ID", "Number", "Columns"] FILE_HEADERS = ["Name", "Path", "Type", "Size", "SHA", "DownloadUrl"] # Headers to be sent in requests MEDIA_TYPE_INTEGRATION_PREVIEW = "application/vnd.github.machine-man-preview+json" PROJECTS_PREVIEW = "application/vnd.github.inertia-preview+json" DEFAULT_PAGE_SIZE = 50 DEFAULT_PAGE_NUMBER = 1 """ HELPER FUNCTIONS """ def github_delete_file_command(): args = demisto.args() commit_message = args.get("commit_message") path_to_file = args.get("path_to_file") branch = args.get("branch_name") # 1. Get the file's current SHA # Endpoint: GET /repos/{owner}/{repo}/contents/{path} get_url = f"{FILE_SUFFIX}/{path_to_file}" try: response = http_request("GET", get_url) file_sha = response.get("sha") except Exception as e: # Handle file not found (404) or other API errors raise DemistoException(f"Could not retrieve file SHA for deletion: {e}") # 2. Build the DELETE request body delete_body = {"message": commit_message, "sha": file_sha, "branch": branch} # 3. Delete the file by sending a DELETE request with the commit info # Endpoint: DELETE /repos/{owner}/{repo}/contents/{path} try: delete_url = f"{FILE_SUFFIX}/{path_to_file}" response = http_request("DELETE", delete_url, data=delete_body) # Format the command result for XSOAR hr_output = f"Successfully deleted file **{path_to_file}** from branch **{branch}**." return_results( CommandResults( readable_output=hr_output, outputs_prefix="GitHub.File", outputs_key_field="path", outputs={"path": path_to_file, "sha": response.get("commit", {}).get("sha"), "deleted": True}, ) ) except Exception as e: raise DemistoException(f"Failed to delete file on GitHub: {e}") def create_jwt(private_key: str, integration_id: str): """ Create a JWT token used for getting access token. It's needed for github bots. POSTs https://api.github.com/app/installations/<installation_id>/access_tokens :param private_key: str: github's private key :param integration_id: str: ID of the github integration (bot) """ import jwt now = int(time.time()) expiration = 60 payload = {"iat": now, "exp": now + expiration, "iss": integration_id} jwt_token = jwt.encode(payload, private_key, algorithm="RS256") return jwt_token def get_installation_access_token(installation_id: str, jwt_token: str): """ Get an access token for the given installation id. POSTs https://api.github.com/app/installations/<installation_id>/access_tokens :param installation_id: str: the id of the installation (where the bot was installed) :param jwt_token: str token needed in the request for retrieving the access token """ response = requests.post( f"{BASE_URL}/app/installations/{installation_id}/access_tokens", headers={ "Authorization": f"Bearer {jwt_token}", "Accept": MEDIA_TYPE_INTEGRATION_PREVIEW, }, ) if response.status_code == 201: return response.json()["token"] elif response.status_code == 403: return_error("403 Forbidden - The credentials are incorrect") return None elif response.status_code == 404: return_error("404 Not found - Installation wasn't found") return None else: return_error(f"Encountered an error: {response.text}") return None def safe_get(obj_to_fetch_from: dict, what_to_fetch: str, default_val: dict | list | str) -> Any: """Guarantees the default value in place of a Nonetype object when the value for a given key is explicitly None Args: obj_to_fetch_from (dict): The dictionary to fetch from what_to_fetch (str): The key for the desired value default_val: The default value to set instead of None Returns: The fetched value unless it is None in which case the default is returned instead """ val = obj_to_fetch_from.get(what_to_fetch, default_val) if val is None: val = default_val return val def http_request(method, url_suffix, params=None, data=None, headers=None, is_raw_response=False): res = requests.request( method, BASE_URL + url_suffix, verify=USE_SSL, params=params, data=json.dumps(data) if data else None, headers=headers or HEADERS, ) if res.status_code >= 400: demisto.debug(f"GitHub API error response [{res.status_code} {res.reason}] for {method} {url_suffix}: {res.text}") try: json_res = res.json() # add message from GitHub if available err_msg = json_res.get("message", "") if err_msg and "documentation_url" in json_res: err_msg += f' see: {json_res["documentation_url"]}' errors = json_res.get("errors") if errors is None: err_msg = f"Error in API call to the GitHub Integration [{res.status_code}] {res.reason}. {err_msg}" elif isinstance(errors, list) and errors: first_error = errors[0] if isinstance(first_error, str): # validation-error-simple: errors is list[str] err_msg = f"Error: {', '.join(str(e) for e in errors)}. {err_msg}" else: match first_error: case {"code": "missing_field", "field": field}: err_msg = f'Error: the field: "{field}" requires a value. {err_msg}' case {"code": "invalid", "field": "q", "message": message}: err_msg = f"Error: invalid query - {message}. {err_msg}" case {"code": "invalid", "field": field}: err_msg = f'Error: the field: "{field}" has an invalid value. {err_msg}' case {"code": "missing", "resource": resource}: err_msg = f"Error: {resource} does not exist. {err_msg}" case {"code": "already_exists", "field": field}: err_msg = f"Error: the field {field} must be unique. {err_msg}" case _: err_msg = f"Error in API call to the GitHub Integration [{res.status_code}] - {res.reason}. {err_msg}" else: # errors is None-like, empty list, or unexpected type err_msg = f"Error in API call to the GitHub Integration [{res.status_code}] - {res.reason}. {err_msg}" raise DemistoException(err_msg) except ValueError as exc: demisto.debug(f"Failed to parse GitHub error response as JSON: {exc!r}") raise DemistoException(f"Error in API call to GitHub Integration [{res.status_code}] - {res.reason}") try: if res.status_code in (204, 202): return res elif is_raw_response: return res.content.decode("utf-8") else: return res.json() except Exception as excep: return_error(f"Error in HTTP request - {excep!s}") def data_formatting(title, body, labels, assignees, state): """This method creates a dictionary to be used as "data" field in an http request.""" data = {} if title is not None: data["title"] = title if body is not None: data["body"] = body if state is not None: data["state"] = state if labels is not None: data["labels"] = labels.split(",") if assignees is not None: data["assignees"] = assignees.split(",") return data def context_create_issue(response, issue): """Create GitHub.Issue EntryContext and results to be printed in Demisto. Args: response (dict): The raw HTTP response to be inserted to the 'Contents' field. issue (dict or list): A dictionary or a list of dictionaries formatted for Demisto results. """ ec = {"GitHub.Issue(val.Repository == obj.Repository && val.ID == obj.ID)": issue} return_outputs(tableToMarkdown("Issues:", issue, headers=ISSUE_HEADERS, removeNull=True), ec, response) def list_create(issue, list_name, element_name): """Creates a list if parameters exist in issue. Args: issue(dict): an issue from GitHub. list_name (str): the name of the list in the issue. element_name (str): the field name of the element in the list. Returns: The created list or None if it does not exist. """ if issue.get(list_name) is not None: return [element.get(element_name) for element in issue.get(list_name)] else: return None def issue_format(issue): """Create a dictionary with selected fields representing an issue in Demisto. Args: issue (dict): An HTTP response representing an issue, formatted as a dictionary Returns: (dict). representing an issue in Demisto. """ closed_by = None if issue.get("closed_by") is not None and issue.get("state") == "closed": closed_by = issue.get("closed_by").get("login") org = "" repository_url = issue.get("repository_url").split("/") repo = repository_url[-1] if len(repository_url) > 1: org = repository_url[-2] form = { "ID": issue.get("number"), "Repository": repo, "Organization": org, "Title": issue.get("title"), "Body": issue.get("body"), "State": issue.get("state"), "Labels": list_create(issue, "labels", "name"), "Assignees": list_create(issue, "assignees", "login"), "Created_at": issue.get("created_at"), "Updated_at": issue.get("updated_at"), "Closed_at": issue.get("closed_at"), "Closed_by": closed_by, "Unique_ID": issue.get("id"), } return form def create_issue_table(issue_list, response, limit): """Get an HTTP response and a list containing several issues, sends each issue to be reformatted. Args: issue_list(list): derived from the HTTP response response (dict):A raw HTTP response sent for 'Contents' field in context Returns: The issues are sent to Demisto as a list. """ issue_list.reverse() issue_table = [] issue_count = 0 for issue in issue_list: issue_table.append(issue_format(issue)) issue_count = issue_count + 1 if issue_count == limit: break context_create_issue(response, issue_table) def format_commit_outputs(commit: dict = {}) -> dict: """Take GitHub API commit data and format to expected context outputs Args: commit (dict): commit data returned from GitHub API Returns: (dict): commit object formatted to expected context outputs """ author = commit.get("author", {}) ec_author = {"Date": author.get("date"), "Name": author.get("name"), "Email": author.get("email")} committer = commit.get("committer", {}) ec_committer = {"Date": committer.get("date"), "Name": committer.get("name"), "Email": committer.get("email")} parents = commit.get("parents", []) formatted_parents = [{"SHA": parent.get("sha")} for parent in parents] verification = commit.get("verification", {}) ec_verification = { "Verified": verification.get("verified"), "Reason": verification.get("reason"), "Signature": verification.get("signature"), "Payload": verification.get("payload"), } ec_object = { "SHA": commit.get("sha"), "Author": ec_author, "Committer": ec_committer, "Message": commit.get("message"), "Parent": formatted_parents, "TreeSHA": commit.get("tree", {}).get("sha"), "Verification": ec_verification, } return ec_object def format_label_outputs(label: dict = {}) -> dict: """Take GitHub API label data and format to expected context outputs Args: label (dict): label data returned from GitHub API Returns: (dict): label object formatted to expected context outputs """ ec_object = { "ID": label.get("id"), "NodeID": label.get("node_id"), "Name": label.get("name"), "Description": label.get("description"), "Color": label.get("Color"), "Default": label.get("default"), } return ec_object def format_user_outputs(user: dict = {}) -> dict: """Take GitHub API user data and format to expected context outputs Args: user (dict): user data returned from GitHub API Returns: (dict): user object formatted to expected context outputs """ ec_user = { "Login": user.get("login"), "ID": user.get("id"), "NodeID": user.get("node_id"), "Type": user.get("type"), "SiteAdmin": user.get("site_admin"), } return ec_user def format_pr_review_comment_outputs(review_comment: dict = {}) -> dict: """Take GitHub API pr review comment data and format to expected context outputs Args: review_comment (dict): pre review comment data returned from GitHub API Returns: (dict): pr review comment object formatted to expected context outputs """ ec_pr_review_comment = { "ID": review_comment.get("id"), "NodeID": review_comment.get("node_id"), "PullRequestReviewID": review_comment.get("pull_request_review_id"), "DiffHunk": review_comment.get("diff_hunk"), "Path": review_comment.get("path"), "Position": review_comment.get("position"), "OriginalPosition": review_comment.get("original_position"), "CommitID": review_comment.get("commit_id"), "OriginalCommitID": review_comment.get("original_commit_id"), "InReplyToID": review_comment.get("in_reply_to_id"), "User": format_user_outputs(review_comment.get("user", {})), "Body": review_comment.get("body"), "CreatedAt": review_comment.get("created_at"), "UpdatedAt": review_comment.get("updated_at"), "AuthorAssociation": review_comment.get("author_association"), } return ec_pr_review_comment def format_team_outputs(team: dict = {}) -> dict: """Take GitHub API team data and format to expected context outputs Args: team (dict): team data returned from GitHub API Returns: (dict): team object formatted to expected context outputs """ ec_team = { "ID": team.get("id"), "NodeID": team.get("node_id"), "Name": team.get("name"), "Slug": team.get("slug"), "Description": team.get("description"), "Privacy": team.get("privacy"), "Permission": team.get("permission"), "Parent": team.get("parent"), } return ec_team def format_head_or_base_outputs(head_or_base: dict = {}) -> dict: """Take GitHub API head or base branch data and format to expected context outputs Args: head_or_base (dict): head or base branch data returned from GitHub API Returns: (dict): head or base branch object formatted to expected context outputs """ head_or_base_user = head_or_base.get("user", {}) ec_head_or_base_user = format_user_outputs(head_or_base_user) head_or_base_repo = head_or_base.get("repo", {}) if head_or_base_repo: head_or_base_repo_owner = head_or_base_repo.get("owner", {}) else: # in case of a deleted fork head_or_base_repo = {} head_or_base_repo_owner = {"Login": "Unknown"} ec_head_or_base_repo_owner = format_user_outputs(head_or_base_repo_owner) ec_head_repo = { "ID": head_or_base_repo.get("id"), "NodeID": head_or_base_repo.get("node_id"), "Name": head_or_base_repo.get("name"), "FullName": head_or_base_repo.get("full_name"), "Owner": ec_head_or_base_repo_owner, "Private": head_or_base_repo.get("private"), "Description": head_or_base_repo.get("description"), "Fork": head_or_base_repo.get("fork"), "Language": head_or_base_repo.get("language"), "ForksCount": head_or_base_repo.get("forks_count"), "StargazersCount": head_or_base_repo.get("stargazers_count"), "WatchersCount": head_or_base_repo.get("watchers_count"), "Size": head_or_base_repo.get("size"), "DefaultBranch": head_or_base_repo.get("default_branch"), "OpenIssuesCount": head_or_base_repo.get("open_issues_count"), "Topics": head_or_base_repo.get("topics"), "HasIssues": head_or_base_repo.get("has_issues"), "HasProjects": head_or_base_repo.get("has_projects"), "HasWiki": head_or_base_repo.get("has_wiki"), "HasPages": head_or_base_repo.get("has_pages"), "HasDownloads": head_or_base_repo.get("has_downloads"), "Archived": head_or_base_repo.get("archived"), "Disabled": head_or_base_repo.get("disabled"), "PushedAt": head_or_base_repo.get("pushed_at"), "CreatedAt": head_or_base_repo.get("created_at"), "UpdatedAt": head_or_base_repo.get("updated_at"), "AllowRebaseMerge": head_or_base_repo.get("allow_rebase_merge"), "AllowSquashMerge": head_or_base_repo.get("allow_squash_merge"), "AllowMergeCommit": head_or_base_repo.get("allow_merge_commit"), "SucscribersCount": head_or_base_repo.get("subscribers_count"), } ec_head_or_base = { "Label": head_or_base.get("label"), "Ref": head_or_base.get("ref"), "SHA": head_or_base.get("sha"), "User": ec_head_or_base_user, "Repo": ec_head_repo, } return ec_head_or_base def format_pr_outputs(pull_request: dict = {}) -> dict: """Take GitHub API Pull Request data and format to expected context outputs Args: pull_request (dict): Pull Request data returned from GitHub API Returns: (dict): Pull Request object formatted to expected context outputs """ user_data = safe_get(pull_request, "user", {}) ec_user = format_user_outputs(user_data) labels_data = safe_get(pull_request, "labels", []) ec_labels = [format_label_outputs(label) for label in labels_data] milestone_data = safe_get(pull_request, "milestone", {}) creator = safe_get(milestone_data, "creator", {}) ec_creator = format_user_outputs(creator) ec_milestone = { "ID": milestone_data.get("id"), "NodeID": milestone_data.get("node_id"), "Number": milestone_data.get("number"), "State": milestone_data.get("state"), "Title": milestone_data.get("title"), "Description": milestone_data.get("description"), "OpenIssues": milestone_data.get("open_issues"), "ClosedIssues": milestone_data.get("closed_issues"), "CreatedAt": milestone_data.get("created_at"), "UpdatedAt": milestone_data.get("updated_at"), "ClosedAt": milestone_data.get("closed_at"), "DueOn": milestone_data.get("due_on"), } if creator: ec_milestone["Creator"] = ec_creator assignees_data = safe_get(pull_request, "assignees", []) ec_assignee = [format_user_outputs(assignee) for assignee in assignees_data] requested_reviewers_data = safe_get(pull_request, "requested_reviewers", []) ec_requested_reviewer = [format_user_outputs(requested_reviewer) for requested_reviewer in requested_reviewers_data] requested_teams_data = safe_get(pull_request, "requested_teams", []) ec_requested_team = [format_team_outputs(requested_team) for requested_team in requested_teams_data] head_data = safe_get(pull_request, "head", {}) ec_head = format_head_or_base_outputs(head_data) base_data = safe_get(pull_request, "base", {}) ec_base = format_head_or_base_outputs(base_data) merged_by_data = safe_get(pull_request, "merged_by", {}) ec_merged_by = format_user_outputs(merged_by_data) ec_object = { "ID": pull_request.get("id"), "NodeID": pull_request.get("node_id"), "Number": pull_request.get("number"), "State": pull_request.get("state"), "Locked": pull_request.get("locked"), "Body": pull_request.get("body"), "ActiveLockReason": pull_request.get("active_lock_reason"), "CreatedAt": pull_request.get("created_at"), "UpdatedAt": pull_request.get("updated_at"), "ClosedAt": pull_request.get("closed_at"), "MergedAt": pull_request.get("merged_at"), "MergeCommitSHA": pull_request.get("merge_commit_sha"), "AuthorAssociation": pull_request.get("author_association"), "Draft": pull_request.get("draft"), "Merged": pull_request.get("merged"), "Mergeable": pull_request.get("mergeable"), "Rebaseable": pull_request.get("rebaseable"), "MergeableState": pull_request.get("mergeable_state"), "Comments": pull_request.get("comments"), "ReviewComments": pull_request.get("review_comments"), "MaintainerCanModify": pull_request.get("maintainer_can_modify"), "Commits": pull_request.get("commits"), "Additions": pull_request.get("additions"), "Deletions": pull_request.get("deletions"), "ChangedFiles": pull_request.get("changed_files"), } if user_data: ec_object["User"] = ec_user if labels_data: ec_object["Label"] = ec_labels if assignees_data: ec_object["Assignee"] = ec_assignee if requested_reviewers_data: ec_object["RequestedReviewer"] = ec_requested_reviewer if requested_teams_data: ec_object["RequestedTeam"] = ec_requested_team if head_data: ec_object["Head"] = ec_head if base_data: ec_object["Base"] = ec_base if merged_by_data: ec_object["MergedBy"] = ec_merged_by if milestone_data: ec_object["Milestone"] = ec_milestone return ec_object def format_comment_outputs(comment: dict, issue_number: int | str) -> dict: """Take GitHub API Comment data and format to expected context outputs Args: comment (dict): Comment data returned from GitHub API issue_number (int): The number of the issue to which the comment belongs Returns: (dict): Comment object formatted to expected context outputs """ ec_object = { "IssueNumber": int(issue_number) if isinstance(issue_number, str) else issue_number, "ID": comment.get("id"), "NodeID": comment.get("node_id"), "Body": comment.get("body"), "User": format_user_outputs(comment.get("user", {})), } return ec_object """ COMMANDS """ def test_module(): http_request(method="GET", url_suffix=ISSUE_SUFFIX, params={"state": "all"}) demisto.results("ok") def create_pull_request(create_vals: dict = {}) -> dict: suffix = PULLS_SUFFIX response = http_request("POST", url_suffix=suffix, data=create_vals) return response def create_pull_request_command(): args = demisto.args() create_vals = dict(args.items()) maintainer_can_modify = args.get("maintainer_can_modify") if maintainer_can_modify: create_vals["maintainer_can_modify"] = maintainer_can_modify == "true" draft = args.get("draft") if draft: create_vals["draft"] = draft == "true" response = create_pull_request(create_vals) ec_object = format_pr_outputs(response) ec = {"GitHub.PR(val.Number === obj.Number)": ec_object} human_readable = tableToMarkdown(f'Created Pull Request #{response.get("number")}', ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def list_branch_pull_requests( branch_name: str, repository: Optional[str] = None, organization: Optional[str] = None ) -> List[Dict]: """ Performs API request to GitHub service and formats the returned pull requests details to outputs. Args: branch_name (str): Name of the branch to retrieve its PR. repository (Optional[str]): Repository the branch resides in. Defaults to 'REPOSITORY' if not given. organization (Optional[str]): Organization the branch resides in. Defaults to 'USER' if not given. Returns: (List[Dict]): List of the formatted pull requests outputs. """ repository = repository if repository else REPOSITORY organization = organization if organization else USER suffix = f"/repos/{organization}/{repository}/pulls?head={organization}:{branch_name}" response = http_request("GET", url_suffix=suffix) formatted_outputs = [format_pr_outputs(output) for output in response] return formatted_outputs def list_branch_pull_requests_command() -> None: """ List all pull requests corresponding to the given 'branch_name' in 'organization' Args: - 'branch_name': Branch name to retrieve its pull requests. - 'organization': Organization the branch belongs to. - 'repository': The repository the branch belongs to. Uses 'REPOSITORY' parameter if not given. Returns: (None): Results to XSOAR. """ args = demisto.args() branch_name = args.get("branch_name", "") organization = args.get("organization") repository = args.get("repository") formatted_outputs = list_branch_pull_requests(branch_name, repository, organization) return_results( CommandResults( outputs_prefix="GitHub.PR", outputs_key_field="Number", outputs=formatted_outputs, readable_output=tableToMarkdown(f"Pull Request For Branch #{branch_name}", formatted_outputs, removeNull=True), ) ) def is_pr_merged(pull_number: int | str): suffix = PULLS_SUFFIX + f"/{pull_number}/merge" response = http_request("GET", url_suffix=suffix) return response def is_pr_merged_command(): args = demisto.args() pull_number = args.get("pull_number") # raises 404 not found error if the pr was not merged is_pr_merged(pull_number) demisto.results(f"Pull Request #{pull_number} was Merged") def update_pull_request(pull_number: int | str, update_vals: dict = {}) -> dict: suffix = PULLS_SUFFIX + f"/{pull_number}" response = http_request("PATCH", url_suffix=suffix, data=update_vals) return response def update_pull_request_command(): args = demisto.args() pull_number = args.get("pull_number") update_vals = {key: val for key, val in args.items() if key != "pull_number"} if not update_vals: return_error( 'You must provide a value for at least one of the command\'s arguments "title", "body", "state",' ' "base" or "maintainer_can_modify" that you would like to update the pull request with' ) maintainer_can_modify = update_vals.get("maintainer_can_modify") if maintainer_can_modify: update_vals["maintainer_can_modify"] = maintainer_can_modify == "true" response = update_pull_request(pull_number, update_vals) ec_object = format_pr_outputs(response) ec = {"GitHub.PR(val.Number === obj.Number)": ec_object} human_readable = tableToMarkdown(f"Updated Pull Request #{pull_number}", ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def list_teams(organization: str) -> list: suffix = f"/orgs/{organization}/teams" response = http_request("GET", url_suffix=suffix) return response def list_teams_command(): args = demisto.args() organization = args.get("organization") response = list_teams(organization) ec_object = [format_team_outputs(team) for team in response] ec = {"GitHub.Team(val.ID === obj.ID)": ec_object} human_readable = tableToMarkdown(f'Teams for Organization "{organization}"', ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def get_pull_request(pull_number: int | str, repository: str = None, organization: str = None): if repository and organization and pull_number: suffix = f"/repos/{organization}/{repository}/pulls/{pull_number}" else: suffix = PULLS_SUFFIX + f"/{pull_number}" response = http_request("GET", url_suffix=suffix) return response def get_pull_request_command(): args = demisto.args() pull_number = args.get("pull_number") organization = args.get("organization") repository = args.get("repository") response = get_pull_request(pull_number, repository, organization) ec_object = format_pr_outputs(response) ec = {"GitHub.PR(val.Number === obj.Number)": ec_object} human_readable = tableToMarkdown(f"Pull Request #{pull_number}", ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def add_label(issue_number: int | str, labels: list): suffix = ISSUE_SUFFIX + f"/{issue_number}/labels" response = http_request("POST", url_suffix=suffix, data={"labels": labels}) return response def add_label_command(): args = demisto.args() issue_number = args.get("issue_number") labels = argToList(args.get("labels")) add_label(issue_number, labels) labels_for_msg = [f'"{label}"' for label in labels] msg = f'{" and ".join(labels_for_msg)} Successfully Added to Issue #{issue_number}' msg = "Labels " + msg if "and" in msg else "Label " + msg demisto.results(msg) def get_commit(commit_sha: str) -> dict: suffix = USER_SUFFIX + f"/git/commits/{commit_sha}" response = http_request("GET", url_suffix=suffix) return response def get_commit_command(): args = demisto.args() commit_sha = args.get("commit_sha") response = get_commit(commit_sha) ec_object = format_commit_outputs(response) ec = {"GitHub.Commit(val.SHA === obj.SHA)": ec_object} human_readable = tableToMarkdown(f"Commit *{commit_sha[:10]}*", ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def list_pr_reviews(pull_number: int | str) -> list: suffix = PULLS_SUFFIX + f"/{pull_number}/reviews" response = http_request("GET", url_suffix=suffix) return response def list_pr_reviews_command(): args = demisto.args() pull_number = args.get("pull_number") response = list_pr_reviews(pull_number) formatted_pr_reviews = [ { "ID": pr_review.get("id"), "NodeID": pr_review.get("node_id"), "Body": pr_review.get("body"), "CommitID": pr_review.get("commit_id"), "State": pr_review.get("state"), "User": format_user_outputs(pr_review.get("user", {})), } for pr_review in response ] ec_object = {"Number": pull_number, "Review": formatted_pr_reviews} ec = {"GitHub.PR(val.Number === obj.Number)": ec_object} human_readable = tableToMarkdown(f"Pull Request Reviews for #{pull_number}", formatted_pr_reviews, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def list_pr_files(pull_number: int | str, organization: str = None, repository: str = None) -> list: if pull_number and organization and repository: suffix = f"/repos/{organization}/{repository}/pulls/{pull_number}/files" else: suffix = PULLS_SUFFIX + f"/{pull_number}/files" response = http_request("GET", url_suffix=suffix) return response def list_pr_files_command(): args = demisto.args() pull_number = args.get("pull_number") organization = args.get("organization") repository = args.get("repository") response = list_pr_files(pull_number, organization, repository) formatted_pr_files = [ { "SHA": pr_file.get("sha"), "Name": pr_file.get("filename"), "Status": pr_file.get("status"), "Additions": pr_file.get("additions"), "Deletions": pr_file.get("deletions"), "Changes": pr_file.get("changes"), } for pr_file in response ] ec_object = {"Number": pull_number, "File": formatted_pr_files} ec = {"GitHub.PR(val.Number === obj.Number)": ec_object} human_readable = tableToMarkdown(f"Pull Request Files for #{pull_number}", formatted_pr_files, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def list_pr_review_comments(pull_number: int | str) -> list: suffix = PULLS_SUFFIX + f"/{pull_number}/comments" response = http_request("GET", url_suffix=suffix) return response def list_pr_review_comments_command(): args = demisto.args() pull_number = args.get("pull_number") response = list_pr_review_comments(pull_number) formatted_pr_review_comments = [format_pr_review_comment_outputs(review_comment) for review_comment in response] ec_object = {"Number": pull_number, "ReviewComment": formatted_pr_review_comments} ec = {"GitHub.PR(val.Number === obj.Number)": ec_object} human_readable = tableToMarkdown( f"Pull Request Review Comments for #{pull_number}", formatted_pr_review_comments, removeNull=True ) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def list_issue_comments(issue_number: int | str, since_date: Optional[str]) -> list: suffix = ISSUE_SUFFIX + f"/{issue_number}/comments" params = {} if since_date: params = {"since": since_date} response = http_request("GET", url_suffix=suffix, params=params) return response def list_issue_comments_command(): args = demisto.args() issue_number = args.get("issue_number") since_date = args.get("since") response = list_issue_comments(issue_number, since_date) ec_object = [format_comment_outputs(comment, issue_number) for comment in response] ec = {"GitHub.Comment(val.IssueNumber === obj.IssueNumber && val.ID === obj.ID)": ec_object} human_readable = tableToMarkdown(f"Comments for Issue #{issue_number}", ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def create_comment(issue_number: int | str, msg: str) -> dict: suffix = ISSUE_SUFFIX + f"/{issue_number}/comments" response = http_request("POST", url_suffix=suffix, data={"body": msg}) return response def create_comment_command(): args = demisto.args() issue_number = args.get("issue_number") body = args.get("body") response = create_comment(issue_number, body) ec_object = format_comment_outputs(response, issue_number) ec = {"GitHub.Comment(val.IssueNumber === obj.IssueNumber && val.ID === obj.ID)": ec_object} human_readable = tableToMarkdown("Created Comment", ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def request_review(pull_number: int | str, reviewers: list) -> dict: """Make an API call to GitHub to request reviews from a list of users for a given PR Args: pull_number (int): The number of the PR for which the review request(s) is/are being made reviewers (list): The list of GitHub usernames from which you wish to request a review Returns: dict: API response Raises: Exception: An exception will be raised if one or more of the requested reviewers is not a collaborator of the repo and therefore the API call returns a 'Status: 422 Unprocessable Entity' """ suffix = PULLS_SUFFIX + f"/{pull_number}/requested_reviewers" response = http_request("POST", url_suffix=suffix, data={"reviewers": reviewers}) return response def request_review_command(): args = demisto.args() pull_number = args.get("pull_number") reviewers = argToList(args.get("reviewers")) response = request_review(pull_number, reviewers) requested_reviewers = response.get("requested_reviewers", []) formatted_requested_reviewers = [format_user_outputs(reviewer) for reviewer in requested_reviewers] ec_object = {"Number": response.get("number"), "RequestedReviewer": formatted_requested_reviewers} ec = {"GitHub.PR(val.Number === obj.Number)": ec_object} human_readable = tableToMarkdown( f'Requested Reviewers for #{response.get("number")}', formatted_requested_reviewers, removeNull=True ) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def get_team_membership(team_id: int | str, user_name: str) -> dict: suffix = f"/teams/{team_id}/memberships/{user_name}" response = http_request("GET", url_suffix=suffix) return response def get_team_members(organization: str, team_slug: str, maximum_users: int = 30) -> list: page = 1 results: list = [] while len(results) < maximum_users: results_per_page = maximum_users - len(results) results_per_page = min(results_per_page, 100) params = {"page": page, "per_page": results_per_page} suffix = f"/orgs/{organization}/teams/{team_slug}/members" response = http_request("GET", url_suffix=suffix, params=params) if not response: break results.extend(response) page += 1 return results def get_team_membership_command(): args = demisto.args() team_id = args.get("team_id") try: team_id = int(team_id) except ValueError as e: return_error('"team_id" command argument must be an integer value.', e) user_name = args.get("user_name") response = get_team_membership(team_id, user_name) ec_object = {"ID": team_id, "Member": {"Login": user_name, "Role": response.get("role"), "State": response.get("state")}} ec = {"GitHub.Team": ec_object} human_readable = tableToMarkdown(f"Team Membership of {user_name}", ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def get_branch(branch: str) -> dict: suffix = USER_SUFFIX + f"/branches/{branch}" response = http_request("GET", url_suffix=suffix) return response def get_branch_command(): args = demisto.args() branch_name = args.get("branch_name") response = get_branch(branch_name) commit = response.get("commit", {}) or {} author = commit.get("author", {}) or {} parents = commit.get("parents", []) or [] ec_object = { "Name": response.get("name"), "CommitSHA": commit.get("sha"), "CommitNodeID": commit.get("node_id"), "CommitAuthorID": author.get("id"), "CommitAuthorLogin": author.get("login"), "CommitParentSHA": [parent.get("sha") for parent in parents], "Protected": response.get("protected"), } ec = {"GitHub.Branch(val.Name === obj.Name && val.CommitSHA === obj.CommitSHA)": ec_object} human_readable = tableToMarkdown(f'Branch "{branch_name}"', ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def create_branch(name: str, sha: str) -> dict: suffix = USER_SUFFIX + "/git/refs" data = {"ref": f"refs/heads/{name}", "sha": sha} response = http_request("POST", url_suffix=suffix, data=data) return response def create_branch_command(): args = demisto.args() branch_name = args.get("branch_name") commit_sha = args.get("commit_sha") create_branch(branch_name, commit_sha) msg = f'Branch "{branch_name}" Created Successfully' demisto.results(msg) def delete_branch(name: str): suffix = USER_SUFFIX + f"/git/refs/heads/{name}" http_request("DELETE", url_suffix=suffix) def delete_branch_command(): args = demisto.args() branch_name = args.get("branch_name") delete_branch(branch_name) msg = f'Branch "{branch_name}" Deleted Successfully' demisto.results(msg) def get_stale_prs(stale_time: str, label: str) -> list: time_range_start, _ = parse_date_range(stale_time) # regex for removing the digits from the end of the isoformat timestamp that don't conform to API expectations timestamp_regex = re.compile(r"\.\d{6}$") timestamp, _ = timestamp_regex.subn("", time_range_start.isoformat()) query = f"repo:{USER}/{REPOSITORY} is:open updated:<{timestamp} is:pr" if label: query += f" label:{label}" matching_issues = search_issue(query, 100).get("items", []) relevant_prs = [get_pull_request(issue.get("number")) for issue in matching_issues] return relevant_prs def get_stale_prs_command(): args = demisto.args() stale_time = args.get("stale_time", "3 days") label = args.get("label") results = get_stale_prs(stale_time, label) if results: formatted_results = [] for pr in results: requested_reviewers = [requested_reviewer.get("login") for requested_reviewer in pr.get("requested_reviewers", [])] formatted_pr = { "URL": f'<{pr.get("html_url")}>', "Number": pr.get("number"), "RequestedReviewer": requested_reviewers, } formatted_results.append(formatted_pr) ec = {"GitHub.PR(val.Number === obj.Number)": formatted_results} human_readable = tableToMarkdown("Stale PRs", formatted_results, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=results) else: demisto.results("No stale external PRs found") def create_issue(title, body, labels, assignees): data = data_formatting(title=title, body=body, labels=labels, assignees=assignees, state=None) response = http_request(method="POST", url_suffix=ISSUE_SUFFIX, data=data) return response def create_command(): args = demisto.args() response = create_issue(args.get("title"), args.get("body"), args.get("labels"), args.get("assignees")) issue = issue_format(response) context_create_issue(response, issue) def close_issue(id): response = http_request(method="PATCH", url_suffix=ISSUE_SUFFIX + f"/{id!s}", data={"state": "closed"}) return response def close_command(): id = demisto.args().get("ID") response = close_issue(id) issue = issue_format(response) context_create_issue(response, issue) def update_issue(id, title, body, state, labels, assign): data = data_formatting(title=title, body=body, labels=labels, assignees=assign, state=state) response = http_request(method="PATCH", url_suffix=ISSUE_SUFFIX + f"/{id!s}", data=data) return response def update_command(): args = demisto.args() response = update_issue( args.get("ID"), args.get("title"), args.get("body"), args.get("state"), args.get("labels"), args.get("assignees") ) issue = issue_format(response) context_create_issue(response, issue) def list_all_issue(state, page=1): params = { "state": state, "page": page, "per_page": MAX_FETCH_PAGE_RESULTS, } response = http_request(method="GET", url_suffix=ISSUE_SUFFIX, params=params) if len(response) == MAX_FETCH_PAGE_RESULTS: return response + list_all_issue(state=state, page=page + 1) else: return response def get_cards(url, header, page=1): resp = requests.get(url=url, headers=header, verify=USE_SSL, params={"page": page, "per_page": MAX_FETCH_PAGE_RESULTS}) cards = resp.json() column_issues = [] for card in cards: if "content_url" in card: column_issues.append({"CardID": card["id"], "ContentNumber": int(card["content_url"].rsplit("/", 1)[1])}) if len(cards) == MAX_FETCH_PAGE_RESULTS: return column_issues + get_cards(url=url, header=header, page=page + 1) else: return column_issues def get_project_details(project, header): resp_column = requests.get(url=project["columns_url"], headers=header, verify=USE_SSL) json_column = resp_column.json() columns_data = {} all_project_issues = [] for column in json_column: cards = get_cards(url=column["cards_url"], header=header) columns_data[column["name"]] = {"Name": column["name"], "ColumnID": column["id"], "Cards": cards} for card in cards: all_project_issues.append(card["ContentNumber"]) return { "Name": project["name"], "ID": project["id"], "Number": project["number"], "Columns": columns_data, "Issues": all_project_issues, } def list_all_projects_command(): project_f = demisto.args().get("project_filter", []) limit = demisto.args().get("limit", MAX_FETCH_PAGE_RESULTS) if int(limit) > MAX_FETCH_PAGE_RESULTS or project_f: limit = MAX_FETCH_PAGE_RESULTS if project_f: project_f = project_f.split(",") header = HEADERS header.update({"Accept": PROJECTS_PREVIEW}) params = {"per_page": limit} resp_projects = requests.get(url=BASE_URL + PROJECT_SUFFIX, headers=header, verify=USE_SSL, params=params) projects = resp_projects.json() projects_obj = [] for proj in projects: if project_f: if str(proj["number"]) in project_f: projects_obj.append(get_project_details(project=proj, header=header)) else: projects_obj.append(get_project_details(project=proj, header=header)) human_readable_projects = [ {"Name": proj["Name"], "ID": proj["ID"], "Number": proj["Number"], "Columns": list(proj["Columns"])} for proj in projects_obj ] if projects_obj: human_readable = tableToMarkdown("Projects:", t=human_readable_projects, headers=PROJECT_HEADERS, removeNull=True) else: human_readable = f'Not found projects with number - {",".join(project_f)}.' command_results = CommandResults( outputs_prefix="GitHub.Project", outputs_key_field="Name", outputs=projects_obj, readable_output=human_readable ) return_results(command_results) def add_issue_to_project_board_command(): content_type = "Issue" args = demisto.args() column_id = args.get("column_id") content_id = int(args.get("issue_unique_id")) if "content_type" in demisto.args(): content_type = args.get("content_type") header = HEADERS header.update({"Accept": PROJECTS_PREVIEW}) post_url = f"{BASE_URL}/projects/columns/{column_id}/cards" post_data = { "content_id": content_id, "content_type": content_type, } response = requests.post(url=post_url, headers=header, verify=USE_SSL, data=json.dumps(post_data)) if response.status_code >= 400: message = response.json().get("message", f"Failed to add the issue with ID {content_id} to column with ID {column_id}") return_error(f"Post result {response}\nMessage: {message}") return_results(f"The issue was successfully added to column ID {column_id}.") def list_all_command(): state = demisto.args().get("state") limit = int(demisto.args().get("limit")) if limit > 200: limit = 200 response = list_all_issue(state) create_issue_table(response, response, limit) def search_code(query, page=None, page_size=None): headers = copy.deepcopy(HEADERS) headers["Accept"] = "application/vnd.github.v3+json" params = {"q": query} if page is not None: params["page"] = page if page_size is not None: params["per_page"] = page_size response = http_request(method="GET", url_suffix="/search/code", params=params, headers=headers) return response def search_code_command(): q = demisto.args().get("query") page_number = demisto.args().get("page_number") page_size = demisto.args().get("page_size") limit = demisto.args().get("limit") response = None if limit and page_number: raise ValueError("Must pass either limit or page_number with page_size") elif limit: tmp_limit = int(limit) page_size = int(page_size or 100) while tmp_limit > 0: page_number = int(tmp_limit / page_size) res = search_code(query=q, page=page_number, page_size=min(page_size, tmp_limit)) if not response: response = res else: response["items"].extend(res.get("items", [])) tmp_limit = tmp_limit - page_size else: page_number = int(page_number or 0) page_size = int(page_size or 50) response = search_code(query=q, page=page_number, page_size=page_size) total_count = response.get("total_count") if response else 0 items = response.get("items", []) if response else [] outputs = [] md_table = [] for item in items: outputs.append( { "name": item.get("name"), "path": item.get("path"), "html_url": item.get("html_url"), "repository": { "desrciption": item.get("repository", {}).get("description"), "full_name": item.get("repository", {}).get("full_name"), "html_url": item.get("repository", {}).get("html_url"), "branches_url": item.get("repository", {}).get("branches_url"), "releases_url": item.get("repository", {}).get("releases_url"), "commits_url": item.get("repository", {}).get("commits_url"), "private": item.get("repository", {}).get("private"), "id": item.get("repository", {}).get("id"), }, } ) md_table.append( { "Name": f'[{item.get("name")}]({item.get("html_url")})', "Path": item.get("path"), "Repository Name": item.get("repository", {}).get("full_name"), "Repository Description": item.get("repository", {}).get("description"), "Is Repository Private": item.get("repository", {}).get("private"), } ) md = tableToMarkdown( f"Returned {len(md_table)} out of {total_count} total results.", md_table, headers=["Name", "Path", "Repository Name", "Repository Description", "Is Repository Private"], ) results = CommandResults( outputs_prefix="GitHub.CodeSearchResults", outputs_key_field="html_url", outputs=outputs, raw_response=response, readable_output=md, ) return_results(results) def search_issue(query, limit, page=1): params = { "q": query, "page": page, "per_page": MAX_FETCH_PAGE_RESULTS, } response = http_request(method="GET", url_suffix="/search/issues", params=params) if len(response["items"]) == MAX_FETCH_PAGE_RESULTS: next_res = search_issue(query=query, limit=limit, page=page + 1) response["items"] = response["items"] + next_res["items"] return response else: return response def search_command(): q = demisto.args().get("query") limit = int(demisto.args().get("limit")) if limit > 1000: limit = 1000 # per GitHub limitation. response = search_issue(q, limit) create_issue_table(response["items"], response, limit) def get_download_count(): response = http_request(method="GET", url_suffix=RELEASE_SUFFIX) count_per_release = [] for release in response: total_download_count = 0 for asset in release.get("assets", []): total_download_count = total_download_count + asset["download_count"] release_info = { "ID": release.get("id"), "Download_count": total_download_count, "Name": release.get("name"), "Body": release.get("body"), "Created_at": release.get("created_at"), "Published_at": release.get("published_at"), } count_per_release.append(release_info) ec = {"GitHub.Release( val.ID == obj.ID )": count_per_release} return_outputs(tableToMarkdown("Releases:", count_per_release, headers=RELEASE_HEADERS, removeNull=True), ec, response) def list_owner_repositories(owner_name, repo_type): """List organization repositories. Args: owner_name (str): repositories owner. repo_type (str): repository type, possible values: all, public, private, forks, sources, member, internal. Returns: list: organization repositories names. """ url_suffix = f"/orgs/{owner_name}/repos" params = {"type": repo_type} repos_info = http_request(method="GET", url_suffix=url_suffix, params=params) return [r.get("name") for r in repos_info] def list_repository_workflows(owner_name, repository_name): """Lists the workflows in a repository. Args: owner_name (str): repositories owner. repository_name (str): repository name. Returns: list: list of dictionaries of workflow data. """ url_suffix = f"/repos/{owner_name}/{repository_name}/actions/workflows" repository_workflows = http_request(method="GET", url_suffix=url_suffix) return [w for w in repository_workflows.get("workflows") if w.get("state") == "active"] def get_workflow_usage(owner_name, repository_name, workflow_id): """Gets the number of billable minutes used by a specific workflow during the current billing cycle. Args: owner_name (str): repositories owner. repository_name (str): repository name. workflow_id (str): workflow id. Returns: dict: milliseconds usage on ubuntu, macos and windows os. """ url_suffix = f"/repos/{owner_name}/{repository_name}/actions/workflows/{workflow_id}/timing" workflow_usage = http_request(method="GET", url_suffix=url_suffix).get("billable", {}) return workflow_usage def list_team_members_command(): args = demisto.args() org = args.get("organization") team_slug = args.get("team_slug") maximum_users = int(args.get("maximum_users")) response = get_team_members(org, team_slug, maximum_users) members = [] for member in response: context_data = { "ID": member.get("id"), "Login": member.get("login"), "Team": team_slug, } members.append(context_data) if members: human_readable = tableToMarkdown(f"Team Member of team {team_slug} in organization {org}", t=members, removeNull=True) else: human_readable = f"There is no team members under team {team_slug} in organization {org}" return_results( CommandResults( readable_output=human_readable, outputs_prefix="GitHub.TeamMember", outputs_key_field="ID", outputs=members if members else None, raw_response=response, ) ) def get_github_actions_usage(): """List github actions workflows usage of private repositories.""" command_args = demisto.args() owner_name = command_args.get("owner", "") usage_result = [] private_repositories = list_owner_repositories(owner_name=owner_name, repo_type="private") for repository_name in private_repositories: repository_workflows = list_repository_workflows(owner_name=owner_name, repository_name=repository_name) for workflow in repository_workflows: workflow_id = workflow.get("id", "") workflow_name = workflow.get("name", "") workflow_usage = get_workflow_usage(owner_name=owner_name, repository_name=repository_name, workflow_id=workflow_id) if workflow_usage: usage_result.append( { "WorkflowName": workflow_name, "WorkflowID": workflow_id, "RepositoryName": repository_name, "WorkflowUsage": workflow_usage, } ) ec = {"GitHub.ActionsUsage": usage_result} human_readable = tableToMarkdown("Github Actions Usage", usage_result, headerTransform=string_to_table_header) return_outputs(readable_output=human_readable, outputs=ec, raw_response=usage_result) def get_file_content_from_repo(): """Gets the content of a file from GitHub.""" args = demisto.args() file_path = args.get("file_path") branch_name = args.get("branch_name") media_type = args.get("media_type", "raw") organization = args.get("organization") or USER repository = args.get("repository") or REPOSITORY create_file_from_content = argToBoolean(args.get("create_file_from_content", False)) url_suffix = f"/repos/{organization}/{repository}/contents/{file_path}" if branch_name: url_suffix += f"?ref={branch_name}" headers = { "Authorization": "Bearer " + TOKEN, "Accept": f"application/vnd.github.VERSION.{media_type}", } file_data = http_request(method="GET", url_suffix=url_suffix, headers=headers, is_raw_response=True) if create_file_from_content: file_name = file_path.split("/")[-1] demisto.results(fileResult(filename=file_name, data=file_data, file_type=EntryType.ENTRY_INFO_FILE)) return file_processed_data = { "Path": file_path, "Content": file_data, "MediaType": media_type, } if branch_name: file_processed_data["Branch"] = branch_name results = CommandResults( outputs_prefix="GitHub.FileContent", outputs_key_field=["Path", "Branch", "MediaType"], outputs=file_processed_data, readable_output=f"File {file_path} successfully fetched.", raw_response=file_data, ) return_results(results) def list_files_command(): args = demisto.args() path = args.get("path", "") organization = args.get("organization") repository = args.get("repository") branch = args.get("branch") if organization and repository: suffix = f"/repos/{organization}/{repository}/contents/{path}" else: suffix = f"{USER_SUFFIX}/contents/{path}" params = {} if branch: params["ref"] = branch res = http_request(method="GET", url_suffix=suffix, params=params) # We may get either a list of dicts or a single dict as a result from the API call above # Modify object type to allow iteration below to work. if isinstance(res, dict): results = [] results.append(res) else: results = res ec_object = [] for file in results: ec_object.append( { "Type": file.get("type"), "Name": file.get("name"), "Size": file.get("size"), "Path": file.get("path"), "SHA": file.get("sha"), "DownloadUrl": file.get("download_url"), } ) ec = {"GitHub.File(val.Path === obj.Path)": ec_object} human_readable = tableToMarkdown(f"Files in path: {path}", ec_object, removeNull=True, headers=FILE_HEADERS) return_outputs(readable_output=human_readable, outputs=ec, raw_response=res) def remove_slashes(content) -> str: """If the content string contains $\\{<some_value>} the function will remove the slashes and returns it like this: ${<some_value>} """ return re.sub(r"\$\\({[^}]+})", r"$\1", content) def commit_file_command(): args = demisto.args() commit_message = args.get("commit_message") path_to_file = args.get("path_to_file") branch = args.get("branch_name") entry_id = args.get("entry_id") file_text = args.get("file_text") file_sha = args.get("file_sha") placeholders_escaped = argToBoolean(args.get("placeholders_escaped") or False) if not entry_id and not file_text: raise DemistoException('You must specify either the "file_text" or the "entry_id" of the file.') elif entry_id: file_path = demisto.getFilePath(entry_id).get("path") with open(file_path, "rb") as f: content = f.read() elif placeholders_escaped: demisto.debug(f"Github-commit-file command got {placeholders_escaped=} and will decode them.") content = bytes(remove_slashes(file_text), encoding="utf8") else: content = bytes(file_text, encoding="utf8") data = { "message": commit_message, "content": base64.b64encode(content).decode("utf-8"), "branch": branch, } if file_sha: data["sha"] = file_sha res = http_request(method="PUT", url_suffix=f"{FILE_SUFFIX}/{path_to_file}", data=data) return_results( CommandResults( readable_output=f"The file {path_to_file} committed successfully. Link to the commit:" f" {res['commit'].get('html_url')}", raw_response=res, ) ) def list_check_runs(owner_name, repository_name, run_id, commit_id): url_suffix = None if run_id: url_suffix = f"/repos/{owner_name}/{repository_name}/check-runs/{run_id}" elif commit_id: url_suffix = f"/repos/{owner_name}/{repository_name}/commits/{commit_id}/check-runs" else: raise DemistoException("You have to specify either the check run id of the head commit reference") check_runs = http_request(method="GET", url_suffix=url_suffix) return list(check_runs.get("check_runs")) def get_github_get_check_run(): """List github check runs.""" command_args = demisto.args() owner_name = command_args.get("owner", "") repository_name = command_args.get("repository", "") run_id = command_args.get("run_id", "") commit_id = command_args.get("commit_id", "") check_run_result = [] check_runs = list_check_runs(owner_name=owner_name, repository_name=repository_name, run_id=run_id, commit_id=commit_id) for check_run in check_runs: check_run_id = check_run.get("id", "") check_external_id = check_run.get("external_id", "") check_run_name = check_run.get("name", "") check_run_app_name = check_run["app"].get("name", "") check_run_pr = check_run.get("pull_requests") check_run_status = check_run.get("status", "") check_run_conclusion = check_run.get("conclusion", "") check_run_started_at = check_run.get("started_at", "") check_run_completed_at = check_run.get("completed_at", "") check_run_output = check_run.get("output", "") check_run_result.append( { "CheckRunID": check_run_id, "CheckExternalID": check_external_id, "CheckRunName": check_run_name, "CheckRunAppName": check_run_app_name, "CheckRunPR": check_run_pr, "CheckRunStatus": check_run_status, "CheckRunConclusion": check_run_conclusion, "CheckRunStartedAt": check_run_started_at, "CheckRunCompletedAt": check_run_completed_at, "CheckRunOutPut": check_run_output, } ) command_results = CommandResults( outputs_prefix="GitHub.CheckRuns", outputs_key_field="CheckRunID", outputs=check_run_result, raw_response=check_run_result, ) return_results(command_results) def create_release_command(): args = demisto.args() tag_name = args.get("tag_name") data = { "tag_name": tag_name, "name": args.get("name"), "body": args.get("body"), "draft": argToBoolean(args.get("draft")), "target_commitish": args.get("ref"), } response = http_request("POST", url_suffix=RELEASE_SUFFIX, data=data) release_url = response.get("html_url") return_results( CommandResults( outputs_prefix="GitHub.Release", outputs=response, outputs_key_field="id", readable_output=f"Release {tag_name} created successfully for repo {REPOSITORY}: {release_url}", raw_response=response, ) ) def get_issue_events_command(): args = demisto.args() issue_number = args.get("issue_number") res = http_request(method="GET", url_suffix=f"{ISSUE_SUFFIX}/{issue_number}/events") return_results( CommandResults( outputs_prefix="GitHub.IssueEvent", outputs_key_field="id", outputs=res, readable_output=tableToMarkdown(f"GitHub Issue Events For Issue {issue_number}", res), ) ) def fetch_incidents_command_rec(start_time, last_time, page=1): incidents = [] if demisto.params().get("fetch_object") == "Pull_requests": pr_list = http_request( method="GET", url_suffix=PULLS_SUFFIX, params={ "state": "open", "sort": "created", "page": page, "per_page": MAX_FETCH_PAGE_RESULTS, }, ) for pr in pr_list: updated_at_str = pr.get("created_at") updated_at = datetime.strptime(updated_at_str, "%Y-%m-%dT%H:%M:%SZ") if updated_at > start_time: inc = {"name": pr.get("url"), "occurred": updated_at_str, "rawJSON": json.dumps(pr)} incidents.append(inc) if updated_at > last_time: last_time = updated_at if len(pr_list) == MAX_FETCH_PAGE_RESULTS: rec_prs, rec_last_time = fetch_incidents_command_rec(start_time=start_time, last_time=last_time, page=page + 1) incidents = incidents + rec_prs if rec_last_time > last_time: last_time = rec_last_time else: params = {"page": page, "per_page": MAX_FETCH_PAGE_RESULTS, "state": "all"} # params.update({'labels': 'DevOps'}) issue_list = http_request(method="GET", url_suffix=ISSUE_SUFFIX, params=params) for issue in issue_list: updated_at_str = issue.get("created_at") updated_at = datetime.strptime(updated_at_str, "%Y-%m-%dT%H:%M:%SZ") if updated_at > start_time: inc = {"name": issue.get("url"), "occurred": updated_at_str, "rawJSON": json.dumps(issue)} incidents.append(inc) if updated_at > last_time: last_time = updated_at if len(issue_list) == MAX_FETCH_PAGE_RESULTS: rec_incidents, rec_last_time = fetch_incidents_command_rec(start_time=start_time, last_time=last_time, page=page + 1) incidents = incidents + rec_incidents if rec_last_time > last_time: last_time = rec_last_time return incidents, last_time def get_path_data(): """ Get path data from given relative file path, repository and organization corresponding to branch name if given. Returns: Outputs to XSOAR. """ args = demisto.args() relative_path: str = args.get("relative_path", "") repo: str = args.get("repository") or REPOSITORY organization: str = args.get("organization") or USER branch_name: Optional[str] = args.get("branch_name") url_suffix = f"/repos/{organization}/{repo}/contents/{relative_path}" url_suffix = f"{url_suffix}?ref={branch_name}" if branch_name else url_suffix headers = { "Authorization": "Bearer " + TOKEN, "Accept": "application/vnd.github.VERSION.object", } try: raw_response = http_request(method="GET", url_suffix=url_suffix, headers=headers) except DemistoException as e: if "[404]" in str(e): err_msg = "Could not find path." if branch_name: err_msg += f" Make sure branch {branch_name} exists." err_msg += f" Make sure relative path {relative_path} is correct." raise DemistoException(err_msg) raise e # Content is given as str of base64, need to encode and decode in order to retrieve its human readable content. file_data = copy.deepcopy(raw_response) if "content" in file_data: file_data["content"] = codecs.decode(file_data.get("content", "").encode(), "base64").decode("utf-8") # Links are duplications of the Git/HTML/URL. Deleting duplicate data from context. file_data.pop("_links", None) for entry in file_data.get("entries", []): entry.pop("_links", None) results = CommandResults( outputs_prefix="GitHub.PathData", outputs_key_field="url", outputs=file_data, readable_output=tableToMarkdown(f"File Data For File {relative_path}", file_data, removeNull=True), raw_response=raw_response, ) return_results(results) def github_releases_list_command(): """ Gets releases data of given repository in given organization. Returns: CommandResults data. """ args: Dict[str, Any] = demisto.args() repo: str = args.get("repository") or REPOSITORY organization: str = args.get("organization") or USER page_number: Optional[int] = arg_to_number(args.get("page")) page_size: Optional[int] = arg_to_number(args.get("page_size")) limit = arg_to_number(args.get("limit")) if (page_number or page_size) and limit: raise DemistoException( "page_number and page_size arguments cannot be given with limit argument.\n" "If limit is given, please do not use page or page_size arguments." ) results: List[Dict] = [] if limit: page_number = 1 page_size = 100 while len(results) < limit: url_suffix: str = f"/repos/{organization}/{repo}/releases?per_page={page_size}&page={page_number}" response = http_request(method="GET", url_suffix=url_suffix) # No more releases to bring from GitHub services. if not response: break results.extend(response) page_number += 1 results = results[:limit] else: page_size = page_size if page_size else DEFAULT_PAGE_SIZE page_number = page_number if page_number else DEFAULT_PAGE_NUMBER url_suffix = f"/repos/{organization}/{repo}/releases?per_page={page_size}&page={page_number}" results = http_request(method="GET", url_suffix=url_suffix) result: CommandResults = CommandResults( outputs_prefix="GitHub.Release", outputs_key_field="id", outputs=results, readable_output=tableToMarkdown(f"Releases Data Of {repo}", results, removeNull=True), ) return_results(result) def update_comment(comment_id: int | str, msg: str) -> dict: suffix = f"{ISSUE_SUFFIX}/comments/{comment_id}" response = http_request("PATCH", url_suffix=suffix, data={"body": msg}) return response def github_update_comment_command(): args = demisto.args() comment_id = args.get("comment_id") issue_number = args.get("issue_number") body = args.get("body") response = update_comment(comment_id, body) ec_object = format_comment_outputs(response, issue_number) ec = { "GitHub.Comment(val.IssueNumber === obj.IssueNumber && val.ID === obj.ID)": ec_object, } human_readable = tableToMarkdown("Updated Comment", ec_object, removeNull=True) return_outputs(readable_output=human_readable, outputs=ec, raw_response=response) def github_delete_comment_command(): args = demisto.args() comment_id = args.get("comment_id") suffix = f"{ISSUE_SUFFIX}/comments/{comment_id}" http_request("DELETE", url_suffix=suffix) return_results(f"comment with ID {comment_id} was deleted successfully") def fetch_incidents_command(): last_run = demisto.getLastRun() if last_run and "start_time" in last_run: start_time = datetime.strptime(last_run.get("start_time"), "%Y-%m-%dT%H:%M:%SZ") else: start_time = datetime.now() - timedelta(days=int(FETCH_TIME)) incidents, last_time = fetch_incidents_command_rec(start_time=start_time, last_time=start_time) demisto.setLastRun({"start_time": datetime.strftime(last_time, "%Y-%m-%dT%H:%M:%SZ")}) demisto.incidents(incidents) def github_add_assignee_command(): """ Assigns Github user to a PR Args: assignee (str): Github username. pull_request_number (str): the pull request/issue number. Returns: CommandResults object with informative printout if adding user was successfull or not """ assigned_users = [] not_assigned_users = [] args = demisto.args() assignee = args.get("assignee") pr_number = args.get("pull_request_number") assignee_list = argToList(assignee) suffix = f"{USER_SUFFIX}/issues/{pr_number}/assignees" post_data = {"assignees": assignee_list} response = http_request("POST", url_suffix=suffix, data=post_data) assignees_response = response.get("assignees") assigned_users_from_pr = [user.get("login") for user in assignees_response] for user in assignee_list: if user in assigned_users_from_pr: assigned_users.append(user) else: not_assigned_users.append(user) message = "" if assigned_users: message = f"The following users were assigned successfully to PR #{pr_number}: \n{assigned_users}" if not_assigned_users: message += ( f"\nThe following users were not assigned to #{pr_number}: \n{not_assigned_users} \n" f"Verify that the users exist and that you have the right permissions." ) return_results( CommandResults( outputs_prefix="GitHub.Assignees", outputs_key_field="login", outputs=assignees_response, raw_response=response, readable_output=message, ) ) def github_trigger_workflow_command(): """ Triggers a GitHub workflow on a given repository and workflow Args: owner (str): The GitHub owner (organization or username) of the repository. repository (str): The GitHub repository name. branch (str): The branch to trigger the workflow on. workflow (str): The name of your workflow file. inputs (str): The inputs of the workflow. Returns: CommandResults with the workflow run details when the API returns a JSON body, or a plain success message when the API returns 204 No Content. """ args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY branch = args.get("branch", "master") workflow = args.get("workflow") inputs = json.loads(args.get("inputs", "{}"), strict=False) suffix = f"/repos/{owner}/{repository}/actions/workflows/{workflow}/dispatches" headers = {"Authorization": f"Bearer {TOKEN}", "Accept": "application/vnd.github.v3+json"} data = assign_params(ref=branch, inputs=inputs) response = http_request("POST", url_suffix=suffix, headers=headers, data=data) # http_request returns a dict for 200 (JSON body) and a Response object for 204 No Content. if isinstance(response, dict): outputs = { "ID": response.get("workflow_run_id") or response.get("id"), "RunUrl": response.get("run_url") or response.get("url"), "HtmlUrl": response.get("html_url"), } return_results( CommandResults( outputs_prefix="GitHub.WorkflowRun", outputs_key_field="ID", outputs=outputs, raw_response=response, readable_output=tableToMarkdown("Triggered Workflow Run", outputs, removeNull=True), ) ) else: return_results(CommandResults(readable_output="Workflow triggered successfully.")) def github_get_workflow_run_command(): """Gets a specific workflow run (dispatched event) in a repository. Args: owner (str): The GitHub owner (organization or username) of the repository. repository (str): The GitHub repository name. run_id (str): The unique identifier of the workflow run. Returns: CommandResults with the workflow run details. """ args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY run_id = args.get("run_id") suffix = f"/repos/{owner}/{repository}/actions/runs/{run_id}" headers = {"Authorization": f"Bearer {TOKEN}", "Accept": "application/vnd.github.v3+json"} response = http_request("GET", url_suffix=suffix, headers=headers) output = { "ID": response.get("id"), "Name": response.get("name"), "HeadBranch": response.get("head_branch"), "HeadSha": response.get("head_sha"), "DisplayTitle": response.get("display_title"), "RunNumber": response.get("run_number"), "Event": response.get("event"), "Status": response.get("status"), "Conclusion": response.get("conclusion"), "WorkflowID": response.get("workflow_id"), "CreatedAt": response.get("created_at"), "UpdatedAt": response.get("updated_at"), "Url": response.get("url"), "HtmlUrl": response.get("html_url"), } return_results( CommandResults( outputs_prefix="GitHub.WorkflowRun", outputs_key_field="ID", outputs=output, raw_response=response, readable_output=tableToMarkdown(f"Workflow Run {run_id}", output, removeNull=True), ) ) def github_cancel_workflow_command(): """ Cancels a GitHub workflow. Args: owner (str): The GitHub owner (organization or username) of the repository. repository (str): The GitHub repository name. workflow_id (str): The workflow id to cancel. Returns: CommandResults object with informative prints out if triggering the workflow succeeded or not. """ args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY workflow_id = args.get("workflow_id") suffix = f"/repos/{owner}/{repository}/actions/runs/{workflow_id}/cancel" headers = {"Authorization": f"Bearer {TOKEN}", "Accept": "application/vnd.github.v3+json"} response = http_request("POST", url_suffix=suffix, headers=headers) if response.status_code == 202: return_results(CommandResults(readable_output="Workflow canceled successfully.")) else: return_results( CommandResults(raw_response=response, readable_output=f"Failed to cancel workflow. {response.json().get('message')}") ) def github_list_workflows_command(): """Returns a list of GitHub workflows on a given repository. Args: owner (str): The GitHub owner (organization or username) of the repository. repository (str): The GitHub repository name. workflow (str): The name of your workflow file. limit (int): Number of workflows to return. Default is 100. Returns: CommandResults object with an informative printout of the returns workflows. """ args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY workflow = args.get("workflow") limit = int(args.get("limit", 100)) suffix = f"/repos/{owner}/{repository}/actions/workflows/{workflow}/runs?per_page={limit}" headers = {"Authorization": f"Bearer {TOKEN}", "Accept": "application/vnd.github.v3+json"} response = http_request("GET", url_suffix=suffix, headers=headers) output_headers = [ "id", "name", "head_branch", "head_sha", "path", "display_title", "run_number", "event", "status", "conclusion", "workflow_id", "url", "html_url", "created_at", "updated_at", ] outputs: list[dict] = [] for workflow in response.get("workflow_runs", []): outputs.append({k: v for k, v in workflow.items() if k in output_headers}) return_results( CommandResults( raw_response=response, outputs=outputs, outputs_key_field="id", outputs_prefix="GitHub.Workflow", readable_output=tableToMarkdown("GitHub workflows", outputs, removeNull=True), ) ) VALID_CREDENTIAL_PREFIXES = ("ghp_", "github_pat_", "gho_", "ghu_", "ghr_") def github_revoke_credentials_command() -> None: """Revoke exposed GitHub credentials (tokens) via the GitHub credential revocation API. This endpoint is unauthenticated by design -- sending an Authorization header returns 403. Accepts up to 1000 tokens per request. Rate-limited to 60 unauthenticated requests/hour. """ credentials: list[str] = argToList(demisto.args().get("credentials")) if not credentials: raise DemistoException("The 'credentials' argument is required and must contain at least one token.") if len(credentials) > 1000: raise DemistoException(f"The GitHub API accepts a maximum of 1000 credentials per request. Received {len(credentials)}.") invalid = [c for c in credentials if not c.startswith(VALID_CREDENTIAL_PREFIXES)] if invalid: raise DemistoException( f"{len(invalid)} credential(s) have invalid prefixes. " f"Supported prefixes: {', '.join(VALID_CREDENTIAL_PREFIXES)}" ) headers = {"Accept": "application/vnd.github+json"} response = http_request("POST", "/credentials/revoke", data={"credentials": credentials}, headers=headers) if response.status_code == 202: return_results( CommandResults( readable_output=f"Successfully submitted {len(credentials)} credential(s) for revocation.", ) ) else: raise DemistoException( f"Unexpected response from GitHub credential revocation API: [{response.status_code}] {response.reason}" ) def github_list_organization_repositories_command() -> None: args = demisto.args() organization = args.get("organization") or USER repo_type = args.get("type", "all") page = arg_to_number(args.get("page")) or DEFAULT_PAGE_NUMBER per_page = arg_to_number(args.get("per_page")) or DEFAULT_PAGE_SIZE url_suffix = f"/orgs/{organization}/repos" params: dict[str, Any] = {"type": repo_type, "per_page": per_page, "page": page} results = http_request(method="GET", url_suffix=url_suffix, params=params) return_results( CommandResults( outputs_prefix="GitHub.Repository", outputs_key_field="id", outputs=results, readable_output=tableToMarkdown( "Organization Repositories", results, headers=["id", "name", "full_name", "private", "default_branch", "updated_at"], removeNull=True, ), ) ) def github_list_actions_caches_command() -> None: args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY page = arg_to_number(args.get("page")) or DEFAULT_PAGE_NUMBER per_page = arg_to_number(args.get("per_page")) or DEFAULT_PAGE_SIZE ref = args.get("ref") key = args.get("key") sort = args.get("sort") direction = args.get("direction") url_suffix = f"/repos/{owner}/{repository}/actions/caches" params: dict[str, Any] = {"per_page": per_page, "page": page} if ref: params["ref"] = ref if key: params["key"] = key if sort: params["sort"] = sort if direction: params["direction"] = direction response = http_request(method="GET", url_suffix=url_suffix, params=params) caches = response.get("actions_caches", []) return_results( CommandResults( outputs_prefix="GitHub.ActionsCache", outputs_key_field="id", outputs=caches, readable_output=tableToMarkdown( f"Actions Caches for {owner}/{repository}", caches, headers=["id", "key", "ref", "size_in_bytes", "last_accessed_at", "created_at"], removeNull=True, ), ) ) def github_delete_actions_cache_command() -> None: args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY cache_id = args.get("cache_id") url_suffix = f"/repos/{owner}/{repository}/actions/caches/{cache_id}" http_request("DELETE", url_suffix=url_suffix) return_results(f"Actions cache {cache_id} in {owner}/{repository} was deleted successfully.") def github_list_actions_artifacts_command() -> None: args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY page = arg_to_number(args.get("page")) or DEFAULT_PAGE_NUMBER per_page = arg_to_number(args.get("per_page")) or DEFAULT_PAGE_SIZE name = args.get("name") url_suffix = f"/repos/{owner}/{repository}/actions/artifacts" params: dict[str, Any] = {"per_page": per_page, "page": page} if name: params["name"] = name response = http_request(method="GET", url_suffix=url_suffix, params=params) artifacts = response.get("artifacts", []) return_results( CommandResults( outputs_prefix="GitHub.ActionsArtifact", outputs_key_field="id", outputs=artifacts, readable_output=tableToMarkdown( f"Actions Artifacts for {owner}/{repository}", artifacts, headers=["id", "name", "size_in_bytes", "expired", "created_at", "expires_at"], removeNull=True, ), ) ) def github_delete_actions_artifact_command() -> None: args = demisto.args() owner = args.get("owner") or USER repository = args.get("repository") or REPOSITORY artifact_id = args.get("artifact_id") url_suffix = f"/repos/{owner}/{repository}/actions/artifacts/{artifact_id}" http_request("DELETE", url_suffix=url_suffix) return_results(f"Actions artifact {artifact_id} in {owner}/{repository} was deleted successfully.") """ COMMANDS MANAGER / SWITCH PANEL """ COMMANDS = { "test-module": test_module, "fetch-incidents": fetch_incidents_command, # Deprecated commands (kept for backward compatibility) "GitHub-create-issue": create_command, "GitHub-close-issue": close_command, "GitHub-update-issue": update_command, "GitHub-list-all-issues": list_all_command, "GitHub-list-all-projects": list_all_projects_command, "GitHub-search-issues": search_command, "GitHub-get-download-count": get_download_count, "GitHub-get-stale-prs": get_stale_prs_command, "GitHub-get-branch": get_branch_command, "GitHub-create-branch": create_branch_command, "GitHub-get-team-membership": get_team_membership_command, "GitHub-request-review": request_review_command, "GitHub-create-comment": create_comment_command, "GitHub-list-issue-comments": list_issue_comments_command, "GitHub-list-pr-files": list_pr_files_command, "GitHub-list-pr-reviews": list_pr_reviews_command, "GitHub-get-commit": get_commit_command, "GitHub-add-label": add_label_command, "GitHub-get-pull-request": get_pull_request_command, "GitHub-list-teams": list_teams_command, "GitHub-delete-branch": delete_branch_command, "GitHub-list-pr-review-comments": list_pr_review_comments_command, "GitHub-update-pull-request": update_pull_request_command, "GitHub-is-pr-merged": is_pr_merged_command, "GitHub-create-pull-request": create_pull_request_command, "Github-get-github-actions-usage": get_github_actions_usage, "Github-list-files": list_files_command, "GitHub-get-file-content": get_file_content_from_repo, "GitHub-search-code": search_code_command, "GitHub-list-team-members": list_team_members_command, "GitHub-list-branch-pull-requests": list_branch_pull_requests_command, "Github-get-check-run": get_github_get_check_run, "Github-commit-file": commit_file_command, "GitHub-create-release": create_release_command, "Github-list-issue-events": get_issue_events_command, "GitHub-add-issue-to-project-board": add_issue_to_project_board_command, "GitHub-get-path-data": get_path_data, "GitHub-releases-list": github_releases_list_command, "GitHub-update-comment": github_update_comment_command, "GitHub-delete-comment": github_delete_comment_command, "GitHub-add-assignee": github_add_assignee_command, "GitHub-trigger-workflow": github_trigger_workflow_command, "GitHub-cancel-workflow": github_cancel_workflow_command, "GitHub-list-workflows": github_list_workflows_command, "GitHub-delete-file": github_delete_file_command, # New lowercase kebab-case commands (canonical names) "github-create-issue": create_command, "github-close-issue": close_command, "github-update-issue": update_command, "github-list-all-issues": list_all_command, "github-list-all-projects": list_all_projects_command, "github-search-issues": search_command, "github-get-download-count": get_download_count, "github-get-stale-prs": get_stale_prs_command, "github-get-branch": get_branch_command, "github-create-branch": create_branch_command, "github-get-team-membership": get_team_membership_command, "github-request-review": request_review_command, "github-create-comment": create_comment_command, "github-list-issue-comments": list_issue_comments_command, "github-list-pr-files": list_pr_files_command, "github-list-pr-reviews": list_pr_reviews_command, "github-get-commit": get_commit_command, "github-add-label": add_label_command, "github-get-pull-request": get_pull_request_command, "github-list-teams": list_teams_command, "github-delete-branch": delete_branch_command, "github-list-pr-review-comments": list_pr_review_comments_command, "github-update-pull-request": update_pull_request_command, "github-is-pr-merged": is_pr_merged_command, "github-create-pull-request": create_pull_request_command, "github-get-github-actions-usage": get_github_actions_usage, "github-list-files": list_files_command, "github-get-file-content": get_file_content_from_repo, "github-search-code": search_code_command, "github-list-team-members": list_team_members_command, "github-list-branch-pull-requests": list_branch_pull_requests_command, "github-get-check-run": get_github_get_check_run, "github-commit-file": commit_file_command, "github-create-release": create_release_command, "github-list-issue-events": get_issue_events_command, "github-add-issue-to-project-board": add_issue_to_project_board_command, "github-get-path-data": get_path_data, "github-releases-list": github_releases_list_command, "github-update-comment": github_update_comment_command, "github-delete-comment": github_delete_comment_command, "github-add-assignee": github_add_assignee_command, "github-trigger-workflow": github_trigger_workflow_command, "github-cancel-workflow": github_cancel_workflow_command, "github-list-workflows": github_list_workflows_command, "github-get-workflow-run": github_get_workflow_run_command, "github-delete-file": github_delete_file_command, "github-revoke-credentials": github_revoke_credentials_command, "github-list-organization-repositories": github_list_organization_repositories_command, "github-list-actions-caches": github_list_actions_caches_command, "github-delete-actions-cache": github_delete_actions_cache_command, "github-list-actions-artifacts": github_list_actions_artifacts_command, "github-delete-actions-artifact": github_delete_actions_artifact_command, } def main(): global BASE_URL global USER global TOKEN global PRIVATE_KEY global INTEGRATION_ID global INSTALLATION_ID global REPOSITORY global USE_SSL global FETCH_TIME global MAX_FETCH_PAGE_RESULTS global USER_SUFFIX global ISSUE_SUFFIX global PROJECT_SUFFIX global RELEASE_SUFFIX global PULLS_SUFFIX global FILE_SUFFIX global HEADERS params = demisto.params() BASE_URL = params.get("url", "https://api.github.com") USER = params.get("user") TOKEN = (params.get("api_token") or {}).get("password", "") or params.get("token") or "" creds: dict = params.get("credentials", {}).get("credentials", {}) PRIVATE_KEY = creds.get("sshkey", "") if creds else "" INTEGRATION_ID = params.get("integration_id") INSTALLATION_ID = params.get("installation_id") REPOSITORY = params.get("repository") USE_SSL = not params.get("insecure", False) FETCH_TIME = params.get("fetch_time", "3") MAX_FETCH_PAGE_RESULTS = 100 USER_SUFFIX = f"/repos/{USER}/{REPOSITORY}" PROJECT_SUFFIX = USER_SUFFIX + "/projects" ISSUE_SUFFIX = USER_SUFFIX + "/issues" RELEASE_SUFFIX = USER_SUFFIX + "/releases" PULLS_SUFFIX = USER_SUFFIX + "/pulls" FILE_SUFFIX = USER_SUFFIX + "/contents" if TOKEN == "" and PRIVATE_KEY != "": try: import jwt # noqa except Exception: return_error("You need to update the docker image so that the jwt package could be used") generated_jwt_token = create_jwt(PRIVATE_KEY, INTEGRATION_ID) TOKEN = get_installation_access_token(INSTALLATION_ID, generated_jwt_token) if TOKEN == "" and PRIVATE_KEY == "": return_error("Insert api token or private key") HEADERS = {"Authorization": "Bearer " + TOKEN} handle_proxy() cmd = demisto.command() LOG(f"command is {cmd}") try: if cmd in COMMANDS: COMMANDS[cmd]() except Exception as err: demisto.error(traceback.format_exc()) return_error(f"Failed to execute {cmd} command.\nError:\n{str(err)}") # python2 uses __builtin__ python3 uses builtins if __name__ == "__builtin__" or __name__ == "builtins" or __name__ == "__main__": main()