GitHub
Use the GitHub integration to manage GitHub issues directly from Demisto.
Configure GitHub on Demisto
- Navigate to Settings > Integrations > Servers & Services .
- Search for GitHub.
-
Click
Add instance
to create and configure a new integration instance.
- Name : a textual name for the integration instance.
- Fetch incidents
- API Token
- Credentials (for GitHub bots)
- Username of the repository owner, for example: github.com/repos/{ owner }/{repo}/issues
- The name of the requested repository.
- First fetch timestamp, in days.
- Use system proxy settings.
- Trust any certificate (not secure).
- Incident type
- Click Test to validate the URLs, token, and connection.
Authenticating
The integration provides 2 methods of authentication: API token and private key. The API token method is used to authenticate as a GitHub user, and take actions on behalf of a certain GitHub user. On the other hand, the second method uses private key to generate a JWT token to create the API token. This method is required when authenticating as a bot, a.k.a. GitHub apps.Commands
You can execute these commands from the Demisto 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.
- Create an issue: GitHub-create-issue
- Close an issue: GitHub-close-issue
- Update an issue: GitHub-update-issue
- List all issues: GitHub-list-all-issues
- Search issues: GitHub-search-issues
- Get the download count for releases: GitHub-get-download-count
- Get inactive pull requests: GitHub-get-stale-prs
- Get a branch: GitHub-get-branch
- Create a new branch: GitHub-create-branch
- Get details of a team membership: GitHub-get-team-membership
- Request a review for a pull request: GitHub-request-review
- Create a comment: GitHub-create-comment
- List comments in an issue: GitHub-list-issue-comments
- List pull request files: GitHub-list-pr-files
- List reviews on a pull request: GitHub-list-pr-reviews
- Get the contents of a commit: GitHub-get-commit
- Add a label to an issue: GitHub-add-label
- Get a pull request: GitHub-get-pull-request
- GitHub-list-teams: GitHub-list-teams
- GitHub-delete-branch: GitHub-delete-branch
1. Create an 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 | Labels applied to the issue. |
GitHub.Issue.Assignees | String | Users assigned to this issue. |
GitHub.Issue.Created_at | Date | Date when the issue was created. |
GitHub.Issue.Updated_at | Date | Date when the issue was last updated. |
GitHub.Issue.Closed_at | Date | Date when the issue was closed. |
GitHub.Issue.Closed_by | String | User who closed the issue. |
Command Example
GitHub-create-issue title=“newbug” body=“found a new bug” lable=bug,new
Context Example
{ "GitHub.Issue": { "Body": "\u201cfound", "Repository": "Git-Integration", "Title": "\u201cnewbug\u201d", "Created_at": "2019-06-17T15:14:10Z", "Labels": [], "Updated_at": "2019-06-17T15:14:10Z", "ID": 138, "Assignees": [], "State": "open", "Closed_at": null, "Closed_by": null } }
Human Readable Output
Issues:
ID | Repository | Title | State | Body | Created_at | Updated_at |
---|---|---|---|---|---|---|
138 | Git-Integration | “newbug” | open | “found | 2019-06-17T15:14:10Z | 2019-06-17T15:14:10Z |
2. Close an 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 | Labels spplied to the issue. |
GitHub.Issue.Assignees | String | Users assigned to the issue. |
GitHub.Issue.Created_at | Date | Date when the issue was created. |
GitHub.Issue.Updated_at | Date | Date when the issue was last updated |
GitHub.Issue.Closed_at | Date | Date when the issue was closed. |
GitHub.Issue.Closed_by | String | User who closed the issue. |
Command Example
GitHub-close-issue ID=136
Context Example
{ "GitHub.Issue": { "Body": null, "Repository": "Git-Integration", "Title": "new", "Created_at": "2019-06-17T14:48:15Z", "Labels": [ "bug", "else", "new" ], "Updated_at": "2019-06-17T15:14:12Z", "ID": 136, "Assignees": [], "State": "closed", "Closed_at": "2019-06-17T15:14:12Z", "Closed_by": "roysagi" } }
Human Readable Output
Issues:
ID | Repository | Title | State | Created_at | Updated_at | Closed_at | Closed_by | Labels |
---|---|---|---|---|---|---|---|---|
136 | Git-Integration | new | closed | 2019-06-17T14:48:15Z | 2019-06-17T15:14:12Z | 2019-06-17T15:14:12Z | roysagi |
bug,
else, new |
3. Update an 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 | Labels applied to the issue. |
GitHub.Issue.Assignees | String | Users assigned to the issue. |
GitHub.Issue.Created_at | Date | Date when the issue was created. |
GitHub.Issue.Updated_at | Date | Date when the issue was last updated. |
GitHub.Issue.Closed_at | Date | Date when the issue was closed. |
GitHub.Issue.Closed_by | String | User who closed the issue. |
Command Example
GitHub-update-issue ID=137 title=“new_title” body=“new info” state=open
Context Example
{ "GitHub.Issue": { "Body": "\u201cnew", "Repository": "Git-Integration", "Title": "\u201cnew_title\u201d", "Created_at": "2019-06-17T15:09:50Z", "Labels": [], "Updated_at": "2019-06-17T15:14:13Z", "ID": 137, "Assignees": [], "State": "open", "Closed_at": null, "Closed_by": null } }
Human Readable Output
Issues:
ID | Repository | Title | State | Body | Created_at | Updated_at |
---|---|---|---|---|---|---|
137 | Git-Integration | “new_title” | open | “new | 2019-06-17T15:09:50Z | 2019-06-17T15:14:13Z |
4. 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'. | 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 | Labels applied to the issue. |
GitHub.Issue.Assignees | String | Users assigned to the issue. |
GitHub.Issue.Created_at | Date | Date when the issue was created. |
GitHub.Issue.Updated_at | Date | Date when the issue was last updated. |
GitHub.Issue.Closed_at | Date | Date when the issue was closed. |
GitHub.Issue.Closed_by | String | User who closed the issue. |
Command Example
GitHub-list-all-issues state=all limit=2
Context Example
{ "GitHub.Issue": [ { "Body": "\"new information\"", "Repository": "Git-Integration", "Title": "\"new issue\"", "Created_at": "2019-06-04T11:52:11Z", "Labels": [ "newbug" ], "Updated_at": "2019-06-04T11:52:13Z", "ID": 109, "Assignees": [], "State": "closed", "Closed_at": "2019-06-04T11:52:13Z", "Closed_by": null }, { "Body": "\"new information\"", "Repository": "Git-Integration", "Title": "\"new issue\"", "Created_at": "2019-06-04T11:53:19Z", "Labels": [ "newbug" ], "Updated_at": "2019-06-04T11:53:22Z", "ID": 110, "Assignees": [], "State": "closed", "Closed_at": "2019-06-04T11:53:22Z", "Closed_by": null } ] }
Human Readable Output
Issues:
ID | Repository | Title | State | Body | Created_at | Updated_at | Closed_at | Labels |
---|---|---|---|---|---|---|---|---|
109 | Git-Integration | "new issue" | closed | "new information" | 2019-06-04T11:52:11Z | 2019-06-04T11:52:13Z | 2019-06-04T11:52:13Z | newbug |
110 | Git-Integration | "new issue" | closed | "new information" | 2019-06-04T11:53:19Z | 2019-06-04T11:53:22Z | 2019-06-04T11:53:22Z | newbug |
5. 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. See the GitHub documentation for more information. | 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 | Labels applied to the issue. |
GitHub.Issue.Assignees | String | Users assigned to the issue. |
GitHub.Issue.Created_at | Date | Date when the issue was created. |
GitHub.Issue.Updated_at | Date | Date when the issue was last updated. |
GitHub.Issue.Closed_at | Date | Date when the issue was closed. |
GitHub.Issue.Closed_by | String | User who closed the issue. |
Command Example
GitHub-search-issues query=“label:bug state:open” limit=2
Context Example
{ "GitHub.Issue": [] }
Human Readable Output
Issues:
No entries.
6. Get the download count for releases
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 | ID of the release. |
GitHub.Release.Download_count | Number | Download count for the release. |
GitHub.Release.Name | String | Name of the release. |
GitHub.Release.Body | String | Body of the release. |
GitHub.Release.Created_at | Date | Date when the release was created. |
GitHub.Release.Published_at | Date | Date when the release was published. |
Command Example
GitHub-get-download-count
Context Example
{ "GitHub.Release": [ { "Body": "this is another release", "Name": "anotherone", "Created_at": "2019-05-22T15:00:51Z", "Published_at": "2019-05-22T15:06:48Z", "Download_count": 5, "ID": 17519182 }, { "Body": "this is a test", "Name": "test", "Created_at": "2019-05-22T15:00:51Z", "Published_at": "2019-05-22T15:02:16Z", "Download_count": 1, "ID": 17519007 } ] }
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 |
7. Get inactive pull requests
Returns inactive pull requests from GitHub.
Base Command
GitHub-get-stale-prs
Input
Argument Name | Description | Required |
---|---|---|
stale_time | The time of inactivity after which a pull request becomes stale. | Required |
label | The label used to identify relevant pull requests. | Optional |
Context Output
Path | Type | Description |
---|---|---|
GitHub.PR.URL | String | The URL of the pull request. |
GitHub.PR.Number | Number | The number of the pull request. |
GitHub.PR.RequestedReviewer | Unknown | The requested reviewer's list of pull requests. |
Command Example
!GitHub-get-stale-prs stale_time="2 days"
Context Example
{ "GitHub.PR": [ { "Number": 18, "RequestedReviewer": [], "URL": "https://github.com/example-user1/content/pull/18" }, { "Number": 16, "RequestedReviewer": [], "URL": "https://github.com/example-user1/content/pull/16" }, { "Number": 15, "RequestedReviewer": [], "URL": "https://github.com/example-user1/content/pull/15" }, { "Number": 14, "RequestedReviewer": [], "URL": "https://github.com/example-user1/content/pull/14" } ] }
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 |
8. Get a branch
Retrieves a branch from the repository.
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 for which the branch references. |
GitHub.Branch.CommitNodeID | String | The Node ID of the commit for which the branch references. |
GitHub.Branch.CommitAuthorID | Number | The GitHub Commit Author ID for which the branch references. |
GitHub.Branch.CommitAuthorLogin | String | The GitHub Commit Author login for which the branch references. |
GitHub.Branch.CommitParentSHA | String | The SHAs of the commit parent. |
GitHub.Branch.Protected | Boolean | Whether the branch is protected. |
Command Example
!GitHub-get-pull-request pull_number=1
Context Example
{ "GitHub.PR": { "ActiveLockReason": null, "Additions": 4, "AuthorAssociation": "FIRST_TIME_CONTRIBUTOR", "Base": { "Label": "example-user1:master", "Ref": "master", "Repo": { "AllowMergeCommit": null, "AllowRebaseMerge": null, "AllowSquashMerge": null, "Archived": false, "CreatedAt": "2019-09-11T06:59:20Z", "DefaultBranch": "master", "Description": "This repository contains all Demisto content and from here we share content updates", "Disabled": false, "Fork": true, "ForksCount": 0, "FullName": "example-user1/content", "HasDownloads": true, "HasIssues": false, "HasPages": false, "HasProjects": true, "HasWiki": false, "ID": 207744685, "Language": "Python", "Name": "content", "NodeID": "MDEwOlJlcG9zaXRvcnkyMDc3NDQ2ODU=", "OpenIssuesCount": 10, "Owner": { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" }, "Private": false, "PushedAt": "2019-09-18T14:05:43Z", "Size": 96530, "StargazersCount": 0, "SucscribersCount": null, "Topics": null, "UpdatedAt": "2019-09-16T15:42:46Z", "WatchersCount": 0 }, "SHA": "b27ea6ac9836d2e756b44eb1d66f02d3d4299362", "User": { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } }, "Body": "\r\n\r\n## Status\r\nReady/In Progress/In Hold(Reason for hold)\r\n\r\n## Related Issues\r\nfixes: link to the issue\r\n\r\n## Description\r\nA few sentences describing the overall goals of the pull request's commits.\r\n\r\n## Screenshots\r\nPaste here any images that will help the reviewer\r\n\r\n## Related PRs\r\nList related PRs against other branches:\r\n\r\nbranch | PR\r\n------ | ------\r\n\r\n\r\n## Required version of Demisto\r\nx.x.x\r\n\r\n## Does it break backward compatibility?\r\n - Yes\r\n - Further details:\r\n - No\r\n\r\n## Must have\r\n- [ ] Tests\r\n- [ ] Documentation (with link to it)\r\n- [ ] Code Review\r\n\r\n## Dependencies\r\nMention the dependencies of the entity you changed as given from the precommit hooks in checkboxes, and tick after tested them.\r\n- [ ] Dependency 1\r\n- [ ] Dependency 2\r\n- [ ] Dependency 3\r\n\r\n## Additional changes\r\nDescribe additional changes done, for example adding a function to common server.\r\n", "ChangedFiles": 1, "ClosedAt": null, "Comments": 5, "Commits": 4, "CreatedAt": "2019-09-11T07:06:26Z", "Deletions": 0, "Draft": null, "Head": { "Label": "example-user4:patch-1", "Ref": "patch-1", "Repo": { "AllowMergeCommit": null, "AllowRebaseMerge": null, "AllowSquashMerge": null, "Archived": false, "CreatedAt": "2019-08-29T10:18:15Z", "DefaultBranch": "master", "Description": "This repository contains all Demisto content and from here we share content updates", "Disabled": false, "Fork": true, "ForksCount": 2, "FullName": "example-user4/content", "HasDownloads": true, "HasIssues": false, "HasPages": false, "HasProjects": true, "HasWiki": false, "ID": 205137013, "Language": "Python", "Name": "content", "NodeID": "MDEwOlJlcG9zaXRvcnkyMDUxMzcwMTM=", "OpenIssuesCount": 2, "Owner": { "ID": 46294017, "Login": "example-user4", "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "SiteAdmin": false, "Type": "User" }, "Private": false, "PushedAt": "2019-09-16T15:43:54Z", "Size": 95883, "StargazersCount": 0, "SucscribersCount": null, "Topics": null, "UpdatedAt": "2019-08-29T10:18:18Z", "WatchersCount": 0 }, "SHA": "c01238eea80e35bb76a5c51ac0c95eba4010d8e5", "User": { "ID": 46294017, "Login": "example-user4", "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "SiteAdmin": false, "Type": "User" } }, "ID": 316303415, "Label": [ { "Color": null, "Default": false, "Description": null, "ID": 1563600288, "Name": "Content", "NodeID": "MDU6TGFiZWwxNTYzNjAwMjg4" }, { "Color": null, "Default": false, "Description": null, "ID": 1549466359, "Name": "Contribution", "NodeID": "MDU6TGFiZWwxNTQ5NDY2MzU5" }, { "Color": null, "Default": true, "Description": null, "ID": 1549411616, "Name": "bug", "NodeID": "MDU6TGFiZWwxNTQ5NDExNjE2" } ], "Locked": false, "MaintainerCanModify": true, "MergeCommitSHA": "5714b1359b9d7549c89c35fe9fdc266a3db3b766", "Mergeable": true, "MergeableState": "unstable", "Merged": false, "MergedAt": null, "NodeID": "MDExOlB1bGxSZXF1ZXN0MzE2MzAzNDE1", "Number": 1, "Rebaseable": true, "RequestedReviewer": [ { "ID": 30797606, "Login": "example-user3", "NodeID": "MDQ6VXNlcjMwNzk3NjA2", "SiteAdmin": false, "Type": "User" }, { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } ], "ReviewComments": 0, "State": "open", "UpdatedAt": "2019-09-18T14:05:51Z", "User": { "ID": 46294017, "Login": "example-user4", "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "SiteAdmin": false, "Type": "User" } } }
Human Readable Output
Branch "master"
CommitAuthorID | CommitAuthorLogin | CommitNodeID | CommitParentSHA | CommitSHA | Name | Protected |
---|---|---|---|---|---|---|
55035720 | example-user1 | MDY6Q29tbWl0MjA3NzQ0Njg1OjhhNjdhMDc4MTM5NDk4ZjNlOGUxYmQyZTI2ZmZjNWEyZmVhMWI5MTg= | d6bafef5a0021a6d9ab0a22e11bd0afd5801d936 | 8a67a078139498f3e8e1bd2e26ffc5a2fea1b918 | master | false |
9. Create a new branch
Creates a new branch of the repository.
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. Execute the GitHub-get-branch command to find a commit SHA hash to reference. | Required |
Command Example
GitHub-create-branch branch_name=new-branch-example commit_sha=8a67a078139498f3e8e1bd2e26ffc5a2fea1b918
Human Readable Output
Branch "new-branch-example" Created Successfully
10. Get details of a team membership
Retrieves details of a user's team membership.
Base Command
GitHub-get-team-membership
Input
Argument Name | Description | Required |
---|---|---|
team-id | The ID number by which the team is identified. Execute the GitHub-list-teams command to find team IDs to reference. | Required |
user_name | The name of the user whose membership you want to check. | Required |
Context Output
Path | Type | Description |
---|---|---|
GitHub.Team.Member.Role | String | The user's role in the team. |
GitHub.Team.Member.State | String | The user's state in the 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
Context Example
{ "GitHub.Team": { "ID": 3043448, "Role": "member", "State": "active", "Login": "example-user2" } }
Human Readable Output
Team Membership of example-user2
ID | Role | State | Login |
---|---|---|---|
3043448 | member | active | example-user2 |
11. Request a review for a pull request
Requests reviews from GitHub users for a pull request.
Base Command
GitHub-request-review
Input
Argument Name | Description | Required |
---|---|---|
pull_number | The number of the pull request that you wish to request a review. | Required |
reviewers | A CSV list of GitHub users to request a review 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 a review. |
GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for a review. |
GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for a review. |
GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for a review. |
GitHub.PR.RequestedReviewer.SiteAdmin | Boolean | Whether the user who is requested for review is a site administrator. |
Command Example
!GitHub-request-review pull_number=1 reviewers=example-user1
Context Example
{ "GitHub.PR": { "Number": 1, "RequestedReviewer": [ { "ID": 30797606, "Login": "example-user3", "NodeID": "MDQ6VXNlcjMwNzk3NjA2", "SiteAdmin": false, "Type": "User" }, { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } ] } }
Human Readable Output
Requested Reviewers for #1
ID | Login | NodeID | SiteAdmin | Type |
---|---|---|---|---|
30797606 | example-user3 | MDQ6VXNlcjMwNzk3NjA2 | false | User |
55035720 | example-user1 | MDQ6VXNlcjU1MDM1NzIw | false | User |
12. Create a comment
Creates a comment in the Github issue.
Base Command
GitHub-create-comment
Input
Argument Name | Description | Required |
---|---|---|
issue_number | The number of the Pull Request for which to request a review. | Required |
body | The contents of the message. | Required |
Context Output
Path | Type | Description |
---|---|---|
GitHub.Comment.IssueNumber | Number | The number of the issue in 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 administrator. |
Command Example
!GitHub-create-comment issue_number=1 body="Look this comment was made using the GitHub integration"
Context Example
{ "GitHub.Comment": { "Body": "Look this comment was made using the GitHub integration", "ID": 532700206, "IssueNumber": 1, "NodeID": "MDEyOklzc3VlQ29tbWVudDUzMjcwMDIwNg==", "User": { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } } }
Human Readable Output
Created Comment
Body | ID | IssueNumber | NodeID | User |
---|---|---|---|---|
Look this comment was made using the GitHub integration | 532700206 | 1 | MDEyOklzc3VlQ29tbWVudDUzMjcwMDIwNg== |
Login: example-user1
ID: 55035720 NodeID: MDQ6VXNlcjU1MDM1NzIw Type: User SiteAdmin: false |
13. List comments in an issue
Lists all comments in a Github Issue.
Base Command
GitHub-list-issue-comments
Input
Argument Name | Description | Required |
---|---|---|
issue_number | The number of the issue in which to list comments. | Required |
Context Output
Path | Type | Description |
---|---|---|
GitHub.Comment.IssueNumber | Number | The number of the issue in 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 administrator. |
Command Example
!GitHub-list-issue-comments issue_number=1
Context Example
{ "GitHub.Comment": [ { "Body": "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. ", "ID": 530276333, "IssueNumber": 1, "NodeID": "MDEyOklzc3VlQ29tbWVudDUzMDI3NjMzMw==", "User": { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } }, { "Body": "what about my pr eh", "ID": 530313678, "IssueNumber": 1, "NodeID": "MDEyOklzc3VlQ29tbWVudDUzMDMxMzY3OA==", "User": { "ID": 46294017, "Login": "example-user4", "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "SiteAdmin": false, "Type": "User" } }, { "Body": "@example-user4 can we close?", "ID": 530774162, "IssueNumber": 1, "NodeID": "MDEyOklzc3VlQ29tbWVudDUzMDc3NDE2Mg==", "User": { "ID": 30797606, "Login": "example-user3", "NodeID": "MDQ6VXNlcjMwNzk3NjA2", "SiteAdmin": false, "Type": "User" } }, { "Body": "Look this comment was made using the GitHub integration", "ID": 532700206, "IssueNumber": 1, "NodeID": "MDEyOklzc3VlQ29tbWVudDUzMjcwMDIwNg==", "User": { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } } ] }
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 |
14. List pull request files
List all pull request files in Github.
Base Command
GitHub-list-pr-files
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.File.SHA | String | The SHA hash for the last commit included in the associated 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 in the file. |
Command Example
!GitHub-list-pr-files pull_number=1
Context Example
{ "GitHub.PR": { "File": [ { "Additions": 4, "Changes": 4, "Deletions": 0, "Name": "TEST.md", "SHA": "4e7fd23b44ef46ebd04a9812dda55cecb487fcbe", "Status": "added" } ], "Number": "1" } }
Human Readable Output
Pull Request Files for #1
Additions | Changes | Deletions | Name | SHA | Status |
---|---|---|---|---|---|
4 | 4 | 0 | TEST.md | 4e7fd23b44ef46ebd04a9812dda55cecb487fcbe | added |
15. List reviews on a pull request
List review comments 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 review. |
GitHub.PR.Review.State | String | The state of the review. |
GitHub.PR.Review.User.Login | String | The user login of the reviewer. |
GitHub.PR.Review.User.ID | Number | The user ID of the reviewer. |
GitHub.PR.Review.User.NodeID | String | The Node ID of the reviewer. |
GitHub.PR.Review.User.Type | String | The user type of the reviewer. |
GitHub.PR.Review.User.SiteAdmin | Boolean | Whether the reviewer is a site administrator. |
Command Example
!GitHub-list-pr-reviews pull_number=1
Context Example
{ "GitHub.PR": { "Number": "1", "Review": [ { "Body": "review comment", "CommitID": "b6cf0431e2aea2b345ea1d66d18aa72be63936a9", "ID": 287327154, "NodeID": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3Mjg3MzI3MTU0", "State": "COMMENTED", "User": { "ID": 31018228, "Login": "example-user2", "NodeID": "MDQ6VXNlcjMxMDE4MjI4", "SiteAdmin": false, "Type": "User" } } ] } }
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 |
16. Get the contents of a commit
Retrieves the contents of a commit reference.
Base Command
GitHub-get-commit
Input
Argument Name | Description | Required |
---|---|---|
commit_sha |
The SHA hash of the commit. Execute 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 date of the commit author. |
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 commiter 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 the 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 the commit was or was not verified. |
GitHub.Commit.Verification.Signature | Unknown | The verification signature of the commit. |
GitHub.Commit.Verification.Payload | Unknown | The verification payload of the commit. |
Command Example
!GitHub-get-commit commit_sha=8a67a078139498f3e8e1bd2e26ffc5a2fea1b918
Context Example
{ "GitHub.Commit": { "Author": { "Date": "2019-09-16T15:42:43Z", "Email": "55035720example.user1@users.noreply.github.com", "Name": "example-user1" }, "Committer": { "Date": "2019-09-16T15:42:43Z", "Email": "noreply@github.com", "Name": "GitHub" }, "Message": "Update config.yml", "Parent": [ { "SHA": "d6bafef5a0021a6d9ab0a22e11bd0afd5801d936" } ], "SHA": "8a67a078139498f3e8e1bd2e26ffc5a2fea1b918", "TreeSHA": "42fdb6c89538099a141e94fabe4bbc58098f4d90", "Verification": { "Payload": "tree 42fdb6c89538099a141e94fabe4bbc58098f4d90\nparent d6bafef5a0021a6d9ab0a22e11bd0afd5801d936\nauthor example-user1 <55035720example.user1@users.noreply.github.com> 1568648563 +0300\ncommitter GitHub <noreply@github.com> 1568648563 +0300\n\nUpdate config.yml", "Reason": "valid", "Signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJ****************************sIKrPT2jUSWyzfu5wnu\noWz7+2KMdaglV****************************M08HXTm\na9eO/ahlodARkgH/bWjulomeO+jDEgbZenlPUrBnX136QzPPqgl4uvxfquAOj1/a\na89YtPAFh2X1+1q7pl5dVtZfYpo6mYJoY9dwVpDRbLoVHJRa1wnqEv4kxRHrrRL9\nmGWSMHqK8I6j9zXi4niod8pQpl0k4O/2SlNh81RyeILEYb587Zs1XGuIYQEDrcAf\nu+FURxEHSuT4yaZ+oBwhhcIsmsWQMGkfABbwo1Fi2BMtEgZpzd/TScNg1KeSrVI=\n=dWrz\n-----END PGP SIGNATURE-----\n", "Verified": true } } }
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 |
17. Add a label to an issue
Add labels to a Github Issue.
Base Command
GitHub-add-label
Input
Argument Name | Description | Required |
---|---|---|
issue_number | The number of the issue in which to add labels. | Required |
labels | A CSV list of labels to add to an issue. | Required |
Command Example
!GitHub-add-label issue_number=1 labels=Content
Human Readable Output
Label "Content" Successfully Added to Issue #1
18. Get a pull request
Retrieves a pull request from the Github repository.
Base Command
GitHub-get-pull-request
Input
Argument Name | Description | Required |
---|---|---|
pull_number | The number of the pull request to retrieve. | 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 a review. |
GitHub.PR.RequestedReviewer.ID | Number | The ID of the user requested for a review. |
GitHub.PR.RequestedReviewer.NodeID | String | The node ID of the user requested for a review. |
GitHub.PR.RequestedReviewer.Type | String | The type of the user requested for a 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 a review. |
GitHub.PR.RequestedTeam.NodeID | String | The node ID of the team requested for a review. |
GitHub.PR.RequestedTeam.Name | String | The name of the team requested for a review. |
GitHub.PR.RequestedTeam.Slug | String | The slug of the team requested for a review. |
GitHub.PR.RequestedTeam.Description | String | The description of the team requested for a review. |
GitHub.PR.RequestedTeam.Privacy | String | The privacy setting of the team requested for a review. |
GitHub.PR.RequestedTeam.Permission | String | The permissions of the team requested for a review. |
GitHub.PR.RequestedTeam.Parent | Unknown | The parent of the team requested for a review. |
GitHub.PR.Head.Label | String | The label of the branch for which the HEAD points. |
GitHub.PR.Head.Ref | String | The reference of the branch for which the HEAD points. |
GitHub.PR.Head.SHA | String | The SHA hash of the commit for which the HEAD points. |
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 committer Node ID 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 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 login of the committer of the commit for which the base branch points. |
GitHub.PR.Base.User.ID | Number | The committer ID of the commit for which the base branch points. |
GitHub.PR.Base.User.NodeID | String | The committer Node ID of the commit that the base branch points. |
GitHub.PR.Base.User.Type | String | The committer user type of the commit that the base branch points. |
GitHub.PR.Base.User.SiteAdmin | Boolean | Whether the committer of the commit that the base branch points to is a site administrator. |
GitHub.PR.Base.Repo.ID | Number | The ID of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.NodeID | String | The Node ID of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.Name | String | The name of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.FullName | String | The full name of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.Owner.Login | String | The user login of the owner of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.Owner.ID | Number | The user ID of the owner of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.Owner.NodeID | String | The user node ID of the owner of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.Owner.Type | String | The user type of the owner of the repository for which the base branch belongs. |
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 for which the base branch belongs to is private. |
GitHub.PR.Base.Repo.Description | String | The description of the repository for which the base branch belongs. |
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 for which the base branch belongs. |
GitHub.PR.Base.Repo.ForksCount | Number | The number of times that the repository for which the base branch belongs to has been forked. |
GitHub.PR.Base.Repo.StargazersCount | Number | The number of times that the repository for which the base branch belongs has been starred. |
GitHub.PR.Base.Repo.WatchersCount | Number | The number of entities watching the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.Size | Number | The size of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.DefaultBranch | String | The default branch of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.OpenIssuesCount | Number | The number of open issues in the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.Topics | String | Topics listed for the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.HasIssues | Boolean | Whether the repository for which the base branch belongs has issues. |
GitHub.PR.Base.Repo.HasProjects | Boolean | Whether the repository for which the base branch belongs to has projects. |
GitHub.PR.Base.Repo.HasWiki | Boolean | Whether the repository for which the base branch belongs has a wiki. |
GitHub.PR.Base.Repo.HasPages | Boolean | Whether the repository for which the base branch belongs to has pages. |
GitHub.PR.Base.Repo.HasDownloads | Boolean | Whether the repository for which the base branch belongs has downloads. |
GitHub.PR.Base.Repo.Archived | Boolean | Whether the repository for which the base branch belongs to is archived. |
GitHub.PR.Base.Repo.Disabled | Boolean | Whether the repository for which the base branch belongs to is disabled. |
GitHub.PR.Base.Repo.PushedAt | String | The date that the repository for which the base branch belongs to was last pushed. |
GitHub.PR.Base.Repo.CreatedAt | String | The date of creation of the repository for which the base branch belongs. |
GitHub.PR.Base.Repo.UpdatedAt | String | The date that the repository for which 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 for which 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. |
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-get-pull-request pull_number=1
Context Example
{ "GitHub.PR": { "ActiveLockReason": null, "Additions": 4, "AuthorAssociation": "FIRST_TIME_CONTRIBUTOR", "Base": { "Label": "example-user1:master", "Ref": "master", "Repo": { "AllowMergeCommit": null, "AllowRebaseMerge": null, "AllowSquashMerge": null, "Archived": false, "CreatedAt": "2019-09-11T06:59:20Z", "DefaultBranch": "master", "Description": "This repository contains all Demisto content and from here we share content updates", "Disabled": false, "Fork": true, "ForksCount": 0, "FullName": "example-user1/content", "HasDownloads": true, "HasIssues": false, "HasPages": false, "HasProjects": true, "HasWiki": false, "ID": 207744685, "Language": "Python", "Name": "content", "NodeID": "MDEwOlJlcG9zaXRvcnkyMDc3NDQ2ODU=", "OpenIssuesCount": 10, "Owner": { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" }, "Private": false, "PushedAt": "2019-09-18T14:05:43Z", "Size": 96530, "StargazersCount": 0, "SucscribersCount": null, "Topics": null, "UpdatedAt": "2019-09-16T15:42:46Z", "WatchersCount": 0 }, "SHA": "b27ea6ac9836d2e756b44eb1d66f02d3d4299362", "User": { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } }, "Body": "\r\n\r\n## Status\r\nReady/In Progress/In Hold(Reason for hold)\r\n\r\n## Related Issues\r\nfixes: link to the issue\r\n\r\n## Description\r\nA few sentences describing the overall goals of the pull request's commits.\r\n\r\n## Screenshots\r\nPaste here any images that will help the reviewer\r\n\r\n## Related PRs\r\nList related PRs against other branches:\r\n\r\nbranch | PR\r\n------ | ------\r\n\r\n\r\n## Required version of Demisto\r\nx.x.x\r\n\r\n## Does it break backward compatibility?\r\n - Yes\r\n - Further details:\r\n - No\r\n\r\n## Must have\r\n- [ ] Tests\r\n- [ ] Documentation (with link to it)\r\n- [ ] Code Review\r\n\r\n## Dependencies\r\nMention the dependencies of the entity you changed as given from the precommit hooks in checkboxes, and tick after tested them.\r\n- [ ] Dependency 1\r\n- [ ] Dependency 2\r\n- [ ] Dependency 3\r\n\r\n## Additional changes\r\nDescribe additional changes done, for example adding a function to common server.\r\n", "ChangedFiles": 1, "ClosedAt": null, "Comments": 5, "Commits": 4, "CreatedAt": "2019-09-11T07:06:26Z", "Deletions": 0, "Draft": null, "Head": { "Label": "example-user4:patch-1", "Ref": "patch-1", "Repo": { "AllowMergeCommit": null, "AllowRebaseMerge": null, "AllowSquashMerge": null, "Archived": false, "CreatedAt": "2019-08-29T10:18:15Z", "DefaultBranch": "master", "Description": "This repository contains all Demisto content and from here we share content updates", "Disabled": false, "Fork": true, "ForksCount": 2, "FullName": "example-user4/content", "HasDownloads": true, "HasIssues": false, "HasPages": false, "HasProjects": true, "HasWiki": false, "ID": 205137013, "Language": "Python", "Name": "content", "NodeID": "MDEwOlJlcG9zaXRvcnkyMDUxMzcwMTM=", "OpenIssuesCount": 2, "Owner": { "ID": 46294017, "Login": "example-user4", "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "SiteAdmin": false, "Type": "User" }, "Private": false, "PushedAt": "2019-09-16T15:43:54Z", "Size": 95883, "StargazersCount": 0, "SucscribersCount": null, "Topics": null, "UpdatedAt": "2019-08-29T10:18:18Z", "WatchersCount": 0 }, "SHA": "c01238eea80e35bb76a5c51ac0c95eba4010d8e5", "User": { "ID": 46294017, "Login": "example-user4", "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "SiteAdmin": false, "Type": "User" } }, "ID": 316303415, "Label": [ { "Color": null, "Default": false, "Description": null, "ID": 1563600288, "Name": "Content", "NodeID": "MDU6TGFiZWwxNTYzNjAwMjg4" }, { "Color": null, "Default": false, "Description": null, "ID": 1549466359, "Name": "Contribution", "NodeID": "MDU6TGFiZWwxNTQ5NDY2MzU5" }, { "Color": null, "Default": true, "Description": null, "ID": 1549411616, "Name": "bug", "NodeID": "MDU6TGFiZWwxNTQ5NDExNjE2" } ], "Locked": false, "MaintainerCanModify": true, "MergeCommitSHA": "5714b1359b9d7549c89c35fe9fdc266a3db3b766", "Mergeable": true, "MergeableState": "unstable", "Merged": false, "MergedAt": null, "NodeID": "MDExOlB1bGxSZXF1ZXN0MzE2MzAzNDE1", "Number": 1, "Rebaseable": true, "RequestedReviewer": [ { "ID": 30797606, "Login": "example-user3", "NodeID": "MDQ6VXNlcjMwNzk3NjA2", "SiteAdmin": false, "Type": "User" }, { "ID": 55035720, "Login": "example-user1", "NodeID": "MDQ6VXNlcjU1MDM1NzIw", "SiteAdmin": false, "Type": "User" } ], "ReviewComments": 0, "State": "open", "UpdatedAt": "2019-09-18T14:05:51Z", "User": { "ID": 46294017, "Login": "example-user4", "NodeID": "MDQ6VXNlcjQ2Mjk0MDE3", "SiteAdmin": false, "Type": "User" } } }
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} |
PR
## Required version of Demisto
## Does it break backward compatibility?
## Must have
## Dependencies
## Additional changes
|
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 |
19. GitHub-list-teams
List 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
Context Example
{ "GitHub.Team": [ { "Description": "Review our magnificent SDK", "ID": 2084761, "Name": "SDK", "NodeID": "MDQ6VGVhbTIwODQ3NjE=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "sdk" }, { "Description": "Sales engineering", "ID": 2086953, "Name": "SEs & SAs", "NodeID": "MDQ6VGVhbTIwODY5NTM=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "ses-sas" }, { "Description": "Our customer success great again team", "ID": 2276670, "Name": "customer-success", "NodeID": "MDQ6VGVhbTIyNzY2NzA=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "customer-success" }, { "Description": "", "ID": 2615431, "Name": "content-admin", "NodeID": "MDQ6VGVhbTI2MTU0MzE=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "content-admin" }, { "Description": "Our fantastic tech writers", "ID": 2944746, "Name": "tech writers", "NodeID": "MDQ6VGVhbTI5NDQ3NDY=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "tech-writers" }, { "Description": "Contractors for customer success team", "ID": 2973057, "Name": "cs-contractors", "NodeID": "MDQ6VGVhbTI5NzMwNTc=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "cs-contractors" }, { "Description": "Our beloved content team ", "ID": 3043448, "Name": "Content", "NodeID": "MDQ6VGVhbTMwNDM0NDg=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "content" }, { "Description": "Our lovely dev-ops team", "ID": 3054683, "Name": "dev-ops", "NodeID": "MDQ6VGVhbTMwNTQ2ODM=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "dev-ops" }, { "Description": "Our sales team", "ID": 3086506, "Name": "Sales", "NodeID": "MDQ6VGVhbTMwODY1MDY=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "sales" }, { "Description": "SOC 2 team", "ID": 3199605, "Name": "soc2", "NodeID": "MDQ6VGVhbTMxOTk2MDU=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "soc2" }, { "Description": "", "ID": 3235143, "Name": "mobile", "NodeID": "MDQ6VGVhbTMyMzUxNDM=", "Parent": null, "Permission": "pull", "Privacy": "closed", "Slug": "mobile" } ] }
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 |
20. Delete a branch
Deletes a branch of the repository.
Base Command
GitHub-delete-branch
Input
Argument Name | Description | Required |
---|---|---|
branch_name | The name of the branch to delete. | Required |
Command Example
!GitHub-delete-branch branch_name=new-branch-example
Human Readable Output
Branch "new-branch-example" Deleted Successfully