Skip to main content

GitHub

Integration to GitHub API.

Configure GitHub on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.

  2. Search for GitHub.

  3. Click Add instance to create and configure a new integration instance.

    ParameterRequired
    Fetch incidentsFalse
    API TokenFalse
    CredentialsFalse
    Username of the repository owner, for example: github.com/repos/{owner}/{repo}/issuesFalse
    The name of the requested repositoryFalse
    First fetch interval (in days)False
    Use system proxy settingsFalse
    Trust any certificate (not secure)False
    Incident typeFalse
    GitHub app integration IDFalse
    GitHub app installation IDFalse
  4. 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#


Creates an issue in GitHub.

Base Command#

GitHub-create-issue

Input#

Argument NameDescriptionRequired
titleThe title of the issue.Required
bodyThe contents of the issue.Optional
labelsLabels to associate with this issue.Optional
assigneesLogins for Users to assign to this issue.Optional

Context Output#

PathTypeDescription
GitHub.Issue.IDNumberThe ID of the created issue.
GitHub.Issue.RepositoryStringThe repository of the created issue.
GitHub.Issue.TitleStringThe title of the created issue.
GitHub.Issue.BodyUnknownThe body of the created issue.
GitHub.Issue.StateStringThe state of the created issue.
GitHub.Issue.LabelsStringLabels applied to the issue.
GitHub.Issue.AssigneesStringUsers assigned to this issue.
GitHub.Issue.Created_atDateDate when the issue was created.
GitHub.Issue.Updated_atDateDate when the issue was last updated.
GitHub.Issue.Closed_atDateDate when the issue was closed.
GitHub.Issue.Closed_byStringUser who closed the issue.
GitHub.Issue.OrganizationStringThe repository owner.

Command Example#

!GitHub-create-issue title=“newbug” body=“found a new bug” lable=bug,new

Human Readable Output#

Issues:#

IDRepositoryOrganizationTitleStateBodyCreated_atUpdated_at
138Git-Integrationdemisto“newbug”open“found2019-06-17T15:14:10Z2019-06-17T15:14:10Z

GitHub-close-issue#


Closes an existing issue.

Base Command#

GitHub-close-issue

Input#

Argument NameDescriptionRequired
IDThe number of the issue to close.Required

Context Output#

PathTypeDescription
GitHub.Issue.IDNumberThe ID of the closed issue.
GitHub.Issue.RepositoryStringThe repository of the closed issue.
GitHub.Issue.TitleStringThe title of the closed issue
GitHub.Issue.BodyUnknownThe body of the closed issue.
GitHub.Issue.StateStringThe state of the closed issue.
GitHub.Issue.LabelsStringLabels applied to the issue.
GitHub.Issue.AssigneesStringUsers assigned to the issue.
GitHub.Issue.Created_atDateDate when the issue was created.
GitHub.Issue.Updated_atDateDate when the issue was last updated.
GitHub.Issue.Closed_atDateDate when the issue was closed.
GitHub.Issue.Closed_byStringUser who closed the issue.
GitHub.Issue.OrganizationStringThe repository owner.

Command Example#

!GitHub-close-issue ID=136

Human Readable Output#

Issues:#

IDRepositoryOrganizationTitleStateCreated_atUpdated_atClosed_atClosed_byLabels
136Git-Integrationdemistonewclosed2019-06-17T14:48:15Z2019-06-17T15:14:12Z2019-06-17T15:14:12Zroysagibug, else, new

GitHub-update-issue#


Updates the parameters of a specified issue.

Base Command#

GitHub-update-issue

Input#

Argument NameDescriptionRequired
IDThe number of the issue to update.Required
titleThe title of the issue.Optional
bodyThe contents of the issue.Optional
stateState of the issue. Either open or closed.Optional
labelsLabels 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
assigneesLogins 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#

PathTypeDescription
GitHub.Issue.IDNumberThe ID of the updated issue.
GitHub.Issue.RepositoryStringThe repository of the updated issue.
GitHub.Issue.TitleStringThe title of the updated issue.
GitHub.Issue.BodyUnknownThe body of the updated issue.
GitHub.Issue.StateStringThe state of the updated issue.
GitHub.Issue.LabelsStringLabels applied to the issue.
GitHub.Issue.AssigneesStringUsers assigned to the issue.
GitHub.Issue.Created_atDateDate when the issue was created.
GitHub.Issue.Updated_atDateDate when the issue was last updated.
GitHub.Issue.Closed_atDateDate when the issue was closed.
GitHub.Issue.Closed_byStringUser who closed the issue.
GitHub.Issue.OrganizationStringThe repository owner.

Command Example#

!GitHub-update-issue ID=137 title=“new_title” body=“new info” state=open

Human Readable Output#

Issues:#

IDRepositoryOrganizationTitleStateBodyCreated_atUpdated_at
137Git-Integrationdemisto“new_title”open“new2019-06-17T15:09:50Z2019-06-17T15:14:13Z

GitHub-list-all-issues#


Lists all issues that the user has access to view.

Base Command#

GitHub-list-all-issues

Input#

Argument NameDescriptionRequired
stateThe 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
limitThe number of issues to return. Default is 50. Maximum is 200. Default is 50.Optional

Context Output#

PathTypeDescription
GitHub.Issue.IDNumberThe ID of the issue.
GitHub.Issue.RepositoryStringThe repository of the issue.
GitHub.Issue.TitleStringThe title of the issue.
GitHub.Issue.BodyUnknownThe body of the issue.
GitHub.Issue.StateStringThe state of the issue.
GitHub.Issue.LabelsStringLabels applied to the issue.
GitHub.Issue.AssigneesStringUsers assigned to the issue.
GitHub.Issue.Created_atDateDate when the issue was created.
GitHub.Issue.Updated_atDateDate when the issue was last updated.
GitHub.Issue.Closed_atDateDate when the issue was closed.
GitHub.Issue.Closed_byStringUser who closed the issue.
GitHub.Issue.OrganizationStringThe repository owner.

Command Example#

!GitHub-list-all-issues state=all limit=2

Human Readable Output#

Issues:#

IDRepositoryOrganizationTitleStateBodyCreated_atUpdated_atClosed_atLabels
109Git-Integrationdemisto"new issue"closed"new information"2019-06-04T11:52:11Z2019-06-04T11:52:13Z2019-06-04T11:52:13Znewbug
110Git-Integrationdemisto"new issue"closed"new information"2019-06-04T11:53:19Z2019-06-04T11:53:22Z2019-06-04T11:53:22Znewbug

GitHub-search-code#


Searches for code in repositories that match a given query.

Base Command#

GitHub-search-code

Input#

Argument NameDescriptionRequired
queryThe 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_numberThe page number.Optional
page_sizeThe size of the requested page. Maximum is 100.Optional
limitThe number of results to return. Default is 50.Optional

Context Output#

PathTypeDescription
GitHub.CodeSearchResults.nameStringThe file name where the code found.
GitHub.CodeSearchResults.pathStringThe full file path where the code found.
GitHub.CodeSearchResults.html_urlStringThe url to the file.
GitHub.CodeSearchResults.repository.full_nameStringThe repository name.
GitHub.CodeSearchResults.repository.html_urlStringThe url to the repository.
GitHub.CodeSearchResults.repository.descriptionStringRepository description.
GitHub.CodeSearchResults.repository.privateBooleanTrue if repository is private. and false if public.
GitHub.CodeSearchResults.repository.idStringThe ID of the repository.
GitHub.CodeSearchResults.repository.releases_urlStringThe url to the releases of the repository.
GitHub.CodeSearchResults.repository.branches_urlStringThe url to the branches of the repository.
GitHub.CodeSearchResults.repository.commits_urlStringThe 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.#

NamePathRepository NameRepository DescriptionIs Repository Private
.pre-commit-config.yaml.pre-commit-config.yamldemisto/demisto-sdkDemisto SDK - Create Demisto Content with ease and efficiencyfalse
content_create_artifacts_integration_test.pydemisto_sdk/tests/integration_tests/content_create_artifacts_integration_test.pydemisto/demisto-sdkDemisto SDK - Create Demisto Content with ease and efficiencyfalse
content_artifacts_creator_test.pydemisto_sdk/commands/create_artifacts/tests/content_artifacts_creator_test.pydemisto/demisto-sdkDemisto SDK - Create Demisto Content with ease and efficiencyfalse
pack_metadata_test.pydemisto_sdk/commands/common/content/tests/objects/pack_objects/pack_metadata/pack_metadata_test.pydemisto/demisto-sdkDemisto SDK - Create Demisto Content with ease and efficiencyfalse
content_artifacts_creator_test.pydemisto_sdk/commands/create_artifacts/tests/content_artifacts_creator_test.pydemisto/demisto-sdkDemisto SDK - Create Demisto Content with ease and efficiencyfalse

GitHub-search-issues#


Searches for and returns issues that match a given query.

Base Command#

GitHub-search-issues

Input#

Argument NameDescriptionRequired
queryThe 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
limitThe number of issues to return. Default is 50. Maximum is 100. Default is 50.Optional

Context Output#

PathTypeDescription
GitHub.Issue.IDNumberThe ID of the issue.
GitHub.Issue.RepositoryStringThe repository of the issue.
GitHub.Issue.TitleStringThe title of the issue.
GitHub.Issue.BodyUnknownThe body of the issue.
GitHub.Issue.StateStringThe state of the issue.
GitHub.Issue.LabelsStringLabels applied to the issue.
GitHub.Issue.AssigneesStringUsers assigned to the issue.
GitHub.Issue.Created_atDateDate when the issue was created.
GitHub.Issue.Updated_atDateDate when the issue was last updated.
GitHub.Issue.Closed_atDateDate when the issue was closed.
GitHub.Issue.Closed_byStringUser who closed the issue.
GitHub.Issue.OrganizationStringThe repository owner.

