github
Module github
API
Declarations
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_github_4.1.0.png)
ballerinax/github Ballerina library
Overview
This GitHub connector client module provides capability to perform operations on major resource types such as Repositories
, Issues
, Pull Requests
, Projects
etc.
This module supports GitHub API v4 version and only allows to perform functions behalf of the user who is currently logged in.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
-
Create account
-
Obtain token - To obtain a personal access token via which the connector can access the API, follow these steps
-
Configure the connector with obtained token
Quickstart
To use the GitHub connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
First, import the ballerinax/github
module into the Ballerina project as follows.
import ballerinax/github;
Step 2: Create a new connector instance
Create a github:ConnectionConfig
using your GitHub personal access token and and initialize the connector with it.
ithub:ConnectionConfig config = { auth: { token: "authToken" } ; ithub:Client githubClient = new (config);
Step 3: Invoke connector operation
- Get All Open Pull Requests In A Repository
stream<github:PullRequest,github:Error?> response = check githubClient->getPullRequests(<GitHub_Username>, <GitHub_Repository_Name>, github:PULL_REQUEST_OPEN);
- Use
bal run
command to compile and run the Ballerina program.
Clients![](/images/permalink.svg)
github: Client![](/images/permalink.svg)
Ballerina GitHub connector provides the capability to access GitHub GraphQL API. This connector lets you to get authorized access to GitHub data in a personal or organization account.
Constructor![](/images/permalink.svg)
Initialize the connector. During the initialization you have to pass Create a GitHub account and obtain tokens following this guid
init (ConnectionConfig config)
- config ConnectionConfig - Configurations required to initialize the
Client
getUser![](/images/permalink.svg)
Get user
Parameters
- username string? (default ()) - GitHub username
createRepository![](/images/permalink.svg)
function createRepository(CreateRepositoryInput createRepositoryInput) returns Error?
Create repository
Parameters
- createRepositoryInput CreateRepositoryInput - Create repository input
Return Type
- Error? -
github:Error
if not successful
updateRepository![](/images/permalink.svg)
function updateRepository(UpdateRepositoryInput updateRepositoryInput, string owner, string repositoryName) returns Error?
Update repository
Parameters
- updateRepositoryInput UpdateRepositoryInput - Update repository input
- owner string - Repository owner name
- repositoryName string - Repository name
Return Type
- Error? -
github:Error
if not successful
getRepository![](/images/permalink.svg)
function getRepository(string owner, string repositoryName) returns Repository|Error
Get repository
Return Type
- Repository|Error -
github:Repository
record if successful elsegithub:Error
getRepositories![](/images/permalink.svg)
function getRepositories(string? owner, boolean isOrganization) returns stream<Repository, Error?>|Error
Get repositories
Parameters
- owner string? (default ()) - Repository owner name
- isOrganization boolean (default false) - Represents if the owner is an organization or not
Return Type
- stream<Repository, Error?>|Error -
github:stream<Repository,Error?>
record if successful elsegithub:Error
getRepositoryContent![](/images/permalink.svg)
function getRepositoryContent(string owner, string repositoryName, string expression) returns File[]|Error
Get repository content
Parameters
- owner string - Repository owner name
- repositoryName string - GitHub repository name
- expression string - The expression in the form
<branch_name>:<path_to_directory>
Eg: "master:github" expression will list the contents ongithub
folder in the master branch "master:" expression will list the contents on root folder in the master branch
getCollaborators![](/images/permalink.svg)
Get collaborators
Return Type
getBranches![](/images/permalink.svg)
Get repository branches
Return Type
createIssue![](/images/permalink.svg)
function createIssue(CreateIssueInput createIssueInput, string owner, string repositoryName) returns Issue|Error
Create issue
Parameters
- createIssueInput CreateIssueInput -
CreateIssueInput
record
- owner string - Repository owner name
- repositoryName string - Repository name
updateIssue![](/images/permalink.svg)
function updateIssue(UpdateIssueInput updateIssueInput, string owner, string repositoryName, int issueNumber) returns Issue|Error
Update issue
Parameters
- updateIssueInput UpdateIssueInput -
UpdateIssueInput
record
- owner string - Repository owner name
- repositoryName string - Repository name
- issueNumber int - Issue number of the issue to be updated
getIssue![](/images/permalink.svg)
function getIssue(string owner, string repositoryName, int issueNumber, int perPageCountForLabels) returns Issue|Error
Get issue
Parameters
- owner string - Repository owner name
- repositoryName string - repositoryName
- issueNumber int - Issue number
- perPageCountForLabels int (default 10) - Number of labels in each issue to be returned. Defaulted to 10.
getIssues![](/images/permalink.svg)
function getIssues(string owner, string repositoryName, IssueFilters issueFilters) returns stream<Issue, Error?>|Error
Get issues
Parameters
- owner string - Repository owner name
- repositoryName string - Repository name
- issueFilters IssueFilters (default {}) - Filters to filter issues
Return Type
addComment![](/images/permalink.svg)
function addComment(AddIssueCommentInput addIssueCommentInput) returns IssueComment|Error
Add comment
Parameters
- addIssueCommentInput AddIssueCommentInput -
AddIssueCommentInput
record
Return Type
- IssueComment|Error -
github:IssueComment
if successful elsegithub:Error
updateComment![](/images/permalink.svg)
function updateComment(UpdateIssueCommentInput updateCommentInput) returns Error?
Update comment
Parameters
- updateCommentInput UpdateIssueCommentInput -
UpdateIssueCommentInput
record
Return Type
- Error? -
github:Error
if un-successful
deleteComment![](/images/permalink.svg)
function deleteComment(DeleteIssueCommentInput deleteCommentInput) returns Error?
Delete comment
Parameters
- deleteCommentInput DeleteIssueCommentInput -
DeleteCommentInput
record
Return Type
- Error? -
github:Error
if un-successful
addLabels![](/images/permalink.svg)
function addLabels(AddLabelsInput addLabelsInput) returns LabelList|Error
Add labels
Parameters
- addLabelsInput AddLabelsInput -
AddIssueLabelInput
record
removeLabel![](/images/permalink.svg)
function removeLabel(RemoveIssueLabelInput removeIssueLabelInput) returns Error?
Remove labeles
Parameters
- removeIssueLabelInput RemoveIssueLabelInput -
RemoveIssueLabelInput
record
Return Type
- Error? -
github:Error
if failed
getLabel![](/images/permalink.svg)
Get label
Parameters
- owner string - Repository owner name
- repositoryName string - Repository name
- labelName string - Label name
getLabels![](/images/permalink.svg)
function getLabels(string owner, string repositoryName, int issueNumber) returns stream<Label, Error?>|Error
Get labels
Parameters
- owner string - Repository owner name
- repositoryName string - Repository name
- issueNumber int - Issue number
Return Type
getMilestone![](/images/permalink.svg)
function getMilestone(string owner, string repositoryName, int milestoneNumber) returns Milestone|Error
Get milestone
Parameters
- owner string - Repository owner name
- repositoryName string - Repository name
- milestoneNumber int - Milestone number
getMilestones![](/images/permalink.svg)
Get milestones
Return Type
createPullRequest![](/images/permalink.svg)
function createPullRequest(CreatePullRequestInput createPullRequestInput, string owner, string repositoryName) returns PullRequest|Error
Create pull request
Parameters
- createPullRequestInput CreatePullRequestInput -
CreatePullRequestInput
record
- owner string - Repository owner name
- repositoryName string - Repository name
Return Type
- PullRequest|Error -
github:PullRequest
record if success or elsegithub:Error
updatePullRequest![](/images/permalink.svg)
function updatePullRequest(UpdatePullRequestInput updatePullRequestInput, string owner, string repositoryName, int pullRequestNumber) returns PullRequest|Error
Update pull request
Parameters
- updatePullRequestInput UpdatePullRequestInput -
UpdatePullRequestInput
record if successful elsegithub:Error
- owner string - Repository owner name
- repositoryName string - Repository name
- pullRequestNumber int - Pull request number
Return Type
- PullRequest|Error -
github:PullRequest
record if successful elsegithub:Error
getPullRequest![](/images/permalink.svg)
function getPullRequest(string owner, string repositoryName, int pullRequestNumber) returns PullRequest|Error
Get pull request
Parameters
- owner string - Repository owner name
- repositoryName string - Repository name
- pullRequestNumber int - Pull request number
Return Type
- PullRequest|Error -
github:PullRequest
record if successful elsegithub:Error
getPullRequests![](/images/permalink.svg)
function getPullRequests(string owner, string repositoryName, PullRequestState state) returns stream<PullRequest, Error?>|Error
Get pull requests
Parameters
- owner string - Repository owner name
- repositoryName string - Repository name
- state PullRequestState -
Pull request state
Return Type
- stream<PullRequest, Error?>|Error -
github:stream<PullRequest,Error?>
record if successful elsegithub:Error
createPullRequestReview![](/images/permalink.svg)
function createPullRequestReview(AddPullRequestReviewInput addPullRequestReviewInput, string owner, string repositoryName, int pullRequestNumber) returns PullRequestReview|Error
Create pull request review
Parameters
- addPullRequestReviewInput AddPullRequestReviewInput -
AddPullRequestReviewInput
record
- owner string - Repository owner name
- repositoryName string - Repository name
- pullRequestNumber int - Pull request number
Return Type
- PullRequestReview|Error -
github:PullRequestReview
record if successful elsegithub:Error
updatePullRequestReview![](/images/permalink.svg)
function updatePullRequestReview(UpdatePullRequestReviewInput updatePullRequestReviewInput) returns Error?
Update pull request review
Parameters
- updatePullRequestReviewInput UpdatePullRequestReviewInput -
UpdatePullRequestReviewInput
record
Return Type
- Error? -
github:Error
if failed.
deletePendingPullRequestReview![](/images/permalink.svg)
function deletePendingPullRequestReview(DeletePullRequestReviewInput deletePullRequestReview) returns Error?
Delete pending pull request review
Parameters
- deletePullRequestReview DeletePullRequestReviewInput -
DeletePullRequestReviewInput
record
Return Type
- Error? -
github:Error
if failed
createProject![](/images/permalink.svg)
function createProject(CreateRepositoryProjectInput createRepositoryProjectInput) returns Project|Error
Create project
Parameters
- createRepositoryProjectInput CreateRepositoryProjectInput -
CreateRepositoryProjectInput
record
updateProject![](/images/permalink.svg)
function updateProject(UpdateProjectInput updateProjectInput) returns Project|Error
Update project
Parameters
- updateProjectInput UpdateProjectInput -
UpdateProjectInput
deleteProject![](/images/permalink.svg)
function deleteProject(DeleteProjectInput deleteProjectInput) returns Error?
Delete project
Parameters
- deleteProjectInput DeleteProjectInput -
DeleteProjectInput
record
Return Type
- Error? -
github:Error
if failed
getProject![](/images/permalink.svg)
Get project
getProjects![](/images/permalink.svg)
function getProjects(string owner, OwnerType ownerType, string? repositoryName, ProjectState? state) returns stream<Project, Error?>|Error
Get Repository projects
Parameters
- owner string - Repository owner name
- ownerType OwnerType - Repository owner type : user or organization
- repositoryName string? (default ()) - Repository name
- state ProjectState? (default ()) - Project state
Return Type
getOrganizations![](/images/permalink.svg)
function getOrganizations(string owner, OwnerType ownerType) returns stream<Organization, Error?>|Error
Get organizations
Parameters
- owner string - Organization owner name
- ownerType OwnerType - OwnerType : user or organization
Return Type
- stream<Organization, Error?>|Error -
github:stream<Organization,Error?>
record or elsegithub:Error
getOrganizationMembers![](/images/permalink.svg)
Get organization members
Parameters
- organizationName string - Organization username
Return Type
search![](/images/permalink.svg)
function search(string searchQuery, SearchType searchType, int perPageCount, int perPageCountForLabels, string? lastPageCursor) returns SearchResult|Error
Search
Parameters
- searchQuery string - The search string to look for
- searchType SearchType - The types of search items to search within. Either one of the following can be used:
github:SEARCH_TYPE_USER
,github:SEARCH_TYPE_ORGANIZATION
,github:SEARCH_TYPE_ISSUE
,github:SEARCH_TYPE_REPOSITORY
,github:SEARCH_TYPE_PULL_REQUEST
.
- perPageCount int - Number of elements to be returned
- perPageCountForLabels int (default 10) - Number of labels in each issue to be returned. Defaulted to 10.
- lastPageCursor string? (default ()) - Next page curser
Return Type
- SearchResult|Error -
github:SearchResult
record if successful or elsegithub:Error
Constants![](/images/permalink.svg)
github: PULL_REQUEST_STATE_ALL![](/images/permalink.svg)
Pull request state open, closed and merged
github: STATE_ALL![](/images/permalink.svg)
State open and closed
github: STATE_CLOSED![](/images/permalink.svg)
Closed state
github: STATE_MERGED![](/images/permalink.svg)
Merged state
github: STATE_OPEN![](/images/permalink.svg)
Open state
Enums![](/images/permalink.svg)
github: DiffSide![](/images/permalink.svg)
Represent GitHub change Diff sides.
Members
github: IssueState![](/images/permalink.svg)
Represent issue state types.
Members
github: OwnerType![](/images/permalink.svg)
Represent GitHub account owner type .
Members
github: ProjectState![](/images/permalink.svg)
Represent GitHub project state.
Members
github: ProjectTemplate![](/images/permalink.svg)
Represent GitHub project templates.
Members
github: PullRequestReviewEvent![](/images/permalink.svg)
Represent GitHub pull request review states.
Members
github: PullRequestReviewState![](/images/permalink.svg)
Represent GitHub pull request review state.
Members
github: PullRequestState![](/images/permalink.svg)
Represent GitHub pull request states.
Members
github: RepositoryVisibility![](/images/permalink.svg)
Represent repository visibility types
Members
github: SearchType![](/images/permalink.svg)
Members
Records![](/images/permalink.svg)
github: Actor![](/images/permalink.svg)
Represent GitHub actor.
Fields
- login string - The username of the actor.
- resourcePath string? - The HTTP path for this actor.
- url string? - The HTTP URL for this actor.
- avatarUrl string? - A URL pointing to the actor's public avatar.
github: AddCommentInput![](/images/permalink.svg)
Represent add comment input payload.
Fields
- subjectId string - The Node ID of the subject to modify.
- body string - The contents of the comment.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: AddIssueCommentInput![](/images/permalink.svg)
Represent add comment input payload.
Fields
- repositoryOwnerName string - GitHub username of the repository owner
- repositoryName string - Repository name
- issueNumber int - Issue number
- body string - The contents of the comment.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: AddLabelsInput![](/images/permalink.svg)
Represent add label to issue input payload.
Fields
- repositoryOwnerName string - Repository owner name/ GitHub username
- repositoryName string - Repository name
- issueNumber int - Issue number
- labelNames string[] - Repository label name
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: AddLabelsToLabelableInput![](/images/permalink.svg)
Represent add label to labelable input payload.
Fields
- labelableId string - The id of the labelable object to add labels to.
- labelIds string[]? - The ids of the labels to add.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: AddPullRequestReviewInput![](/images/permalink.svg)
Represent GitHub pull request review create input payload.
Fields
- pullRequestId string? - The Node ID of the pull request to modify.
- commitOID string? - The commit OID the review pertains to.
- body string? - The contents of the review body comment.
- event PullRequestReviewEvent? - The event to perform on the pull request review.
- comments DraftPullRequestReviewComment[]? - The review line comments.
- threads DraftPullRequestReviewThread[]? - The review line comment threads.
- clientMutationId string? - A unique identifier for the client performing the mutation. A unique identifier for the client performing the mutation.
github: Branch![](/images/permalink.svg)
Represent GitHub branch.
Fields
- id string - Id
- name string - Name of the branch
- prefix string - GitHub reference prefix
github: BranchList![](/images/permalink.svg)
Represent GitHub branch list.
Fields
- branches Branch[] - Branch list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total branch count.
github: BranchListPayload![](/images/permalink.svg)
Represent GitHub branch list.
Fields
- nodes Branch[] - Branch list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total branch count.
github: CollaboratorList![](/images/permalink.svg)
Represent GitHub collaborator list.
Fields
- collaborators User[] - Collaborator list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total collaborator count.
github: CollaboratorListPayload![](/images/permalink.svg)
Represent GitHub collaborator list.
Fields
- nodes User[] - Collaborator list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total collaborator count.
github: Commit![](/images/permalink.svg)
Represents a Git commit
Fields
- commitUrl string - The HTTP URL for this Git object
- oid string - The Git object ID
- status Status? - Status information for this commit
github: ConnectionConfig![](/images/permalink.svg)
Represents the Github Client Connector Endpoint configuration.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion string(default "1.1") - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- followRedirects FollowRedirects?(default ()) - Configurations associated with Redirection
- poolConfig PoolConfiguration?(default ()) - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig?(default ()) - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig?(default ()) - Configurations associated with retrying
- cookieConfig CookieConfig?(default ()) - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket?(default ()) - SSL/TLS-related options
github: Context![](/images/permalink.svg)
Represents an individual commit status context.
Fields
- context string - The name of this status context
- state string - The state of this status context
- targetUrl string? - The URL for this status context
- description string? - The description for this status context
github: CreateIssueInput![](/images/permalink.svg)
Represent create issue input payload.
Fields
- title string - The title for the issue.
- body string? - The body for the issue description.
- assigneeNames string[]? - The GitHub usernames of the user assignees for this issue.
- milestoneId string? - The Node ID of the milestone for this issue.
- labelNames string[]? - An array of Node IDs of labels for this issue.
- projectIds string[]? - An array of Node IDs for projects associated with this issue.
- issueTemplate string? - The name of an issue template in the repository, assigns labels and assignees from the template to the issue
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: CreateIssueInputPayload![](/images/permalink.svg)
Represent create issue input payload.
Fields
- repositoryId string - The Node ID of the repository.
- title string - The title for the issue.
- body string? - The body for the issue description.
- assigneeIds string[]? - The Node ID for the user assignee for this issue.
- milestoneId string? - The Node ID of the milestone for this issue.
- labelIds string[]? - An array of Node IDs of labels for this issue.
- projectIds string[]? - An array of Node IDs for projects associated with this issue.
- issueTemplate string? - The name of an issue template in the repository, assigns labels and assignees from the template to the issue
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: CreateLabelInput![](/images/permalink.svg)
Represent create label input payload.
Fields
- name string - Name of the label
- description string - Description of the label
- color string - Color of the label
- repositoryId string - Node ID of the repository where this label needs to be created
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: CreateProjectInput![](/images/permalink.svg)
Represent GitHub project creation input payload.
Fields
- ownerId string - The owner ID to create the project under.
- name string - The name of project.
- body string? - The description of project.
- repositoryIds string[]? - A list of repository IDs to create as linked repositories for the project
- clientMutationId string? - A unique identifier for the client performing the mutation.
- template ProjectTemplate? - The name of the GitHub-provided template.
github: CreatePullRequestInput![](/images/permalink.svg)
Represent GitHub pull request create input payload.
Fields
- repositoryId string? - Node of the repository where the pull request create
- title string - Title of the pull request
- baseRefName string - The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
- headRefName string - The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace
head_ref_name
with a user like this:username:branch
.
- body string? - The contents of the pull request.
- maintainerCanModify boolean(default false) - Indicates whether maintainers can modify the pull request.
- draft boolean(default false) - Indicates whether this pull request should be a draft.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: CreateRepositoryInput![](/images/permalink.svg)
Represent create repository input payload
Fields
- ownerId string? - The ID of the owner for the new repository.
- name string - The name of the new repository.
- description string? - A short description of the new repository.
- visibility RepositoryVisibility - Indicates the repository's visibility level. eg: github: PUBLIC_REPOSITORY
- template boolean? - Whether this repository should be marked as a template such that anyone who can access it can create new repositories with the same files and directory structure.
- homepageUrl string? - The URL for a web page about this repository.
- hasWikiEnabled boolean? - Indicates if the repository should have the wiki feature enabled.
- hasIssuesEnabled boolean? - Indicates if the repository should have the issues feature enabled.
- teamId string? - When an organization is specified as the owner, this ID identifies the team that should be granted access to the new repository.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: CreateRepositoryProjectInput![](/images/permalink.svg)
Represent GitHub project creation input payload.
Fields
- ownerName string - Repository owner name/ GitHub username.
- name string - Name of the project
- body string? - Description of the project.
- repositoryNames string[]? - Array of repository names to be included in the project.
- clientMutationId string? - A unique identifier for the client performing the mutation.
- template ProjectTemplate? - The name of the GitHub-provided template.
github: DeleteIssueCommentInput![](/images/permalink.svg)
Represent delete issue comment input payload.
Fields
- id string - The ID of the comment to delete.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: DeleteLabelInput![](/images/permalink.svg)
Represent delete label input payload.
Fields
- id string - Node ID of the label
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: DeleteProjectInput![](/images/permalink.svg)
Represent GitHub project delete input payload.
Fields
- projectId string -
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: DeletePullRequestReviewInput![](/images/permalink.svg)
Represent pull request review delete input payload.
Fields
- pullRequestReviewId string - The Node ID of the pull request review to delete.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: DraftPullRequestReviewComment![](/images/permalink.svg)
Repreent GitHub draft pull request review comment payload.
Fields
- path string - Path to the file being commented on.
- position int - Position in the file to leave a comment on.
- body string - Body of the comment to leave.
github: DraftPullRequestReviewThread![](/images/permalink.svg)
Represent GitHub draft pull request review thread.
Fields
- path string - Path to the file being commented on.
- line int - The line of the blob to which the thread refers. The end of the line range for multi-line comments.
- side DiffSide(default DIFF_SIDE_RIGHT) - The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range.
- startLine int? - The first line of the range to which the comment refers.
- startSide DiffSide(default DIFF_SIDE_RIGHT) - The side of the diff on which the start line resides.
- body string - Body of the comment to leave.
github: File![](/images/permalink.svg)
The information and content of the file
Fields
- name string - File/Folder name
- 'type string - Type of the object
- 'object FileContent - File content. For folders this object will be empty
github: FileContent![](/images/permalink.svg)
File content
Fields
- byteSize int? - Byte size of the file
- text string? - The text respresentation of contents inside the file
- isBinary boolean? - If the file content is binary
github: GraphQLClientError![](/images/permalink.svg)
Fields
- message string -
- locations GraphQLClientSourceLocation[]? -
- path anydata[]? -
- extensions map<anydata>? -
github: GraphQLClientSourceLocation![](/images/permalink.svg)
Fields
- line int? -
- column int? -
github: Issue![](/images/permalink.svg)
Represent GitHub issue.
Fields
- author Actor? - The actor who authored the comment.
- body string? - Identifies the body of the issue.
- bodyHTML string? - The body rendered to HTML.
- bodyResourcePath string? - The http path for this issue body
- bodyText string? - Identifies the body of the issue rendered to text.
- bodyUrl string? - The http URL for this issue body
- closed boolean? -
true
if the object is closed (definition of closed may depend on type)
- closedAt string? - Identifies the date and time when the object was closed.
- createdAt string? - Identifies the date and time when the object was created.
- createdViaEmail boolean? - Check if this comment was created via an email reply.
- databaseId int? - Identifies the primary key from the database.
- editor Actor? - The actor who edited the comment.
- id string - ID
- isPinned boolean? - Indicates whether or not this issue is currently pinned to the repository issues list
- isReadByViewer boolean? - Is this issue read by the viewer
- lastEditedAt string? - The moment the editor made the last edit
- locked boolean? -
true
if the object is locked
- number int - Identifies the issue number.
- publishedAt string? - Identifies when the comment was published at.
- resourcePath string? - The HTTP path for this issue
- state IssueState? - Identifies the state of the issue.
- title string? - Identifies the issue title.
- updatedAt string? - Identifies the date and time when the object was last updated.
- url string? - The HTTP URL for this issue
- viewerDidAuthor boolean? - Did the viewer author this comment.
- viewerCanUpdate boolean? - Check if the current viewer can update this object.
- issueComments IssueComment[]? - Comments in an issue
- labels IssueLabels? - Labels in an issue
github: IssueComment![](/images/permalink.svg)
Represent GitHub issue comment.
Fields
- author Actor? - The actor who authored the comment.
- body string? - The body as Markdown.
- bodyHTML string? - The body rendered to HTML.
- bodyText string? - The body rendered to text.
- createdAt string? - Identifies the date and time when the object was created.
- databaseId int? - Identifies the primary key from the database.
- editor Actor? - The actor who edited the comment.
- id string - ID
- isMinimized boolean? - Returns whether or not a comment has been minimized.
- lastEditedAt string? - The moment the editor made the last edit
- minimizedReason string? - Returns why the comment was minimized.
- publishedAt string? - Identifies when the comment was published at.
- url string? - The HTTP URL for this issue comment
- viewerCanDelete boolean? - Check if the current viewer can delete this object.
- viewerCanUpdate boolean? - Check if the current viewer can update this object.
- viewerDidAuthor boolean? - Did the viewer author this comment.
github: IssueCommentList![](/images/permalink.svg)
Represent GitHub issue comment list.
Fields
- issueComments IssueComment[] - Issues Comment list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues comment count.
github: IssueCommentListPayload![](/images/permalink.svg)
Represent GitHub issue comment list.
Fields
- nodes IssueComment[] - Issues Comment list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues comment count.
github: IssueFilters![](/images/permalink.svg)
Fields
- assignee string? -
- createdBy string? -
- labels string[]? -
- mentioned string? -
- milestone string? -
- since string? -
- states IssueState[]? -
- viewerSubscribed boolean? -
github: IssueLabels![](/images/permalink.svg)
Represents a list of labels.
Fields
- nodes Label[]? - List of Labels in the issue
- totalCount int? - Identifies the total count of labels in the issue
github: IssueList![](/images/permalink.svg)
Represent GitHub issue list.
Fields
- issues Issue[] - Issue list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues count.
github: IssueListPayload![](/images/permalink.svg)
Represent GitHub issue list.
Fields
- nodes Issue[] - Issue list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues count.
github: Label![](/images/permalink.svg)
Represent GitHub Label.
Fields
- color string? - Identifies the label color.
- createdAt string? - Identifies the date and time when the label was created.
- description string? - A brief description of this label.
- id string - ID
- isDefault boolean? - Indicates whether or not this is a default label.
- name string - Identifies the label name.
- updatedAt string? - Identifies the date and time when the label was last updated.
- url string? - The HTTP URL for this label.
github: LabelList![](/images/permalink.svg)
Represent GitHub label list.
Fields
- labels Label[] - Labale list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total label count
github: LabelListPayload![](/images/permalink.svg)
Represent GitHub label list.
Fields
- nodes Label[] - Labale list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total label count
github: Language![](/images/permalink.svg)
Represents a given language found in repositories.
Fields
- name string - The name of the current language
- id string? - The Id of the current language
- colour string? - The color defined for the current language
github: LanguageList![](/images/permalink.svg)
Represents a list of languages with pagination information.
Fields
- languages Language[] - List of languages
- pageInfo PageInfo - Information to aid in pagination
- totalCount int - Identifies the total count of items in the connection
github: LanguageListPayload![](/images/permalink.svg)
Represents a list of languages with pagination information by GitHub.
Fields
- nodes Language[] - List of languages
- pageInfo PageInfo - Information to aid in pagination
- totalCount int - Identifies the total count of items in the connection
github: Milestone![](/images/permalink.svg)
Represent GitHub milestone
Fields
- id string -
- number int -
- closed boolean? -
true
if the object is closed (definition of closed may depend on type)
- closedAt string? - Identifies the date and time when the object was closed.
- createdAt string? - Identifies the date and time when the object was created.
- creator Actor? - Identifies the actor who created the milestone.
- description string? - Identifies the description of the milestone.
- dueOn string? - Identifies the due date of the milestone.
- progressPercentage float? - Identifies the percentage complete for the milestone
- resourcePath string? - The HTTP path for this milestone
- title string? - Identifies the title of the milestone.
- updatedAt string? - Identifies the date and time when the object was last updated.
- url string? - The HTTP URL for this milestone
github: MilestoneList![](/images/permalink.svg)
Represent GitHub milestone list.
Fields
- milestones Milestone[] - Milestone list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total milestone count
github: MilestoneListPayload![](/images/permalink.svg)
Represent GitHub milestone list.
Fields
- nodes Milestone[] - Milestone list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total milestone count
github: Organization![](/images/permalink.svg)
Represent GitHub organization
Fields
- avatarUrl string? - A URL pointing to the organization's public avatar.
- description string? - The organization's public profile description.
- email string? - The organization's public email.
- id string - ID
- location string? - The organization's public profile location.
- login string - The organization's login name.
- name string - The organization's public profile name.
- projectsResourcePath string? - The HTTP path listing organization's projects
- projectsUrl string? - The HTTP URL listing organization's projects
- resourcePath string? - The HTTP path for this organization.
- url string? - The HTTP URL for this organization.
- websiteUrl string? - The organization's public profile URL.
github: OrganizationList![](/images/permalink.svg)
Represent GitHub organization list.
Fields
- organizations Organization[] - Organization list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total organization count.
github: OrganizationListPayload![](/images/permalink.svg)
Represent GitHub organization list.
Fields
- nodes Organization[] - Organization list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total organization count.
github: PageInfo![](/images/permalink.svg)
Represent GitHub page info.
Fields
- startCursor string - When paginating backwards, the cursor to continue.
- endCursor string - When paginating forwards, the cursor to continue. [next page token]
- hasNextPage boolean - When paginating forwards, are there more items?
- hasPreviousPage boolean - When paginating backwards, are there more items?
github: Project![](/images/permalink.svg)
Represent GitHub project
Fields
- id string - ID
- name string - The project's name.
- body string? - The project's description body.
- closed boolean? -
true
if the object is closed (definition of closed may depend on type)
- closedAt string? - Identifies the date and time when the object was closed.
- createdAt string? - Identifies the date and time when the object was created.
- creator Actor? - The actor who originally created the project.
- databaseId int? - Identifies the primary key from the database.
- number int? - The project's number.
- state ProjectState? - Whether the project is open or closed.
- updatedAt string? - Identifies the date and time when the object was last updated.
- url string? - The HTTP URL for this project
github: ProjectList![](/images/permalink.svg)
Represent GitHub project list.
Fields
- projects Project[] - Project list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total projects count.
github: ProjectListPayload![](/images/permalink.svg)
Represent GitHub project list.
Fields
- nodes Project[] - Project list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total projects count.
github: PullRequest![](/images/permalink.svg)
Represent GitHub pull request.
Fields
- additions int? - The number of additions in this pull request.
- author Actor? - The actor who authored the comment.
- baseRef Ref? - Identifies the base Ref associated with the pull request.
- baseRefName string? - Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted.
- body string? - The body as Markdown.
- bodyHTML string? - The body rendered to HTML.
- bodyText string? - The body rendered to text.
- changedFiles int? - The number of changed files in this pull request.
- checksResourcePath string? - The HTTP path for the checks of this pull request.
- checksUrl string? - The HTTP URL for the checks of this pull request.
- closed boolean? -
true
if the pull request is closed
- closedAt string? - Identifies the date and time when the object was closed.
- createdAt string? - Identifies the date and time when the object was created.
- createdViaEmail boolean? - Check if this comment was created via an email reply.
- databaseId int? - Identifies the primary key from the database.
- deletions int? - The number of deletions in this pull request.
- editor Actor? - The actor who edited this pull request's body.
- headRef Ref? - Identifies the head Ref associated with the pull request.
- headRefName string? - Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted.
- headRepositoryOwner RepositoryOwner? - The owner of the repository associated with this pull request's head Ref.
- id string - ID
- isDraft boolean? - Identifies if the pull request is a draft.
- lastEditedAt string? - The moment the editor made the last edit
- locked boolean? -
true
if the pull request is locked
- merged boolean? - Whether or not the pull request was merged.
- mergedBy Actor? - The actor who merged the pull request.
- number int - Identifies the pull request number.
- publishedAt string? - Identifies when the comment was published at.
- resourcePath string? - The HTTP path for this pull request.
- revertUrl string? - The HTTP URL for reverting this pull request.
- state PullRequestState? - Identifies the state of the pull request.
- title string? - Identifies the pull request title.
- updatedAt string? - Identifies the date and time when the object was last updated.
- url string? - The HTTP URL for this pull request.
- lastCommit Commit? - Commit details of the last commit
- pullRequestReviews PullRequestReview[]? - PR review comments
github: PullRequestList![](/images/permalink.svg)
Represent GitHub pull request list.
Fields
- pullRequests PullRequest[] - Pull Request list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total pull request count
github: PullRequestListPayload![](/images/permalink.svg)
Represent GitHub pull request list.
Fields
- nodes PullRequest[] - Pull Request list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total pull request count
github: PullRequestReview![](/images/permalink.svg)
Represent GitHub pull request review
Fields
- body string? - Identifies the pull request review body.
- createdAt string? - Identifies the date and time when the object was created.
- id string - ID
- lastEditedAt string? - The moment the editor made the last edit
- url string? - The HTTP URL permalink for this PullRequestReview.
- state PullRequestReviewState? - Identifies the current state of the pull request review.
- publishedAt string? - Identifies when the comment was published at.
github: PullRequestReviewList![](/images/permalink.svg)
Represent GitHub pull request review list.
Fields
- pullRequestReviews PullRequestReview[] - Pull Request Review list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total pull request review count
github: PullRequestReviewListPayload![](/images/permalink.svg)
Represent GitHub pull request review list.
Fields
- nodes PullRequestReview[] - Pull Request Review list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total pull request review count
github: Ref![](/images/permalink.svg)
Represent GitHub Reference
Fields
- id string - ID
- name string - The ref name.
- prefix string - The ref's prefix, such as
refs/heads/
orrefs/tags/
.
github: RemoveIssueLabelInput![](/images/permalink.svg)
Represent remove label from labelable input payload.
Fields
- repositoryOwnerName string - Repository owner name/ GitHub username
- repositoryName string - Repository name
- issueNumber int - Issue number
- labelNames string[] - Array of existing label names of the issue to be removed
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: RemoveLabelsFromLabelableInput![](/images/permalink.svg)
Represent remove label from labelable input payload.
Fields
- labelableId string - The id of the labelable object to add labels to.
- labelIds string[] - The ids of the labels to add.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: Repository![](/images/permalink.svg)
Represent GitHub repository.
Fields
- createdAt string - Identifies the date and time when the object was created.
- databaseId int? - Identifies the primary key from the database.
- deleteBranchOnMerge boolean? - Whether or not branches are automatically deleted when merged in this repository.
- description string? - The description of the repository.
- descriptionHTML string? - The description of the repository rendered to HTML.
- diskUsage int? - The number of kilobytes this repository occupies on disk.
- forkCount int? - Returns how many forks there are of this repository in the whole network.
- hasIssuesEnabled boolean? - Indicates if the repository has issues feature enabled.
- hasProjectsEnabled boolean? - Indicates if the repository has the Projects feature enabled.
- hasWikiEnabled boolean? - Indicates if the repository has wiki feature enabled.
- homepageUrl string? - The repository's URL.
- id string - ID
- isArchived boolean? - Indicates if the repository is unmaintained.
- isBlankIssuesEnabled boolean? - Returns true if blank issue creation is allowed
- isDisabled boolean? - Returns whether or not this repository disabled.
- isEmpty boolean? - Returns whether or not this repository is empty.
- isFork boolean? - Identifies if the repository is a fork.
- isInOrganization boolean? - Indicates if a repository is either owned by an organization, or is a private fork of an organization repository.
- isLocked boolean? - Indicates if the repository has been locked or not.
- isMirror boolean? - Identifies if the repository is a mirror.
- isPrivate boolean? - Identifies if the repository is private or internal.
- isSecurityPolicyEnabled boolean? - Returns true if this repository has a security policy
- isTemplate boolean? - Identifies if the repository is a template that can be used to generate new repositories.
- isUserConfigurationRepository boolean? - Is this repository a user configuration repository?
- mergeCommitAllowed boolean? - Whether or not PRs are merged with a merge commit on this repository.
- mirrorUrl string? - The repository's original mirror URL.
- name string - The name of the repository.
- nameWithOwner string - The repository's name with owner.
- owner RepositoryOwner - The User owner of the repository.
- projectsResourcePath string? - The HTTP path listing the repository's projects
- projectsUrl string? - The HTTP URL listing the repository's projects
- pushedAt string? - Identifies when the repository was last pushed to.
- rebaseMergeAllowed boolean? - Whether or not rebase-merging is enabled on this repository.
- resourcePath string? - The HTTP path for this repository
- securityPolicy string? - The security policy URL.
- sshUrl string? - The SSH URL to clone this repository
- stargazerCount int? - Returns a count of how many stargazers there are on this object
- tempCloneToken string? - Temporary authentication token for cloning this repository.
- updatedAt string? - Identifies the date and time when the object was last updated.
- url string? - The HTTP URL for this repository
- viewerCanAdminister boolean? - Indicates whether the viewer has admin permissions on this repository.
- viewerCanCreateProjects boolean? - Can the current viewer create new projects on this owner.
- viewerCanSubscribe boolean? - Check if the viewer is able to change their subscription status for the repository.
- languages Language[]? - A list containing a breakdown of the language composition of the repository.
github: RepositoryList![](/images/permalink.svg)
Represent GitHub repository list.
Fields
- repositories Repository[] - Repository list
- pageInfo PageInfo - Response pagination info
- totalCount int - Total repository count
github: RepositoryListPayload![](/images/permalink.svg)
Represent GitHub repository list.
Fields
- nodes Repository[] - Repository list
- pageInfo PageInfo - Response pagination info
- totalCount int - Total repository count
github: RepositoryOwner![](/images/permalink.svg)
Represent GitHub repository owner
Fields
- id string - ID
- login string - The username used to login.
- resourcePath string? - The HTTP URL for the owner.
- url string? - The HTTP URL for the owner.
- avatarUrl string? - A URL pointing to the owner's public avatar.
github: SearchResult![](/images/permalink.svg)
Fields
- codeCount int -
- discussionCount int -
- issueCount int -
- repositoryCount int -
- userCount int -
- wikiCount int -
- pageInfo PageInfo -
- results Issue[]|User[]|Organization[]|Repository[]|PullRequest[] -
github: Status![](/images/permalink.svg)
Represents a commit status.
Fields
- state string - The combined commit status
- contexts Context[] - The individual status contexts for this commit
github: UpdateIssueCommentInput![](/images/permalink.svg)
Represent update issue comment input payload.
Fields
- id string - The ID of the IssueComment to modify.
- body string - The updated text of the comment.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdateIssueInput![](/images/permalink.svg)
Represent update issue input payload.
Fields
- id string? - The ID of the Issue to modify.
- title string? - The title for the issue.
- body string? - The body for the issue description.
- assigneeNames string[]? - An array of GitHub usernames of users for this issue.
- milestoneId string? - The Node ID of the milestone for this issue.
- labelNames string[]? - An array of label names of labels for this issue.
- state IssueState? - The desired issue state.
- projectIds string[]? - An array of Node IDs for projects associated with this issue.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdateIssueInputPayload![](/images/permalink.svg)
Represent update issue input payload.
Fields
- id string? - The ID of the Issue to modify.
- title string? - The title for the issue.
- body string? - The body for the issue description.
- assigneeIds string[]? - An array of Node IDs of users for this issue.
- milestoneId string? - The Node ID of the milestone for this issue.
- labelIds string[]? - An array of Node IDs of labels for this issue.
- state IssueState? - The desired issue state.
- projectIds string[]? - An array of Node IDs for projects associated with this issue.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdateLabelInput![](/images/permalink.svg)
Represent update label input payload.
Fields
- id string - Label ID
- name string? - Name of the label
- description string? - Description of the label
- color string? - Color of the label
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdateProjectInput![](/images/permalink.svg)
Represent GitHub project update input payload.
Fields
- projectId string - The Project ID to update.
- body string? - The description of project.
- name string? - The name of project.
- 'public boolean? -
- state ProjectState? - Whether the project is open or closed.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdatePullRequestInput![](/images/permalink.svg)
Represent GitHub pull request update input payload.
Fields
- pullRequestId string? - The Node ID of the pull request.
- baseRefName string? - The name of the branch you want your changes pulled into. This should be an existing branch on the current repository.
- title string? - Title of the pull request
- body string? - The contents of the pull request.
- state PullRequestState? - The target state of the pull request.
- maintainerCanModify boolean? - Indicates whether maintainers can modify the pull request.
- assigneeNames string[]? - An array of assignee names of users for this pull request.
- milestoneId string? - The Node ID of the milestone for this pull request.
- labelNames string[]? - An array of label names of labels for this pull request.
- projectIds string[]? - An array of Node IDs for projects associated with this pull request.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdatePullRequestInputPayload![](/images/permalink.svg)
Represent GitHub pull request update input payload.
Fields
- pullRequestId string? - The Node ID of the pull request.
- baseRefName string? - The name of the branch you want your changes pulled into. This should be an existing branch on the current repository.
- title string? - Title of the pull request
- body string? - The contents of the pull request.
- state PullRequestState? - The target state of the pull request.
- maintainerCanModify boolean? -
- assigneeIds string[]? - An array of Node IDs of users for this pull request.
- milestoneId string? - The Node ID of the milestone for this pull request.
- labelIds string[]? - An array of Node IDs of labels for this pull request.
- projectIds string[]? - An array of Node IDs for projects associated with this pull request.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdatePullRequestReviewInput![](/images/permalink.svg)
Represent GitHub pull request review update input payload.
Fields
- pullRequestReviewId string - The Node ID of the pull request review to modify.
- body string - The contents of the pull request review body.
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: UpdateRepositoryInput![](/images/permalink.svg)
Represent update repository input payload.
Fields
- clientMutationId string? - A unique identifier for the client performing the mutation.
- description string? - A new description for the repository. Pass an empty string to erase the existing description.
- hasIssuesEnabled boolean? - Indicates if the repository should have the issues feature enabled.
- hasProjectsEnabled boolean? - Indicates if the repository should have the project boards feature enabled.
- hasWikiEnabled boolean? - Indicates if the repository should have the wiki feature enabled.
- homePageUrl string? - The URL for a web page about this repository. Pass an empty string to erase the existing URL.
- name string? - The new name of the repository.
- repositoryId string? - The ID of the repository to update.
- template boolean? - Whether this repository should be marked as a template such that anyone who can access it can create new repositories with the same files and directory structure.
github: User![](/images/permalink.svg)
Repesent GitHub user
Fields
- anyPinnableItems boolean? - Determine if this repository owner has any items that can be pinned to their profile.
- avatarUrl string? - A URL pointing to the user's public avatar.
- bio string? - The user's public profile bio.
- bioHTML string? - The user's public profile bio as HTML.
- company string? - The user's public profile company.
- companyHTML string? - The user's public profile company as HTML.
- createdAt string? - Identifies the date and time when the object was created.
- databaseId int? - Identifies the primary key from the database.
- email string? - The user's publicly visible profile email.
- hasSponsorsListing boolean? - True if this user/organization has a GitHub Sponsors listing.
- id string - User ID
- isBountyHunter boolean? - Whether or not this user is a participant in the GitHub Security Bug Bounty.
- isCampusExpert boolean? - Whether or not this user is a participant in the GitHub Campus Experts Program.
- isDeveloperProgramMember boolean? - Whether or not this user is a GitHub Developer Program member.
- isEmployee boolean? - Whether or not this user is a GitHub employee.
- isGitHubStar boolean? - Whether or not this user is a member of the GitHub Stars Program.
- isSiteAdmin boolean? - Whether or not this user is a site administrator.
- isViewer boolean? - Whether or not this user is the viewing user.
- location string? - The user's public profile location.
- login string - The username used to login.
- projectsUrl string? - The HTTP URL listing user's projects
- resourcePath string? - The HTTP path for this user
- twitterUsername string? - The user's Twitter username.
- updatedAt string? - Identifies the date and time when the object was last updated.
- url string? - The HTTP URL for this user
- websiteUrl string? - A URL pointing to the user's public website/blog.
- name string? - The user's public profile name.
github: UserList![](/images/permalink.svg)
Represent GitHub user list.
Fields
- users User[] - User list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total user count
github: UserListPayload![](/images/permalink.svg)
Represent GitHub user list.
Fields
- nodes User[] - User list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total user count
Errors![](/images/permalink.svg)
github: ClientError![](/images/permalink.svg)
github: Error![](/images/permalink.svg)
github: ServerError![](/images/permalink.svg)
Import
import ballerinax/github;
Metadata
Released date: about 2 years ago
Version: 4.1.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.1.1
GraalVM compatible: Yes
Pull count
Total: 15752
Current verison: 44
Weekly downloads
Keywords
IT Operations/Source Control
Cost/Freemium
Contributors