github
Modules
github
github.webhookModule github
API
Declarations
Definitions
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
github:PullRequestList response = check githubClient->getPullRequests(<GitHub_Username>, <GitHub_Repository_Name>, github:PULL_REQUEST_OPEN, <Per_Page_Count>);
- Use
bal run
command to compile and run the Ballerina program.
Clients
github: Client
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
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
Get user
Parameters
- username string? (default ()) - GitHub username
createRepository
function createRepository(CreateRepositoryInput createRepositoryInput) returns Error?
Create repository
Parameters
- createRepositoryInput CreateRepositoryInput - Create repository input
Return Type
- Error? -
github:Error
if not successful
updateRepository
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
function getRepository(string owner, string repositoryName) returns Repository|Error
Get repository
Return Type
- Repository|Error -
github:Repository
record if successful elsegithub:Error
getRepositories
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
getCollaborators
Get collaborators
Return Type
getBranches
Get repository branches
Return Type
createIssue
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
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
Get issue
Parameters
- owner string - Repository owner name
- repositoryName string - repositoryName
- issueNumber int - Issue number
getIssues
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
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
function updateComment(UpdateIssueCommentInput updateCommentInput) returns Error?
Update comment
Parameters
- updateCommentInput UpdateIssueCommentInput -
UpdateIssueCommentInput
record
Return Type
- Error? -
github:Error
if un-successful
deleteComment
function deleteComment(DeleteIssueCommentInput deleteCommentInput) returns Error?
Delete comment
Parameters
- deleteCommentInput DeleteIssueCommentInput -
DeleteCommentInput
record
Return Type
- Error? -
github:Error
if un-successful
addLabels
function addLabels(AddLabelsInput addLabelsInput) returns LabelList|Error
Add labels
Parameters
- addLabelsInput AddLabelsInput -
AddIssueLabelInput
record
removeLabel
function removeLabel(RemoveIssueLabelInput removeIssueLabelInput) returns Error?
Remove labeles
Parameters
- removeIssueLabelInput RemoveIssueLabelInput -
RemoveIssueLabelInput
record
Return Type
- Error? -
github:Error
if failed
getLabel
Get label
Parameters
- owner string - Repository owner name
- repositoryName string - Repository name
- labelName string - Label name
getLabels
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
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
Get milestones
Return Type
createPullRequest
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
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
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
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
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
function updatePullRequestReview(UpdatePullRequestReviewInput updatePullRequestReviewInput) returns Error?
Update pull request review
Parameters
- updatePullRequestReviewInput UpdatePullRequestReviewInput -
UpdatePullRequestReviewInput
record
Return Type
- Error? -
github:Error
if failed.
deletePendingPullRequestReview
function deletePendingPullRequestReview(DeletePullRequestReviewInput deletePullRequestReview) returns Error?
Delete pending pull request review
Parameters
- deletePullRequestReview DeletePullRequestReviewInput -
DeletePullRequestReviewInput
record
Return Type
- Error? -
github:Error
if failed
createProject
function createProject(CreateRepositoryProjectInput createRepositoryProjectInput) returns Project|Error
Create project
Parameters
- createRepositoryProjectInput CreateRepositoryProjectInput -
CreateRepositoryProjectInput
record
updateProject
function updateProject(UpdateProjectInput updateProjectInput) returns Project|Error
Update project
Parameters
- updateProjectInput UpdateProjectInput -
UpdateProjectInput
deleteProject
function deleteProject(DeleteProjectInput deleteProjectInput) returns Error?
Delete project
Parameters
- deleteProjectInput DeleteProjectInput -
DeleteProjectInput
record
Return Type
- Error? -
github:Error
if failed
getProject
Get project
getProjects
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
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
Get organization members
Parameters
- organizationName string - Organization username
Return Type
search
function search(string searchQuery, SearchType searchType, int perPageCount, 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
- perPageCount int - Number of elements to be returned
- lastPageCursor string? (default ()) - Next page curser
Return Type
- SearchResult|Error -
github:SearchResult
record if successful or elsegithub:Error
Constants
github: PULL_REQUEST_STATE_ALL
Pull request state open, closed and merged
github: STATE_ALL
State open and closed
github: STATE_CLOSED
Closed state
github: STATE_MERGED
Merged state
github: STATE_OPEN
Open state
Enums
github: DiffSide
Represent GitHub change Diff sides.
Members
github: IssueState
Represent issue state types.
Members
github: OwnerType
Represent GitHub account owner type .
Members
github: ProjectState
Represent GitHub project state.
Members
github: ProjectTemplate
Represent GitHub project templates.
Members
github: PullRequestReviewEvent
Represent GitHub pull request review states.
Members
github: PullRequestReviewState
Represent GitHub pull request review state.
Members
github: PullRequestState
Represent GitHub pull request states.
Members
github: RepositoryVisibility
Represent repository visibility types
Members
github: SearchType
Members
Records
github: Actor
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
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
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
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
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
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
Represent GitHub branch.
Fields
- id string - Id
- name string - Name of the branch
- prefix string - GitHub reference prefix
github: BranchList
Represent GitHub branch list.
Fields
- branches Branch[] - Branch list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total branch count.
github: BranchListPayload
Represent GitHub branch list.
Fields
- nodes Branch[] - Branch list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total branch count.
github: CollaboratorList
Represent GitHub collaborator list.
Fields
- collaborators User[] - Collaborator list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total collaborator count.
github: CollaboratorListPayload
Represent GitHub collaborator list.
Fields
- nodes User[] - Collaborator list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total collaborator count.
github: ConnectionConfig
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: CreateIssueInput
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
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
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
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
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
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
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
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
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
Represent GitHub project delete input payload.
Fields
- projectId string -
- clientMutationId string? - A unique identifier for the client performing the mutation.
github: DeletePullRequestReviewInput
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
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
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: GraphQLClientError
Fields
- message string -
- locations GraphQLClientSourceLocation[]? -
- path anydata[]? -
- extensions map<anydata>? -
github: GraphQLClientSourceLocation
Fields
- line int? -
- column int? -
github: Issue
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
github: IssueComment
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
Represent GitHub issue comment list.
Fields
- issueComments IssueComment[] - Issues Comment list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues comment count.
github: IssueCommentListPayload
Represent GitHub issue comment list.
Fields
- nodes IssueComment[] - Issues Comment list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues comment count.
github: IssueFilters
Fields
- assignee string? -
- createdBy string? -
- labels string[]? -
- mentioned string? -
- milestone string? -
- since string? -
- states IssueState[]? -
- viewerSubscribed boolean? -
github: IssueList
Represent GitHub issue list.
Fields
- issues Issue[] - Issue list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues count.
github: IssueListPayload
Represent GitHub issue list.
Fields
- nodes Issue[] - Issue list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total issues count.
github: Label
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
Represent GitHub label list.
Fields
- labels Label[] - Labale list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total label count
github: LabelListPayload
Represent GitHub label list.
Fields
- nodes Label[] - Labale list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total label count
github: Milestone
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
Represent GitHub milestone list.
Fields
- milestones Milestone[] - Milestone list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total milestone count
github: MilestoneListPayload
Represent GitHub milestone list.
Fields
- nodes Milestone[] - Milestone list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total milestone count
github: Organization
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
Represent GitHub organization list.
Fields
- organizations Organization[] - Organization list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total organization count.
github: OrganizationListPayload
Represent GitHub organization list.
Fields
- nodes Organization[] - Organization list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total organization count.
github: PageInfo
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
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
Represent GitHub project list.
Fields
- projects Project[] - Project list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total projects count.
github: ProjectListPayload
Represent GitHub project list.
Fields
- nodes Project[] - Project list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total projects count.
github: PullRequest
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.
- pullRequestReviews PullRequestReview[]? - PR review comments
github: PullRequestList
Represent GitHub pull request list.
Fields
- pullRequests PullRequest[] - Pull Request list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total pull request count
github: PullRequestListPayload
Represent GitHub pull request list.
Fields
- nodes PullRequest[] - Pull Request list
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total pull request count
github: PullRequestReview
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
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
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
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
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
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
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.
github: RepositoryList
Represent GitHub repository list.
Fields
- repositories Repository[] - Repository list
- pageInfo PageInfo - Response pagination info
- totalCount int - Total repository count
github: RepositoryListPayload
Represent GitHub repository list.
Fields
- nodes Repository[] - Repository list
- pageInfo PageInfo - Response pagination info
- totalCount int - Total repository count
github: RepositoryOwner
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: Resp
Fields
- data ViewrRwcord -
github: SearchCount
Fields
- codeCount int -
- discussionCount int -
- issueCount int -
- repositoryCount int -
- userCount int -
- wikiCount int -
github: SearchResult
Fields
- codeCount int -
- discussionCount int -
- issueCount int -
- repositoryCount int -
- userCount int -
- wikiCount int -
- pageInfo PageInfo -
- results Issue[]|User[]|Organization[]|Repository[] -
github: SearchResultPayload
Fields
- codeCount int -
- discussionCount int -
- issueCount int -
- repositoryCount int -
- userCount int -
- wikiCount int -
- pageInfo PageInfo -
- nodes Issue[]|User[]|Organization[]|Repository[] -
github: UpdateIssueCommentInput
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
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
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
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
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
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
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
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
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
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
Represent GitHub user list.
Fields
- users User[] - User list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total user count
github: UserListPayload
Represent GitHub user list.
Fields
- nodes User[] - User list.
- pageInfo PageInfo - Response pagination info.
- totalCount int - Total user count
github: ViewrRwcord
Fields
- viewer User -
Errors
github: ClientError
github: Error
github: ServerError
Import
import ballerinax/github;
Metadata
Released date: almost 3 years ago
Version: 3.0.0
License: Apache-2.0
Compatibility
Platform: java11
Ballerina version: slbeta6
Pull count
Total: 17382
Current verison: 63
Weekly downloads
Keywords
IT Operations/Source Control
Cost/Freemium
Contributors