Command Example#

!GitHub-search-issues query=“label:bug state:open” limit=1

Human Readable Output#

Issues:#

IDRepositoryOrganizationTitleStateBodyCreated_atUpdated_atClosed_atAssigneesLabels
109Git-Integrationdemisto"new issue"open"new information"2019-06-04T11:52:11Z2019-06-04T11:52:13Z2019-06-04T11:52:13Zteizenmannewbug

GitHub-get-download-count#


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#

PathTypeDescription
GitHub.Release.IDNumberID of the release.
GitHub.Release.Download_countNumberDownload count for the release.
GitHub.Release.NameStringName of the release.
GitHub.Release.BodyStringBody of the release.
GitHub.Release.Created_atDateDate when the release was created.
GitHub.Release.Published_atDateDate when the release was published.

Command Example#

!GitHub-get-download-count

Human Readable Output#

Releases:#

IDNameDownload_countBodyCreated_atPublished_at
17519182anotherone5this is another release2019-05-22T15:00:51Z2019-05-22T15:06:48Z
17519007test1this is a test2019-05-22T15:00:51Z2019-05-22T15:02:16Z

GitHub-get-stale-prs#


Get inactive pull requests

Base Command#

GitHub-get-stale-prs

Input#

Argument NameDescriptionRequired
stale_timeTime of inactivity after which a PR is considered stale. Default is 3 days.Required
labelThe label used to identify PRs of interest.Optional

Context Output#

PathTypeDescription
GitHub.PR.URLStringThe html URL of the PR
GitHub.PR.NumberNumberThe GitHub pull request number
GitHub.PR.RequestedReviewerUnknownA list of the PR's requested reviewers

Command Example#

!GitHub-get-stale-prs stale_time="2 days"

Human Readable Output#

Stale PRs:#

NumberURL
18https://github.com/example-user1/content/pull/18
16https://github.com/example-user1/content/pull/16
15https://github.com/example-user1/content/pull/15
14https://github.com/example-user1/content/pull/14

GitHub-get-branch#


Get a branch

Base Command#

GitHub-get-branch

Input#

Argument NameDescriptionRequired
branch_nameThe name of the branch to retrieve.Required

Context Output#

PathTypeDescription
GitHub.Branch.NameStringThe name of the branch
GitHub.Branch.CommitSHAStringThe SHA of the commit the branch references
GitHub.Branch.CommitNodeIDStringThe Node ID of the commit the branch references
GitHub.Branch.CommitAuthorIDNumberThe GitHub ID number of the author of the commit the branch references
GitHub.Branch.CommitAuthorLoginStringThe GitHub login of the author of the commit the branch references
GitHub.Branch.CommitParentSHAStringThe SHAs of parent commits
GitHub.Branch.ProtectedBooleanWhether the branch is a protected one or not

Command Example#

!GitHub-get-pull-request pull_number=1

Human Readable Output#

Branch "master"#

CommitAuthorIDCommitAuthorLoginCommitNodeIDCommitParentSHACommitSHANameProtected
55035720example-user1MDY6Q29tbWl0MjA3NzQ0Njg1OjhhNjdhMDc4MTM5NDk4ZjNlOGUxYmQyZTI2ZmZjNWEyZmVhMWI5MTg=d6bafef5a0021a6d9ab0a22e11bd0afd5801d9368a67a078139498f3e8e1bd2e26ffc5a2fea1b918masterfalse

GitHub-create-branch#


Create a new branch

Base Command#

GitHub-create-branch

Input#

Argument NameDescriptionRequired
branch_nameThe name for the new branch.Required
commit_shaThe 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#


Retrieve a user's membership status with a team

Base Command#

GitHub-get-team-membership

Input#

Argument NameDescriptionRequired
team_idThe ID number by which the team is identified. Try executing the 'GitHub-list-teams' command to find team IDs to reference.Required
user_nameThe login of the user whose membership you wish to check.Required

Context Output#

PathTypeDescription
GitHub.Team.Member.RoleStringThe user's role on a team
GitHub.Team.Member.StateStringThe user's state for a team
GitHub.Team.IDNumberThe ID number of the team
GitHub.Team.Member.LoginStringThe 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#

IDRoleStateLogin
3043448memberactiveexample-user2

GitHub-request-review#


Request reviews from GitHub users for a given Pull Request

Base Command#

GitHub-request-review

Input#

Argument NameDescriptionRequired
pull_numberThe number of the Pull Request for which you wish to request review.Required
reviewersA CSV list of GitHub users to request review from for a Pull Request.Required

Context Output#

PathTypeDescription
GitHub.PR.NumberNumberThe number of the Pull Request
GitHub.PR.RequestedReviewer.LoginStringThe login of the user requested for review
GitHub.PR.RequestedReviewer.IDNumberThe ID of the user requested for review
GitHub.PR.RequestedReviewer.NodeIDStringThe node ID of the user requested for review
GitHub.PR.RequestedReviewer.TypeStringThe type of the user requested for review
GitHub.PR.RequestedReviewer.SiteAdminBooleanWhether the user requested for review is a site admin or not

Command Example#

!GitHub-request-review pull_number=1 reviewers=example-user1

Human Readable Output#

Requested Reviewers for #1#

IDLoginNodeIDSiteAdminType
30797606example-user3MDQ6VXNlcjMwNzk3NjA2falseUser
55035720example-user1MDQ6VXNlcjU1MDM1NzIwfalseUser

GitHub-create-comment#


Create a comment for a given issue

Base Command#

GitHub-create-comment

Input#

Argument NameDescriptionRequired
issue_numberThe number of the issue to comment on.Required
bodyThe contents of the comment.Required

Context Output#

PathTypeDescription
GitHub.Comment.IssueNumberNumberThe number of the issue to which the comment belongs
GitHub.Comment.IDNumberThe ID of the comment
GitHub.Comment.NodeIDStringThe node ID of the comment
GitHub.Comment.BodyStringThe body content of the comment
GitHub.Comment.User.LoginStringThe login of the user who commented
GitHub.Comment.User.IDNumberThe ID of the user who commented
GitHub.Comment.User.NodeIDStringThe node ID of the user who commented
GitHub.Comment.User.TypeStringThe type of the user who commented
GitHub.Comment.User.SiteAdminBooleanWhether the user who commented is a site admin or not

Command Example#

!GitHub-create-comment issue_number=1 body="Look this comment was made using the GitHub integration"

Human Readable Output#

Created Comment#

BodyIDIssueNumberNodeIDUser
Look this comment was made using the GitHub integration5327002061MDEyOklzc3VlQ29tbWVudDUzMjcwMDIwNg==Login: example-user1 ID: 55035720 NodeID: MDQ6VXNlcjU1MDM1NzIw Type: User SiteAdmin: false

GitHub-list-issue-comments#


List comments on an issue

Base Command#

GitHub-list-issue-comments

Input#

Argument NameDescriptionRequired
issue_numberThe number of the issue to list comments for.Required

Context Output#

PathTypeDescription
GitHub.Comment.IssueNumberNumberThe number of the issue to which the comment belongs
GitHub.Comment.IDNumberThe ID of the comment
GitHub.Comment.NodeIDStringThe node ID of the comment
GitHub.Comment.BodyStringThe body content of the comment
GitHub.Comment.User.LoginStringThe login of the user who commented
GitHub.Comment.User.IDNumberThe ID of the user who commented
GitHub.Comment.User.NodeIDStringThe node ID of the user who commented
GitHub.Comment.User.TypeStringThe type of the user who commented
GitHub.Comment.User.SiteAdminBooleanWhether the user who commented is a site admin or not

Command Example#

!GitHub-list-issue-comments issue_number=1

Human Readable Output#

Comments for Issue #1#

BodyIDIssueNumberNodeIDUser
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.5302763331MDEyOklzc3VlQ29tbWVudDUzMDI3NjMzMw==Login: example-user1 ID: 55035720 NodeID: MDQ6VXNlcjU1MDM1NzIw Type: User SiteAdmin: false
what about my pr eh5303136781MDEyOklzc3VlQ29tbWVudDUzMDMxMzY3OA==Login: example-user4 ID: 46294017 NodeID: MDQ6VXNlcjQ2Mjk0MDE3 Type: User SiteAdmin: false
@example-user4 can we close?5307741621MDEyOklzc3VlQ29tbWVudDUzMDc3NDE2Mg==Login: example-user3 ID: 30797606 NodeID: MDQ6VXNlcjMwNzk3NjA2 Type: User SiteAdmin: false
Look this comment was made using the GitHub integration5327002061MDEyOklzc3VlQ29tbWVudDUzMjcwMDIwNg==Login: example-user1 ID: 55035720 NodeID: MDQ6VXNlcjU1MDM1NzIw Type: User SiteAdmin: false

GitHub-list-pr-files#


Lists the pull request files.

Base Command#

GitHub-list-pr-files

Input#

Argument NameDescriptionRequired
pull_numberThe number of the pull request.Required
organizationThe name of the organization.Optional
repositoryThe repository of the pull request.Optional

Context Output#

PathTypeDescription
GitHub.PR.NumberNumberThe number of the pull request
GitHub.PR.File.SHAStringThe SHA hash of the last commit involving the file.
GitHub.PR.File.NameStringThe name of the file.
GitHub.PR.File.StatusStringThe status of the file.
GitHub.PR.File.AdditionsNumberThe number of additions to the file.
GitHub.PR.File.DeletionsNumberThe number of deletions in the file.
GitHub.PR.File.ChangesNumberThe number of changes made in the file.

Command Example#

!GitHub-list-pr-files pull_number=1

Human Readable Output#

Pull Request Files for #1#

AdditionsChangesDeletionsNameSHAStatus
440TEST.md4e7fd23b44ef46ebd04a9812dda55cecb487fcbeadded

GitHub-list-pr-reviews#


List reviews on a pull request

Base Command#

GitHub-list-pr-reviews

Input#

Argument NameDescriptionRequired
pull_numberThe number of the pull request.Required

Context Output#

PathTypeDescription
GitHub.PR.NumberNumberThe number of the pull request
GitHub.PR.Review.IDNumberThe ID of the review
GitHub.PR.Review.NodeIDStringThe node ID of the review
GitHub.PR.Review.BodyStringThe content of the review
GitHub.PR.Review.CommitIDStringThe ID of the commit for which the review is applicable
GitHub.PR.Review.StateStringThe state of the review
GitHub.PR.Review.User.LoginStringThe reviewer's user login
GitHub.PR.Review.User.IDNumberThe reviewer's user ID
GitHub.PR.Review.User.NodeIDStringThe reviewer's user node ID
GitHub.PR.Review.User.TypeStringThe reviewer user type
GitHub.PR.Review.User.SiteAdminBooleanWhether the reviewer is a site admin or not

Command Example#

!GitHub-list-pr-reviews pull_number=1

Human Readable Output#

Pull Request Reviews for #1#

BodyCommitIDIDNodeIDStateUser
review commentb6cf0431e2aea2b345ea1d66d18aa72be63936a9287327154MDE3OlB1bGxSZXF1ZXN0UmV2aWV3Mjg3MzI3MTU0COMMENTEDLogin: example-user2 ID: 31018228 NodeID: MDQ6VXNlcjMxMDE4MjI4 Type: User SiteAdmin: false

GitHub-get-commit#


Get a commit

Base Command#

GitHub-get-commit

Input#

Argument NameDescriptionRequired
commit_shaThe SHA hash of the commit. Try executing the 'GitHub-get-branch' command to find a commit SHA hash to reference.Required

Context Output#

PathTypeDescription
GitHub.Commit.SHAStringThe SHA hash of the commit
GitHub.Commit.Author.DateStringThe commit author date
GitHub.Commit.Author.NameStringThe name of the author
GitHub.Commit.Author.EmailStringThe email of the author
GitHub.Commit.Committer.DateStringThe date the commiter committed
GitHub.Commit.Committer.NameStringThe name of the committer
GitHub.Commit.Committer.EmailStringThe email of the committer
GitHub.Commit.MessageStringThe message associated with the commit
GitHub.Commit.ParentUnknownList of parent SHA hashes
GitHub.Commit.TreeSHAStringThe SHA hash of the commit's tree
GitHub.Commit.Verification.VerifiedBooleanWhether the commit was verified or not
GitHub.Commit.Verification.ReasonStringThe reason why the commit was or was not verified
GitHub.Commit.Verification.SignatureUnknownThe commit verification signature
GitHub.Commit.Verification.PayloadUnknownThe commit verification payload

Command Example#

!GitHub-get-commit commit_sha=8a67a078139498f3e8e1bd2e26ffc5a2fea1b918

Human Readable Output#

Commit 8a67a07813#

AuthorCommitterMessageParentSHATreeSHAVerification
Date: 2019-09-16T15:42:43Z Name: example-user1 Email: 55035720example.user1@users.noreply.github.comDate: 2019-09-16T15:42:43Z Name: GitHub Email: noreply@github.comUpdate config.yml{'SHA': 'd6bafef5a0021a6d9ab0a22e11bd0afd5801d936'}8a67a078139498f3e8e1bd2e26ffc5a2fea1b91842fdb6c89538099a141e94fabe4bbc58098f4d90Verified: 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#


Add labels to an issue

Base Command#

GitHub-add-label

Input#

Argument NameDescriptionRequired
issue_numberThe number of the issue to add labels to.Required
labelsA 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#


Get a pull request

Base Command#

GitHub-get-pull-request

Input#

Argument NameDescriptionRequired
pull_numberThe number of the pull request to retrieve.Required
organizationThe name of the organization.Optional
repositoryThe repository of the pull request.Optional

Context Output#

PathTypeDescription
GitHub.PR.IDNumberThe ID number of the pull request
GitHub.PR.NodeIDStringThe node ID of the pull request
GitHub.PR.NumberNumberThe issue number of the pull request
GitHub.PR.StateStringThe state of the pull request
GitHub.PR.LockedBooleanWhether the pull request is locked or not
GitHub.PR.TitleStringThe title of the pull request
GitHub.PR.User.LoginStringThe login of the user who opened the pull request
GitHub.PR.User.IDNumberThe ID of the user who opened the pull request
GitHub.PR.User.NodeIDStringThe node ID of the user who opened the pull request
GitHub.PR.User.TypeStringThe type of the user who opened the pull request
GitHub.PR.User.SiteAdminBooleanWhether the user who opened the pull request is a site admin or not
GitHub.PR.BodyStringThe body content of the pull request
GitHub.PR.Label.IDNumberThe ID of the label
GitHub.PR.Label.NodeIDStringThe node ID of the label
GitHub.PR.Label.NameStringThe name of the label
GitHub.PR.Label.DescriptionStringThe description of the label
GitHub.PR.Label.ColorStringThe hex color value of the label
GitHub.PR.Label.DefaultBooleanWhether the label is a default or not
GitHub.PR.Milestone.IDNumberThe ID of the milestone
GitHub.PR.Milestone.NodeIDStringThe node ID of the milestone
GitHub.PR.Milestone.NumberNumberThe number of the milestone
GitHub.PR.Milestone.StateStringThe state of the milestone
GitHub.PR.Milestone.TitleStringThe title of the milestone
GitHub.PR.Milestone.DescriptionStringThe description of the milestone
GitHub.PR.Milestone.Creator.LoginStringThe login of the milestone creator
GitHub.PR.Milestone.Creator.IDNumberThe ID the milestone creator
GitHub.PR.Milestone.Creator.NodeIDStringThe node ID of the milestone creator
GitHub.PR.Milestone.Creator.TypeStringThe type of the milestone creator
GitHub.PR.Milestone.Creator.SiteAdminBooleanWhether the milestone creator is a site admin or not
GitHub.PR.Milestone.OpenIssuesNumberThe number of open issues with this milestone
GitHub.PR.Milestone.ClosedIssuesNumberThe number of closed issues with this milestone
GitHub.PR.Milestone.CreatedAtStringThe date the milestone was created
GitHub.PR.Milestone.UpdatedAtStringThe date the milestone was updated
GitHub.PR.Milestone.ClosedAtStringThe date the milestone was closed
GitHub.PR.Milestone.DueOnStringThe due date for the milestone
GitHub.PR.ActiveLockReasonStringThe reason the pull request is locked
GitHub.PR.CreatedAtStringThe date the pull request was created
GitHub.PR.UpdatedAtStringThe date the pull request was updated
GitHub.PR.ClosedAtStringThe date the pull request was closed
GitHub.PR.MergedAtStringThe date the pull request was merged
GitHub.PR.MergeCommitSHAStringThe SHA hash of the pull request's merge commit
GitHub.PR.Assignee.LoginStringThe login of the user assigned to the pull request
GitHub.PR.Assignee.IDNumberThe ID of the user assigned to the pull request
GitHub.PR.Assignee.NodeIDStringThe node ID of the user assigned to the pull request
GitHub.PR.Assignee.TypeStringThe type of the user assigned to the pull request
GitHub.PR.Assignee.SiteAdminBooleanWhether the user assigned to the pull request is a site admin or not
GitHub.PR.RequestedReviewer.LoginStringThe login of the user requested for review
GitHub.PR.RequestedReviewer.IDNumberThe ID of the user requested for review
GitHub.PR.RequestedReviewer.NodeIDStringThe node ID of the user requested for review
GitHub.PR.RequestedReviewer.TypeStringThe type of the user requested for review
GitHub.PR.RequestedReviewer.SiteAdminBooleanWhether the user requested for review is a site admin or not
GitHub.PR.RequestedTeam.IDNumberThe ID of the team requested for review
GitHub.PR.RequestedTeam.NodeIDStringThe node ID of the team requested for review
GitHub.PR.RequestedTeam.NameStringThe name of the team requested for review
GitHub.PR.RequestedTeam.SlugStringThe slug of the team requested for review
GitHub.PR.RequestedTeam.DescriptionStringThe description of the team requested for review
GitHub.PR.RequestedTeam.PrivacyStringThe privacy setting of the team requested for review
GitHub.PR.RequestedTeam.PermissionStringThe permissions of the team requested for review
GitHub.PR.RequestedTeam.ParentUnknownThe parent of the team requested for review
GitHub.PR.Head.LabelStringThe label of the branch that HEAD points to
GitHub.PR.Head.RefStringThe reference of the branch that HEAD points to
GitHub.PR.Head.SHAStringThe SHA hash of the commit that HEAD points to
GitHub.PR.Head.User.LoginStringThe login of the committer of the HEAD commit of the checked out branch
GitHub.PR.Head.User.IDNumberThe ID of the committer of the HEAD commit of the checked out branch
GitHub.PR.Head.User.NodeIDStringThe node ID of the committer of the HEAD commit of the checked out branch
GitHub.PR.Head.User.TypeStringThe type of the committer of the HEAD commit of the checked out branch
GitHub.PR.Head.User.SiteAdminBooleanWhether the committer of the HEAD commit of the checked out branch is a site admin or not
GitHub.PR.Head.Repo.IDNumberThe ID of the repository of the checked out branch
GitHub.PR.Head.Repo.NodeIDStringThe node ID of the repository of the checked out branch
GitHub.PR.Head.Repo.NameStringThe name of the repository of the checked out branch
GitHub.PR.Head.Repo.FullNameStringThe full name of the repository of the checked out branch
GitHub.PR.Head.Repo.Owner.LoginStringThe user login of the owner of the repository of the checked out branch
GitHub.PR.Head.Repo.Owner.IDNumberThe user ID of the owner of the repository of the checked out branch
GitHub.PR.Head.Repo.Owner.NodeIDStringThe user node ID of the owner of the repository of the checked out branch
GitHub.PR.Head.Repo.Owner.TypeStringThe user type of the owner of the repository of the checked out branch
GitHub.PR.Head.Repo.Owner.SiteAdminBooleanWhether the owner of the repository of the checked out branch is a site admin or not
GitHub.PR.Head.Repo.PrivateBooleanWhether the repository of the checked out branch is private or not
GitHub.PR.Head.Repo.DescriptionStringThe description of the repository of the checked out branch
GitHub.PR.Head.Repo.ForkBooleanWhether the repository of the checked out branch is a fork or not
GitHub.PR.Head.Repo.LanguageUnknownThe language of the repository of the checked out branch
GitHub.PR.Head.Repo.ForksCountNumberThe number of forks of the repository of the checked out branch
GitHub.PR.Head.Repo.StargazersCountNumberThe number of stars of the repository of the checked out branch
GitHub.PR.Head.Repo.WatchersCountNumberThe number of entities watching the repository of the checked out branch
GitHub.PR.Head.Repo.SizeNumberThe size of the repository of the checked out branch
GitHub.PR.Head.Repo.DefaultBranchStringThe default branch of the repository of the checked out branch
GitHub.PR.Head.Repo.OpenIssuesCountNumberThe open issues of the repository of the checked out branch
GitHub.PR.Head.Repo.TopicsUnknownTopics listed for the repository of the checked out branch
GitHub.PR.Head.Repo.HasIssuesBooleanWhether the repository of the checked out branch has issues or not
GitHub.PR.Head.Repo.HasProjectsBooleanWhether the repository of the checked out branch has projects or not
GitHub.PR.Head.Repo.HasWikiBooleanWhether the repository of the checked out branch has a wiki or not
GitHub.PR.Head.Repo.HasPagesBooleanWhether the repository of the checked out branch has pages or not
GitHub.PR.Head.Repo.HasDownloadsBooleanWhether the repository of the checked out branch has downloads or not
GitHub.PR.Head.Repo.ArchivedBooleanWhether the repository of the checked out branch has been arvhived or not
GitHub.PR.Head.Repo.DisabledBooleanWhether the repository of the checked out branch has been disabled or not
GitHub.PR.Head.Repo.PushedAtStringThe date of the latest push to the repository of the checked out branch
GitHub.PR.Head.Repo.CreatedAtStringThe date of creation of the repository of the checked out branch
GitHub.PR.Head.Repo.UpdatedAtStringThe date the repository of the checked out branch was last updated
GitHub.PR.Head.Repo.AllowRebaseMergeBooleanWhether the repository of the checked out branch permits rebase-style merges or not
GitHub.PR.Head.Repo.AllowSquashMergeBooleanWhether the repository of the checked out branch permits squash merges or not
GitHub.PR.Head.Repo.AllowMergeCommitBooleanWhether the repository of the checked out branch permits merge commits or not
GitHub.PR.Head.Repo.SubscribersCountNumberThe number of entities subscribing to the repository of the checked out branch
GitHub.PR.Base.LabelStringThe label of the base branch
GitHub.PR.Base.RefStringThe reference of the base branch
GitHub.PR.Base.SHAStringThe SHA hash of the base branch
GitHub.PR.Base.User.LoginStringThe login of the committer of the commit that the base branch points to
GitHub.PR.Base.User.IDNumberThe ID of the committer of the commit that the base branch points to
GitHub.PR.Base.User.NodeIDStringThe node ID of the committer of the commit that the base branch points to
GitHub.PR.Base.User.TypeStringThe user type of the committer of the commit that the base branch points to
GitHub.PR.Base.User.SiteAdminBooleanWhether the committer of the commit that the base branch points to is a site admin or not
GitHub.PR.Base.Repo.IDNumberThe ID of the repository that the base branch belongs to
GitHub.PR.Base.Repo.NodeIDStringThe node ID of the repository that the base branch belongs to
GitHub.PR.Base.Repo.NameStringThe name of the repository that the base branch belongs to
GitHub.PR.Base.Repo.FullNameStringThe full name of the repository that the base branch belongs to
GitHub.PR.Base.Repo.Owner.LoginStringThe user login of the owner of the repository that the base branch belongs to
GitHub.PR.Base.Repo.Owner.IDNumberThe user ID of the owner of the repository that the base branch belongs to
GitHub.PR.Base.Repo.Owner.NodeIDStringThe user node ID of the owner of the repository that the base branch belongs to
GitHub.PR.Base.Repo.Owner.TypeStringThe user type of the owner of the repository that the base branch belongs to
GitHub.PR.Base.Repo.Owner.SiteAdminBooleanWhether the owner of the repository that the base branch belongs to is a site admin or not
GitHub.PR.Base.Repo.PrivateBooleanWhether the repository that the base branch belongs to is private or not
GitHub.PR.Base.Repo.DescriptionStringThe description of the repository that the base branch belongs to
GitHub.PR.Base.Repo.ForkBooleanWhether the repository that the base branch belongs to is a fork or not
GitHub.PR.Base.Repo.LanguageUnknownThe language of the repository that the base branch belongs to
GitHub.PR.Base.Repo.ForksCountNumberThe number of times that the repository that the base branch belongs to has been forked
GitHub.PR.Base.Repo.StargazersCountNumberThe number of times that the repository that the base branch belongs to has been starred
GitHub.PR.Base.Repo.WatchersCountNumberThe number of entities watching the repository that the base branch belongs to
GitHub.PR.Base.Repo.SizeNumberThe size of the repository that the base branch belongs to
GitHub.PR.Base.Repo.DefaultBranchStringThe default branch of the repository that the base branch belongs to
GitHub.PR.Base.Repo.OpenIssuesCountNumberThe number of open issues in the repository that the base branch belongs to
GitHub.PR.Base.Repo.TopicsStringTopics listed for the repository that the base branch belongs to
GitHub.PR.Base.Repo.HasIssuesBooleanWhether the repository that the base branch belongs to has issues or not
GitHub.PR.Base.Repo.HasProjectsBooleanWhether the repository that the base branch belongs to has projects or not
GitHub.PR.Base.Repo.HasWikiBooleanWhether the repository that the base branch belongs to has a wiki or not
GitHub.PR.Base.Repo.HasPagesBooleanWhether the repository that the base branch belongs to has pages or not
GitHub.PR.Base.Repo.HasDownloadsBooleanWhether the repository that the base branch belongs to has downloads or not
GitHub.PR.Base.Repo.ArchivedBooleanWhether the repository that the base branch belongs to is archived or not
GitHub.PR.Base.Repo.DisabledBooleanWhether the repository that the base branch belongs to is disabled or not
GitHub.PR.Base.Repo.PushedAtStringThe date that the repository that the base branch belongs to was last pushed to
GitHub.PR.Base.Repo.CreatedAtStringThe date of creation of the repository that the base branch belongs to
GitHub.PR.Base.Repo.UpdatedAtStringThe date that the repository that the base branch belongs to was last updated
GitHub.PR.Base.Repo.AllowRebaseMergeBooleanWhether the repository that the base branch belongs to allows rebase-style merges or not
GitHub.PR.Base.Repo.AllowSquashMergeBooleanWhether the repository that the base branch belongs to allows squash merges or not
GitHub.PR.Base.Repo.AllowMergeCommitBooleanWhether the repository that the base branch belongs to allows merge commits or not
GitHub.PR.Base.Repo.SubscribersCountNumberThe number of entities that subscribe to the repository that the base branch belongs to
GitHub.PR.AuthorAssociationStringThe pull request author association
GitHub.PR.DraftBooleanWhether the pull request is a draft or not
GitHub.PR.MergedBooleanWhether the pull request is merged or not
GitHub.PR.MergeableBooleanWhether the pull request is mergeable or not
GitHub.PR.RebaseableBooleanWhether the pull request is rebaseable or not
GitHub.PR.MergeableStateStringThe mergeable state of the pull request
GitHub.PR.MergedBy.LoginStringThe login of the user who merged the pull request
GitHub.PR.MergedBy.IDNumberThe ID of the user who merged the pull request
GitHub.PR.MergedBy.NodeIDStringThe node ID of the user who merged the pull request
GitHub.PR.MergedBy.TypeStringThe type of the user who merged the pull request
GitHub.PR.MergedBy.SiteAdminBooleanWhether the user who merged the pull request is a site admin or not
GitHub.PR.CommentsNumberThe number of comments on the pull request
GitHub.PR.ReviewCommentsNumberThe number of review comments on the pull request
GitHub.PR.MaintainerCanModifyBooleanWhether the maintainer can modify the pull request or not
GitHub.PR.CommitsNumberThe number of commits in the pull request
GitHub.PR.AdditionsNumberThe number of additions in the pull request
GitHub.PR.DeletionsNumberThe number of deletions in the pull request
GitHub.PR.ChangedFilesNumberThe number of changed files in the pull request

Command Example#

!GitHub-get-pull-request pull_number=1

Human Readable Output#

Pull Request #1#

AdditionsAuthorAssociationBaseBodyChangedFilesCommentsCommitsCreatedAtDeletionsHeadIDLabelLockedMaintainerCanModifyMergeCommitSHAMergeableMergeableStateMergedNodeIDNumberRebaseableRequestedReviewerReviewCommentsStateUpdatedAtUser
4FIRST_TIME_CONTRIBUTORLabel: 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.1542019-09-11T07:06:26Z0Label: 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}falsetrue5714b1359b9d7549c89c35fe9fdc266a3db3b766trueunstablefalseMDExOlB1bGxSZXF1ZXN0MzE2MzAzNDE11true{'Login': 'example-user3', 'ID': 30797606, 'NodeID': 'MDQ6VXNlcjMwNzk3NjA2', 'Type': 'User', 'SiteAdmin': False}, {'Login': 'example-user1', 'ID': 55035720, 'NodeID': 'MDQ6VXNlcjU1MDM1NzIw', 'Type': 'User', 'SiteAdmin': False}0open2019-09-18T14:05:51ZLogin: example-user4 ID: 46294017 NodeID: MDQ6VXNlcjQ2Mjk0MDE3 Type: User SiteAdmin: false

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 NameDescriptionRequired
organizationThe name of the organization.Required

Context Output#

PathTypeDescription
GitHub.Team.IDNumberThe ID of the team
GitHub.Team.NodeIDStringThe node ID of the team
GitHub.Team.NameStringThe name of the team
GitHub.Team.SlugStringThe slug of the team
GitHub.Team.DescriptionStringThe description of the team
GitHub.Team.PrivacyStringThe privacy setting of the team
GitHub.Team.PermissionStringThe permissions of the team
GitHub.Team.ParentUnknownThe parent of the team

Command Example#

!GitHub-list-teams organization=demisto

Human Readable Output#

Teams for Organization "demisto"#

DescriptionIDNameNodeIDPermissionPrivacySlug
Our customer success team2276690customer-successMDQ6VGVhbTIyNzY2NzA=pullclosedcustomer-success
Our beloved content team3043998ContentMDQ6VGVhbTMwNDM0NDg=pullclosedcontent

GitHub-delete-branch#


Delete a branch

Base Command#

GitHub-delete-branch

Input#

Argument NameDescriptionRequired
branch_nameThe 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#


Lists all the review comments for a pull request.

Base Command#

GitHub-list-pr-review-comments

Input#

Argument NameDescriptionRequired
pull_numberThe issue number of the pull request.Required

Context Output#

PathTypeDescription
GitHub.PR.NumberNumberThe issue number of the pull request.
GitHub.PR.ReviewComment.IDNumberThe ID number of the pull request review comment.
GitHub.PR.ReviewComment.NodeIDStringThe Node ID of the pull request review comment.
GitHub.PR.ReviewComment.PullRequestReviewIDNumberThe ID of the pull request review.
GitHub.PR.ReviewComment.DiffHunkStringThe diff hunk for which the review comment applies.
GitHub.PR.ReviewComment.PathStringThe file path of the proposed file changes for which the review comment applies.
GitHub.PR.ReviewComment.PositionNumberThe position of the change for which the review comment applies.
GitHub.PR.ReviewComment.OriginalPositionNumberThe original position of the change for which the review comment applies.
GitHub.PR.ReviewComment.CommitIDStringThe commit ID of the proposed change.
GitHub.PR.ReviewComment.OriginalCommitIDStringThe commit ID of the commit before the proposed change.
GitHub.PR.ReviewComment.InReplyToIDNumberThe reply ID of the comment for which the review comment applies.
GitHub.PR.ReviewComment.User.LoginStringThe login of the user who created the review comment.
GitHub.PR.ReviewComment.User.IDNumberThe ID of the user who created the review comment.
GitHub.PR.ReviewComment.User.NodeIDStringThe Node ID of the user who created the review comment.
GitHub.PR.ReviewComment.User.TypeStringThe type of the user who created the review comment.
GitHub.PR.ReviewComment.User.SiteAdminBooleanWhether the user who created the review comment is a site administrator. or not
GitHub.PR.ReviewComment.BodyStringThe body content of the review comment.
GitHub.PR.ReviewComment.CreatedAtStringThe time the review comment was created.
GitHub.PR.ReviewComment.UpdatedAtStringThe time the review comment was updated.
GitHub.PR.ReviewComment.AuthorAssociationStringThe 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#

AuthorAssociationBodyCommitIDCreatedAtDiffHunkIDNodeIDOriginalCommitIDOriginalPositionPathPositionPullRequestReviewIDUpdatedAtUser
COLLABORATORChange it1af17e73721dbe0c40011b82ed4bb1a7dbe3ce292021-04-08T11:00:21Z@@ -9,7 +9,7 @@ "url": "some url" } ], - "another key": [ + "fixed key": [609573611df35047fffd38a65b8fe6963579254e8b09db25e1234567890==df35047fffd38a65b8fe6963579254e8b09db25e5file.json56312569172021-04-08T11:00:28ZLogin: teizenman ID: 50326704 NodeID: MDQ6VXNlcjUwMzI2NzA0 Type: User SiteAdmin: false

GitHub-update-pull-request#


Updates a pull request in a repository.

Base Command#

GitHub-update-pull-request

Input#

Argument NameDescriptionRequired
titleThe new title of the pull request.Optional
bodyThe new body content of the pull request.Optional
stateThe new state of the pull request. Can be "open", or "closed". Possible values are: open, closed.Optional
baseThe name of the branch that you want your changes pulled, which 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_modifyIndicates whether maintainers can modify the pull request. Possible values are: true, false.Optional
pull_numberThe issue number of the pull request for which to modify.Required

Context Output#

PathTypeDescription
GitHub.PR.IDNumberThe ID number of the pull request.
GitHub.PR.NodeIDStringThe Node ID of the pull request.
GitHub.PR.NumberNumberThe issue number of the pull request.
GitHub.PR.StateStringThe state of the pull request.
GitHub.PR.LockedBooleanWhether the pull request is locked.
GitHub.PR.TitleStringThe title of the pull request.
GitHub.PR.User.LoginStringThe login of the user who opened the pull request.
GitHub.PR.User.IDNumberThe ID of the user who opened the pull request.
GitHub.PR.User.NodeIDStringThe Node ID of the user who opened the pull request.
GitHub.PR.User.TypeStringThe type of the user who opened the pull request.
GitHub.PR.User.SiteAdminBooleanWhether the user who opened the pull request is a site administrator.
GitHub.PR.BodyStringThe body content of the pull request.
GitHub.PR.Label.IDNumberThe ID of the label.
GitHub.PR.Label.NodeIDStringThe Node ID of the label.
GitHub.PR.Label.NameStringThe name of the label.
GitHub.PR.Label.DescriptionStringThe description of the label.
GitHub.PR.Label.ColorStringThe hex color value of the label.
GitHub.PR.Label.DefaultBooleanWhether the label is a default.
GitHub.PR.Milestone.IDNumberThe ID of the milestone.
GitHub.PR.Milestone.NodeIDStringThe Node ID of the milestone.
GitHub.PR.Milestone.NumberNumberThe number of the milestone.
GitHub.PR.Milestone.StateStringThe state of the milestone.
GitHub.PR.Milestone.TitleStringThe title of the milestone.
GitHub.PR.Milestone.DescriptionStringThe description of the milestone.
GitHub.PR.Milestone.Creator.LoginStringThe login of the milestone creator.
GitHub.PR.Milestone.Creator.IDNumberThe ID the milestone creator.
GitHub.PR.Milestone.Creator.NodeIDStringThe Node ID of the milestone creator.
GitHub.PR.Milestone.Creator.TypeStringThe type of the milestone creator.
GitHub.PR.Milestone.Creator.SiteAdminBooleanWhether the milestone creator is a site administrator.
GitHub.PR.Milestone.OpenIssuesNumberThe number of open issues with this milestone.
GitHub.PR.Milestone.ClosedIssuesNumberThe number of closed issues with this milestone.
GitHub.PR.Milestone.CreatedAtStringThe date the milestone was created.
GitHub.PR.Milestone.UpdatedAtStringThe date the milestone was updated.
GitHub.PR.Milestone.ClosedAtStringThe date the milestone was closed.
GitHub.PR.Milestone.DueOnStringThe due date for the milestone.
GitHub.PR.ActiveLockReasonStringThe reason the pull request is locked.
GitHub.PR.CreatedAtStringThe date the pull request was created.
GitHub.PR.UpdatedAtStringThe date the pull request was updated.
GitHub.PR.ClosedAtStringThe date the pull request was closed.
GitHub.PR.MergedAtStringThe date the pull request was merged.
GitHub.PR.MergeCommitSHAStringThe SHA hash of the pull request's merge commit.
GitHub.PR.Assignee.LoginStringThe login of the user assigned to the pull request.
GitHub.PR.Assignee.IDNumberThe ID of the user assigned to the pull request.
GitHub.PR.Assignee.NodeIDStringThe Node ID of the user assigned to the pull request.
GitHub.PR.Assignee.TypeStringThe type of the user assigned to the pull request.
GitHub.PR.Assignee.SiteAdminBooleanWhether the user assigned to the pull request is a site administrator. not
GitHub.PR.RequestedReviewer.LoginStringThe login of the user requested for review.
GitHub.PR.RequestedReviewer.IDNumberThe ID of the user requested for review.
GitHub.PR.RequestedReviewer.NodeIDStringThe Node ID of the user requested for review.
GitHub.PR.RequestedReviewer.TypeStringThe type of the user requested for review.
GitHub.PR.RequestedReviewer.SiteAdminBooleanWhether the user requested for review is a site administrator.
GitHub.PR.RequestedTeam.IDNumberThe ID of the team requested for review.
GitHub.PR.RequestedTeam.NodeIDStringThe Node ID of the team requested for review.
GitHub.PR.RequestedTeam.NameStringThe name of the team requested for review.
GitHub.PR.RequestedTeam.SlugStringThe slug of the team requested for review.
GitHub.PR.RequestedTeam.DescriptionStringThe description of the team requested for review.
GitHub.PR.RequestedTeam.PrivacyStringThe privacy setting of the team requested for review.
GitHub.PR.RequestedTeam.PermissionStringThe permissions of the team requested for review.
GitHub.PR.RequestedTeam.ParentUnknownThe parent of the team requested for review.
GitHub.PR.Head.LabelStringThe label of the branch for which the HEAD points.
GitHub.PR.Head.RefStringThe reference of the branch for which the HEAD points.
GitHub.PR.Head.SHAStringThe SHA hash of the commit for which the HEAD points.
GitHub.PR.Head.User.LoginStringThe committer login of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.IDNumberThe committer ID of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.NodeIDStringThe Node committer ID of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.TypeStringThe committer type of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.SiteAdminBooleanWhether the committer of the HEAD commit of the checked out branch is a site administrator.
GitHub.PR.Head.Repo.IDNumberThe ID of the repository of the checked out branch.
GitHub.PR.Head.Repo.NodeIDStringThe Node ID of the repository of the checked out branch.
GitHub.PR.Head.Repo.NameStringThe name of the repository of the checked out branch.
GitHub.PR.Head.Repo.FullNameStringThe full name of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.LoginStringThe user login of the owner of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.IDNumberThe user ID of the owner of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.NodeIDStringThe user node ID of the owner of the repository of the checked. out branch
GitHub.PR.Head.Repo.Owner.TypeStringThe user type of the owner of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.SiteAdminBooleanWhether the owner of the repository of the checked out branch is a site administrator.
GitHub.PR.Head.Repo.PrivateBooleanWhether the repository of the checked out branch is private.
GitHub.PR.Head.Repo.DescriptionStringThe description of the repository of the checked out branch.
GitHub.PR.Head.Repo.ForkBooleanWhether the repository of the checked out branch is a fork.
GitHub.PR.Head.Repo.LanguageUnknownThe language of the repository of the checked out branch.
GitHub.PR.Head.Repo.ForksCountNumberThe number of forks of the repository of the checked out branch.
GitHub.PR.Head.Repo.StargazersCountNumberThe number of stars of the repository of the checked out branch.
GitHub.PR.Head.Repo.WatchersCountNumberThe number of entities watching the repository of the checked out branch.
GitHub.PR.Head.Repo.SizeNumberThe size of the repository of the checked out branch.
GitHub.PR.Head.Repo.DefaultBranchStringThe default branch of the repository of the checked out branch.
GitHub.PR.Head.Repo.OpenIssuesCountNumberThe open issues of the repository of the checked out branch.
GitHub.PR.Head.Repo.TopicsUnknownTopics listed for the repository of the checked out branch.
GitHub.PR.Head.Repo.HasIssuesBooleanWhether the repository of the checked out branch has issues.
GitHub.PR.Head.Repo.HasProjectsBooleanWhether the repository of the checked out branch has projects.
GitHub.PR.Head.Repo.HasWikiBooleanWhether the repository of the checked out branch has a wiki.
GitHub.PR.Head.Repo.HasPagesBooleanWhether the repository of the checked out branch has pages.
GitHub.PR.Head.Repo.HasDownloadsBooleanWhether the repository of the checked out branch has downloads.
GitHub.PR.Head.Repo.ArchivedBooleanWhether the repository of the checked out branch has been archived.
GitHub.PR.Head.Repo.DisabledBooleanWhether the repository of the checked out branch has been disabled.
GitHub.PR.Head.Repo.PushedAtStringThe date of the latest push to the repository of the checked out branch.
GitHub.PR.Head.Repo.CreatedAtStringThe date of creation of the repository of the checked out branch.
GitHub.PR.Head.Repo.UpdatedAtStringThe date the repository of the checked out branch was last updated.
GitHub.PR.Head.Repo.AllowRebaseMergeBooleanWhether the repository of the checked out branch permits rebase-style merges.
GitHub.PR.Head.Repo.AllowSquashMergeBooleanWhether the repository of the checked out branch permits squash merges.
GitHub.PR.Head.Repo.AllowMergeCommitBooleanWhether the repository of the checked out branch permits merge commits.
GitHub.PR.Head.Repo.SubscribersCountNumberThe number of entities subscribing to the repository of the checked out branch.
GitHub.PR.Base.LabelStringThe label of the base branch.
GitHub.PR.Base.RefStringThe reference of the base branch.
GitHub.PR.Base.SHAStringThe SHA hash of the base branch.
GitHub.PR.Base.User.LoginStringThe committer login of the commit for which the base branch points.
GitHub.PR.Base.User.IDNumberThe ID of the committer of the commit for which the base branch points.
GitHub.PR.Base.User.NodeIDStringThe committer Node ID of the commit for which the base branch points.
GitHub.PR.Base.User.TypeStringThe user committer type of the commit for which the base branch points.
GitHub.PR.Base.User.SiteAdminBooleanWhether the committer of the commit for which the base branch points is a site administrator.
GitHub.PR.Base.Repo.IDNumberThe ID of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.NodeIDStringThe Node ID of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.NameStringThe name of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.FullNameStringThe full name of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.LoginStringThe user login of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.IDNumberThe user ID of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.NodeIDStringThe user node ID of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.TypeStringThe user type of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.SiteAdminBooleanWhether the owner of the repository for which the base branch belongs to is a site administrator.
GitHub.PR.Base.Repo.PrivateBooleanWhether the repository for which the base branch belongs is private.
GitHub.PR.Base.Repo.DescriptionStringThe description of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.ForkBooleanWhether the repository for which the base branch belongs to is a fork.
GitHub.PR.Base.Repo.LanguageUnknownThe language of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.ForksCountNumberThe number of times that the repository for which the base branch belongs has been forked.
GitHub.PR.Base.Repo.StargazersCountNumberThe number of times that the repository for which the base branch belongs has been starred.
GitHub.PR.Base.Repo.WatchersCountNumberThe number of entities watching the repository for which the base branch belongs.
GitHub.PR.Base.Repo.SizeNumberThe size of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.DefaultBranchStringThe default branch of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.OpenIssuesCountNumberThe number of open issues in the repository for which the base branch belongs.
GitHub.PR.Base.Repo.TopicsStringTopics listed for the repository for which the base branch belongs.
GitHub.PR.Base.Repo.HasIssuesBooleanWhether the repository for which the base branch belongs has issues.
GitHub.PR.Base.Repo.HasProjectsBooleanWhether the repository for which the base branch belongs has projects.
GitHub.PR.Base.Repo.HasWikiBooleanWhether the repository for which the base branch belongs has a wiki.
GitHub.PR.Base.Repo.HasPagesBooleanWhether the repository for which the base branch belongs to has pages.
GitHub.PR.Base.Repo.HasDownloadsBooleanWhether the repository for which the base branch belongs has downloads.
GitHub.PR.Base.Repo.ArchivedBooleanWhether the repository for which the base branch belongs is archived.
GitHub.PR.Base.Repo.DisabledBooleanWhether the repository for which the base branch belongs is disabled.
GitHub.PR.Base.Repo.PushedAtStringThe date that the repository for which the base branch belongs to was last pushed.
GitHub.PR.Base.Repo.CreatedAtStringThe date of creation of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.UpdatedAtStringThe date that the repository for which the base branch belongs was last updated.
GitHub.PR.Base.Repo.AllowRebaseMergeBooleanWhether the repository for which the base branch belongs allows rebase-style merges.
GitHub.PR.Base.Repo.AllowSquashMergeBooleanWhether the repository for which the base branch belongs allows squash merges.
GitHub.PR.Base.Repo.AllowMergeCommitBooleanWhether the repository for which the base branch belongs allows merge commits.
GitHub.PR.Base.Repo.SubscribersCountNumberThe number of entities for which subscribe to the repository that the base branch belongs.
GitHub.PR.AuthorAssociationStringThe pull request author association.
GitHub.PR.DraftBooleanWhether the pull request is a draft.
GitHub.PR.MergedBooleanWhether the pull request is merged.
GitHub.PR.MergeableBooleanWhether the pull request is mergeable.
GitHub.PR.RebaseableBooleanWhether the pull request is rebaseable.
GitHub.PR.MergeableStateStringThe mergeable state of the pull request.
GitHub.PR.MergedBy.LoginStringThe login of the user who merged the pull request.
GitHub.PR.MergedBy.IDNumberThe ID of the user who merged the pull request.
GitHub.PR.MergedBy.NodeIDStringThe Node ID of the user who merged the pull request.
GitHub.PR.MergedBy.TypeStringThe type of the user who merged the pull request.
GitHub.PR.MergedBy.SiteAdminBooleanWhether the user who merged the pull request is a site administrator.
GitHub.PR.CommentsNumberThe number of comments on the pull request.
GitHub.PR.ReviewCommentsNumberThe number of review comments on the pull request.
GitHub.PR.MaintainerCanModifyBooleanWhether the maintainer can modify the pull request.
GitHub.PR.CommitsNumberThe number of commits in the pull request.
GitHub.PR.AdditionsNumberThe number of additions in the pull request.
GitHub.PR.DeletionsNumberThe number of deletions in the pull request.
GitHub.PR.ChangedFilesNumberThe 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#

AdditionsAuthorAssociationBaseBodyChangedFilesCommentsCommitsCreatedAtDeletionsDraftHeadIDLockedMaintainerCanModifyMergeCommitSHAMergeableMergeableStateMergedNodeIDNumberRebaseableReviewCommentsStateUpdatedAtUser
1COLLABORATORLabel: 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}Changing1012021-04-08T10:59:27Z1falseLabel: 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}611450655falsefalse1af17e73721dbe0c40011b82ed4bb1a7dbe3ce29trueblockedfalse1af17e73721dbe0c40011b82ed4bb1a715true1open2021-04-08T11:08:14ZLogin: teizenman ID: 50326704 NodeID: MDQ6VXNlcjUwMzI2NzA0 Type: User SiteAdmin: false

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 NameDescriptionRequired
pull_numberThe 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#


Creates a new pull request.

Base Command#

GitHub-create-pull-request

Input#

Argument NameDescriptionRequired
titleThe title of the pull request.Required
headThe name of the branch where the changes are made.Required
baseThe name of the branch you want the changes pulled into, which must be an existing branch on the current repository.Required
bodyThe contents of the pull request.Optional
maintainer_can_modifyIndicates whether maintainers can modify the pull request. Possible values are: true, false.Optional
draftIndicates 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#

PathTypeDescription
GitHub.PR.IDNumberThe ID number of the pull request.
GitHub.PR.NodeIDStringThe Node ID of the pull request.
GitHub.PR.NumberNumberThe issue number of the pull request.
GitHub.PR.StateStringThe state of the pull request.
GitHub.PR.LockedBooleanWhether the pull request is locked.
GitHub.PR.TitleStringThe title of the pull request.
GitHub.PR.User.LoginStringThe login of the user who opened the pull request.
GitHub.PR.User.IDNumberThe ID of the user who opened the pull request.
GitHub.PR.User.NodeIDStringThe Node ID of the user who opened the pull request.
GitHub.PR.User.TypeStringThe user type who opened the pull request.
GitHub.PR.User.SiteAdminBooleanWhether the user who opened the pull request is a site administrator.
GitHub.PR.BodyStringThe body content of the pull request.
GitHub.PR.Label.IDNumberThe ID of the label.
GitHub.PR.Label.NodeIDStringThe Node ID of the label.
GitHub.PR.Label.NameStringThe name of the label.
GitHub.PR.Label.DescriptionStringThe description of the label.
GitHub.PR.Label.ColorStringThe hex color value of the label.
GitHub.PR.Label.DefaultBooleanWhether the label is a default.
GitHub.PR.Milestone.IDNumberThe ID of the milestone.
GitHub.PR.Milestone.NodeIDStringThe Node ID of the milestone.
GitHub.PR.Milestone.NumberNumberThe number of the milestone.
GitHub.PR.Milestone.StateStringThe state of the milestone.
GitHub.PR.Milestone.TitleStringThe title of the milestone.
GitHub.PR.Milestone.DescriptionStringThe description of the milestone.
GitHub.PR.Milestone.Creator.LoginStringThe login of the milestone creator.
GitHub.PR.Milestone.Creator.IDNumberThe ID the milestone creator.
GitHub.PR.Milestone.Creator.NodeIDStringThe Node ID of the milestone creator.
GitHub.PR.Milestone.Creator.TypeStringThe type of the milestone creator.
GitHub.PR.Milestone.Creator.SiteAdminBooleanWhether the milestone creator is a site administrator.
GitHub.PR.Milestone.OpenIssuesNumberThe number of open issues with this milestone.
GitHub.PR.Milestone.ClosedIssuesNumberThe number of closed issues with this milestone.
GitHub.PR.Milestone.CreatedAtStringThe date the milestone was created.
GitHub.PR.Milestone.UpdatedAtStringThe date the milestone was updated.
GitHub.PR.Milestone.ClosedAtStringThe date the milestone was closed.
GitHub.PR.Milestone.DueOnStringThe due date for the milestone.
GitHub.PR.ActiveLockReasonStringThe reason the pull request is locked.
GitHub.PR.CreatedAtStringThe date the pull request was created.
GitHub.PR.UpdatedAtStringThe date the pull request was updated.
GitHub.PR.ClosedAtStringThe date the pull request was closed.
GitHub.PR.MergedAtStringThe date the pull request was merged.
GitHub.PR.MergeCommitSHAStringThe SHA hash of the pull request's merge commit.
GitHub.PR.Assignee.LoginStringThe login of the user assigned to the pull request.
GitHub.PR.Assignee.IDNumberThe ID of the user assigned to the pull request.
GitHub.PR.Assignee.NodeIDStringThe Node ID of the user assigned to the pull request.
GitHub.PR.Assignee.TypeStringThe type of the user assigned to the pull request.
GitHub.PR.Assignee.SiteAdminBooleanWhether the user assigned to the pull request is a site administrator.
GitHub.PR.RequestedReviewer.LoginStringThe login of the user requested for review.
GitHub.PR.RequestedReviewer.IDNumberThe ID of the user requested for review.
GitHub.PR.RequestedReviewer.NodeIDStringThe Node ID of the user requested for review.
GitHub.PR.RequestedReviewer.TypeStringThe type of the user requested for review.
GitHub.PR.RequestedReviewer.SiteAdminBooleanWhether the user requested for review is a site administrator.
GitHub.PR.RequestedTeam.IDNumberThe ID of the team requested for review.
GitHub.PR.RequestedTeam.NodeIDStringThe Node ID of the team requested for review.
GitHub.PR.RequestedTeam.NameStringThe name of the team requested for review.
GitHub.PR.RequestedTeam.SlugStringThe slug of the team requested for review.
GitHub.PR.RequestedTeam.DescriptionStringThe description of the team requested for review.
GitHub.PR.RequestedTeam.PrivacyStringThe privacy setting of the team requested for review.
GitHub.PR.RequestedTeam.PermissionStringThe permissions of the team requested for review.
GitHub.PR.RequestedTeam.ParentUnknownThe parent of the team requested for review.
GitHub.PR.Head.LabelStringThe label of the branch for which the HEAD points.
GitHub.PR.Head.RefStringThe reference of the branch for which the HEAD points.
GitHub.PR.Head.SHAStringThe SHA hash of the commit for which the HEAD points.
GitHub.PR.Head.User.LoginStringThe committer login of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.IDNumberThe committer ID of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.NodeIDStringThe Node ID of the committer of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.TypeStringThe committer type of the HEAD commit of the checked out branch.
GitHub.PR.Head.User.SiteAdminBooleanWhether the committer of the HEAD commit of the checked out branch is a site administrator.
GitHub.PR.Head.Repo.IDNumberThe ID of the repository of the checked out branch.
GitHub.PR.Head.Repo.NodeIDStringThe Node ID of the repository of the checked out branch.
GitHub.PR.Head.Repo.NameStringThe name of the repository of the checked out branch.
GitHub.PR.Head.Repo.FullNameStringThe full name of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.LoginStringThe user login of the owner of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.IDNumberThe user ID of the owner of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.NodeIDStringThe user Node ID of the owner of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.TypeStringThe user type of the owner of the repository of the checked out branch.
GitHub.PR.Head.Repo.Owner.SiteAdminBooleanWhether the owner of the repository of the checked out branch is a site administrator.
GitHub.PR.Head.Repo.PrivateBooleanWhether the repository of the checked out branch is private.
GitHub.PR.Head.Repo.DescriptionStringThe description of the repository of the checked out branch.
GitHub.PR.Head.Repo.ForkBooleanWhether the repository of the checked out branch is a fork.
GitHub.PR.Head.Repo.LanguageUnknownThe language of the repository of the checked out branch.
GitHub.PR.Head.Repo.ForksCountNumberThe number of forks of the repository of the checked out branch.
GitHub.PR.Head.Repo.StargazersCountNumberThe number of stars of the repository of the checked out branch.
GitHub.PR.Head.Repo.WatchersCountNumberThe number of entities watching the repository of the checked out branch.
GitHub.PR.Head.Repo.SizeNumberThe size of the repository of the checked out branch.
GitHub.PR.Head.Repo.DefaultBranchStringThe default branch of the repository of the checked out branch.
GitHub.PR.Head.Repo.OpenIssuesCountNumberThe open issues of the repository of the checked out branch.
GitHub.PR.Head.Repo.TopicsUnknownTopics listed for the repository of the checked out branch.
GitHub.PR.Head.Repo.HasIssuesBooleanWhether the repository of the checked out branch has issues.
GitHub.PR.Head.Repo.HasProjectsBooleanWhether the repository of the checked out branch has projects.
GitHub.PR.Head.Repo.HasWikiBooleanWhether the repository of the checked out branch has a wiki.
GitHub.PR.Head.Repo.HasPagesBooleanWhether the repository of the checked out branch has pages.
GitHub.PR.Head.Repo.HasDownloadsBooleanWhether the repository of the checked out branch has downloads.
GitHub.PR.Head.Repo.ArchivedBooleanWhether the repository of the checked out branch has been archived.
GitHub.PR.Head.Repo.DisabledBooleanWhether the repository of the checked out branch has been disabled.
GitHub.PR.Head.Repo.PushedAtStringThe date of the latest push to the repository of the checked out.
GitHub.PR.Head.Repo.CreatedAtStringThe date of creation of the repository of the checked out branch.
GitHub.PR.Head.Repo.UpdatedAtStringThe date the repository of the checked out branch was last updated.
GitHub.PR.Head.Repo.AllowRebaseMergeBooleanWhether the repository of the checked out branch permits rebase-style merges.
GitHub.PR.Head.Repo.AllowSquashMergeBooleanWhether the repository of the checked out branch permits squash merges.
GitHub.PR.Head.Repo.AllowMergeCommitBooleanWhether the repository of the checked out branch permits merge commits.
GitHub.PR.Head.Repo.SubscribersCountNumberThe number of entities subscribing to the repository of the checked out.
GitHub.PR.Base.LabelStringThe label of the base branch.
GitHub.PR.Base.RefStringThe reference of the base branch.
GitHub.PR.Base.SHAStringThe SHA hash of the base branch.
GitHub.PR.Base.User.LoginStringThe committer login of the commit for which the base branch points.
GitHub.PR.Base.User.IDNumberThe ID of the committer of the commit for which the base branch points. to
GitHub.PR.Base.User.NodeIDStringThe committer Node ID of the commit for which the base branch points.
GitHub.PR.Base.User.TypeStringThe user type of the committer for which the commit base branch points.
GitHub.PR.Base.User.SiteAdminBooleanWhether the committer of the commit for which the base branch points to is a site administrator.
GitHub.PR.Base.Repo.IDNumberThe ID of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.NodeIDStringThe Node ID of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.NameStringThe name of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.FullNameStringThe full name of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.LoginStringThe user login of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.IDNumberThe user ID of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.NodeIDStringThe user node ID of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.TypeStringThe user type of the owner of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.Owner.SiteAdminBooleanWhether the owner of the repository that the base branch belongs to is a site administrator.
GitHub.PR.Base.Repo.PrivateBooleanWhether the repository for which the base branch belongs to is private.
GitHub.PR.Base.Repo.DescriptionStringThe description of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.ForkBooleanWhether the repository that the base branch belongs to is a fork.
GitHub.PR.Base.Repo.LanguageUnknownThe language of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.ForksCountNumberThe number of times that the repository for which the base branch belongs has been forked.
GitHub.PR.Base.Repo.StargazersCountNumberThe number of times that the repository that the base branch belongs to has been starred.
GitHub.PR.Base.Repo.WatchersCountNumberThe number of entities watching the repository for which the base branch belongs.
GitHub.PR.Base.Repo.SizeNumberThe size of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.DefaultBranchStringThe default branch of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.OpenIssuesCountNumberThe number of open issues in the repository for which the base branch belongs.
GitHub.PR.Base.Repo.TopicsStringTopics listed for the repository for which the base branch belongs.
GitHub.PR.Base.Repo.HasIssuesBooleanWhether the repository for which the base branch belongs to has issues.
GitHub.PR.Base.Repo.HasProjectsBooleanWhether the repository for which the base branch belongs to has projects.
GitHub.PR.Base.Repo.HasWikiBooleanWhether the repository for which the base branch belongs to has a wiki.
GitHub.PR.Base.Repo.HasPagesBooleanWhether the repository for which the base branch belongs to has pages.
GitHub.PR.Base.Repo.HasDownloadsBooleanWhether the repository for which the base branch belongs to has downloads.
GitHub.PR.Base.Repo.ArchivedBooleanWhether the repository for which the base branch belongs to is archived.
GitHub.PR.Base.Repo.DisabledBooleanWhether the repository for which the base branch belongs to is disabled.
GitHub.PR.Base.Repo.PushedAtStringThe date that the repository for which the base branch belongs was last pushed.
GitHub.PR.Base.Repo.CreatedAtStringThe date of creation of the repository for which the base branch belongs.
GitHub.PR.Base.Repo.UpdatedAtStringThe date that the repository for which the base branch belongs was last updated.
GitHub.PR.Base.Repo.AllowRebaseMergeBooleanWhether the repository for which the base branch belongs allows rebase-style merges.
GitHub.PR.Base.Repo.AllowSquashMergeBooleanWhether the repository for which the base branch belongs allows squash merges.
GitHub.PR.Base.Repo.AllowMergeCommitBooleanWhether the repository for which the base branch belongs allows merge commits.
GitHub.PR.Base.Repo.SubscribersCountNumberThe number of entities that subscribe to the repository for which the base branch belongs.
GitHub.PR.AuthorAssociationStringThe pull request author association.
GitHub.PR.DraftBooleanWhether the pull request is a draft.
GitHub.PR.MergedBooleanWhether the pull request is merged.
GitHub.PR.MergeableBooleanWhether the pull request is mergeable.
GitHub.PR.RebaseableBooleanWhether the pull request is rebaseable.
GitHub.PR.MergeableStateStringThe mergeable state of the pull request.
GitHub.PR.MergedBy.LoginStringThe login of the user who merged the pull request.
GitHub.PR.MergedBy.IDNumberThe ID of the user who merged the pull request.
GitHub.PR.MergedBy.NodeIDStringThe Node ID of the user who merged the pull request.
GitHub.PR.MergedBy.TypeStringThe user type who merged the pull request.
GitHub.PR.MergedBy.SiteAdminBooleanWhether the user who merged the pull request is a site administrator.
GitHub.PR.CommentsNumberThe number of comments on the pull request.
GitHub.PR.ReviewCommentsNumberThe number of review comments on the pull request.
GitHub.PR.MaintainerCanModifyBooleanWhether the maintainer can modify the pull request.
GitHub.PR.CommitsNumberThe number of commits in the pull request.
GitHub.PR.AdditionsNumberThe number of additions in the pull request.
GitHub.PR.DeletionsNumberThe number of deletions in the pull request.
GitHub.PR.ChangedFilesNumberThe 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#

AdditionsAuthorAssociationBaseChangedFilesCommentsCommitsCreatedAtDeletionsDraftHeadIDLockedMaintainerCanModifyMergeableStateMergedNodeIDNumberReviewCommentsStateUpdatedAtUser
1COLLABORATORLabel: 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}1012021-04-08T13:13:31Z1trueLabel: 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}611546693falsefalsedraftfalse1af17e73721dbe0c40011b82ed4bb1a7160open2021-04-08T13:13:31ZLogin: teizenman ID: 1234 NodeID: 1af17e73721dbe0c4001 Type: User SiteAdmin: false

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 NameDescriptionRequired
ownerThe repository owner.Required

Context Output#

PathTypeDescription
GitHub.ActionsUsage.RepositoryNameStringThe name of the private repository.
GitHub.ActionsUsage.WorkflowIDNumberThe workflow ID of the GitHub action.
GitHub.ActionsUsage.WorkflowNameStringThe display name of the GitHub action workflow.
GitHub.ActionsUsage.WorkflowUsageUnknownGitHub action worflow usage on different OS.

Command Example#

!Github-get-github-actions-usage owner=user

Human Readable Output#

Github Actions Usage#

RepositorynameWorkflowidWorkflownameWorkflowusage
Git-Repo12345An ActionUBUNTU: {"total_ms": 12345}

GitHub-get-file-content#


Gets the content of a file from GitHub.

Base Command#

GitHub-get-file-content

Input#

Argument NameDescriptionRequired
file_pathThe path of the file.Required
branch_nameThe branch name from which to get the file.Optional
media_typeThe 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_contentWhether to create a file entry in the War Room with the file contents. Possible values are: "true" and "false". Default value is "false".Optional

Context Output#

PathTypeDescription
GitHub.FileContent.PathStringThe path of the file.
GitHub.FileContent.ContentNumberThe content of the file.
GitHub.FileContent.MediaTypeStringThe media type in which the file was fetched.
GitHub.FileContent.BranchUnknownThe 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.#

BranchContentMediaTypePath
branch-testThis is the content of the filerawfile.json

Github-list-files#


Get list of files from the given path in the repository.

Base Command#

Github-list-files

Input#

Argument NameDescriptionRequired
pathThe path in the branch to get the files from.Optional
organizationThe name of the organization.Optional
repositoryThe name of the repository.Optional

Context Output#

PathTypeDescription
GitHub.File.NameStringThe name of the file.
GitHub.File.TypeStringWhether the item is file or directory.
GitHub.File.SizeNumberThe size of the file in bytes.
GitHub.File.PathStringThe file path inside the repository.
GitHub.File.DownloadUrlStringLink to download the file content.
GitHub.File.SHAStringThe SHA of the file.

Command Example#

!Github-list-files path=Index

Human Readable Output#

Files in path: Index#

NamePathTypeSizeDownloadUrl
README.mdIndex/README.mdfile1500https://raw.githubusercontent.com/demisto/hello-world/master/index/README.md
imagesIndex/imagesdir0

GitHub-list-team-members#


List team members.

Base Command#

GitHub-list-team-members

Input#

Argument NameDescriptionRequired
organizationThe name of the organization.Required
team_slugThe name of the team under the organiztion.Required
maximum_usersThe maximum number of users to returnOptional

Context Output#

PathTypeDescription
GitHub.TeamMember.IDStringThe ID of the team member.
GitHub.TeamMember.LoginStringThe login name of the team member.
GitHub.TeamMember.TeamStringThe 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 demisto#

IDLoginTeam
1234567user1content