trigger.github
Module trigger.github
API
Declarations
Definitions

ballerinax/trigger.github Ballerina library
Overview
The GitHub Trigger module allows you to listen to following events occur in GitHub.
Ping
,Fork
,Push
,Create
,Watch
Release
,Issue
,Label
,Milestone
Pull Request
,Pull Request Review
,Pull Request Review Comment
This module supports GitHub API v4 version and only allows to perform functions behalf of the currently logged in user.
Prerequisites
Before using this trigger in your Ballerina application, complete the following:
- Create github account
Quickstart
To use the GitHub Trigger in your Ballerina application, update the .bal file as follows:
Step 1: Import the GitHub Webhook Ballerina library
First, import the ballerinax/github.webhook and ballerina/websub modules into the Ballerina project as follows.
import ballerinax/trigger.github;
Step 2: Initialize the GitHub Webhook Listener
Initialize the Trigger by providing the listener config & port number/httpListener object.
configurable github:ListenerConfig userInput = { secret: "xxxxxx" }; listener github:Listener webhookListener = new (userInput, 8090);
Listener config is not mandatory If you haven't setup secret in webhook page we can omit it and initialize as follows.
listener github:Listener webhookListener = new (listenOn = 8090);
If you don't provide a port it will use the default port which is 8090.
listener github:Listener webhookListener = new ();
Step 3: Use the correct service type to implement the service
Use the correct service type for the corresponding channel when implementing the service. Ex :- If you need to listen to Issue events you may use IssuesService service type as follows.
service github:IssuesService on githubListener { remote function onAssigned(github:IssuesEvent payload) returns error? { return; } remote function onClosed(github:IssuesEvent payload) returns error? { return; } remote function onLabeled(github:IssuesEvent payload) returns error? { return; } remote function onOpened(github:IssuesEvent payload) returns error? { return; } remote function onReopened(github:IssuesEvent payload) returns error? { return; } remote function onUnassigned(github:IssuesEvent payload) returns error? { return; } remote function onUnlabeled(github:IssuesEvent payload) returns error? { return; } }
Step 4: Provide remote functions corresponding to the events which you are interested on
The remote functions can be provided as follows.
remote function onPush(github:PushEvent payload) returns error? { log:printInfo("Received push-event-message ", eventPayload = payload); }
Step 5: Run the service
Use bal run
command to compile and run the Ballerina program.
Step 5: Configure Github webhook with the URL of the service
- Create a webhook in github following github documentation
- Provide the public URL of the started service as the Payload URL (Add a trailing / to the URL if its not present).
- Provide application/json for the content type.
- Support for secret field will be available in the next github trigger releases.
- Select the list of events you need to subscribe to and click on Add webhook.
This will add a subscription to github event api and the ballerina service functions will be triggerred once an event is fired.
Service types
trigger.github: IssuesService
Triggers when a new event related to a GitHub issue is received. Available actions: onOpened, onClosed, onReopened, onAssigned, onUnassigned, onLabeled, and onUnlabeled
onOpened
function onOpened(IssuesEvent payload) returns error?
Parameters
- payload IssuesEvent -
onClosed
function onClosed(IssuesEvent payload) returns error?
Parameters
- payload IssuesEvent -
onReopened
function onReopened(IssuesEvent payload) returns error?
Parameters
- payload IssuesEvent -
onAssigned
function onAssigned(IssuesEvent payload) returns error?
Parameters
- payload IssuesEvent -
onUnassigned
function onUnassigned(IssuesEvent payload) returns error?
Parameters
- payload IssuesEvent -
onLabeled
function onLabeled(IssuesEvent payload) returns error?
Parameters
- payload IssuesEvent -
onUnlabeled
function onUnlabeled(IssuesEvent payload) returns error?
Parameters
- payload IssuesEvent -
trigger.github: IssueCommentService
Triggers when a new event is fired upon receiving a comment on a pull request or a GitHub issue. Available actions: onCreated, onEdited, and onDeleted
onCreated
function onCreated(IssueCommentEvent payload) returns error?
Parameters
- payload IssueCommentEvent -
onEdited
function onEdited(IssueCommentEvent payload) returns error?
Parameters
- payload IssueCommentEvent -
onDeleted
function onDeleted(IssueCommentEvent payload) returns error?
Parameters
- payload IssueCommentEvent -
trigger.github: PullRequestService
Triggers when a new event related to a GitHub pull request is received. Available actions: onOpened, onClosed, onReopened, onAssigned, onUnassigned, onReviewRequested, onReviewRequestRemoved, onLabeled, onUnlabeled, and onEdited
onOpened
function onOpened(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onClosed
function onClosed(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onReopened
function onReopened(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onAssigned
function onAssigned(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onUnassigned
function onUnassigned(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onReviewRequested
function onReviewRequested(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onReviewRequestRemoved
function onReviewRequestRemoved(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onLabeled
function onLabeled(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onUnlabeled
function onUnlabeled(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
onEdited
function onEdited(PullRequestEvent payload) returns error?
Parameters
- payload PullRequestEvent -
trigger.github: PullRequestReviewService
Triggers when Choreo recieved a new event from GitHub related to a pull request review. Available actions: onSubmitted, onEdited, and onDismissed
onSubmitted
function onSubmitted(PullRequestReviewEvent payload) returns error?
Parameters
- payload PullRequestReviewEvent -
onEdited
function onEdited(PullRequestReviewEvent payload) returns error?
Parameters
- payload PullRequestReviewEvent -
onDismissed
function onDismissed(PullRequestReviewEvent payload) returns error?
Parameters
- payload PullRequestReviewEvent -
trigger.github: PullRequestReviewCommentService
Triggers when a new event is received from GitHub when a comment is added to a pull request review's unified diff view. Available actions: onCreated, onEdited, and onDeleted
onCreated
function onCreated(PullRequestReviewCommentEvent payload) returns error?
Parameters
- payload PullRequestReviewCommentEvent -
onEdited
function onEdited(PullRequestReviewCommentEvent payload) returns error?
Parameters
- payload PullRequestReviewCommentEvent -
onDeleted
function onDeleted(PullRequestReviewCommentEvent payload) returns error?
Parameters
- payload PullRequestReviewCommentEvent -
trigger.github: ReleaseService
Triggers when a new event related to a GitHub release is received. Available actions: onPublished, onUnpublished, onCreated, onEdited, onDeleted, onPreReleased, and onReleased
onPublished
function onPublished(ReleaseEvent payload) returns error?
Parameters
- payload ReleaseEvent -
onUnpublished
function onUnpublished(ReleaseEvent payload) returns error?
Parameters
- payload ReleaseEvent -
onCreated
function onCreated(ReleaseEvent payload) returns error?
Parameters
- payload ReleaseEvent -
onEdited
function onEdited(ReleaseEvent payload) returns error?
Parameters
- payload ReleaseEvent -
onDeleted
function onDeleted(ReleaseEvent payload) returns error?
Parameters
- payload ReleaseEvent -
onPreReleased
function onPreReleased(ReleaseEvent payload) returns error?
Parameters
- payload ReleaseEvent -
onReleased
function onReleased(ReleaseEvent payload) returns error?
Parameters
- payload ReleaseEvent -
trigger.github: LabelService
Triggers when a new event related to labels is received. Available actions: onCreated, onEdited, and onDeleted
onCreated
function onCreated(LabelEvent payload) returns error?
Parameters
- payload LabelEvent -
onEdited
function onEdited(LabelEvent payload) returns error?
Parameters
- payload LabelEvent -
onDeleted
function onDeleted(LabelEvent payload) returns error?
Parameters
- payload LabelEvent -
trigger.github: MilestoneService
Triggers when a new event related to GitHub milestones is received. Available actions: onCreated, onEdited, onDeleted, onClosed, and onOpened
onCreated
function onCreated(MilestoneEvent payload) returns error?
Parameters
- payload MilestoneEvent -
onEdited
function onEdited(MilestoneEvent payload) returns error?
Parameters
- payload MilestoneEvent -
onDeleted
function onDeleted(MilestoneEvent payload) returns error?
Parameters
- payload MilestoneEvent -
onClosed
function onClosed(MilestoneEvent payload) returns error?
Parameters
- payload MilestoneEvent -
onOpened
function onOpened(MilestoneEvent payload) returns error?
Parameters
- payload MilestoneEvent -
trigger.github: PushService
Triggers when a push event is received. Available action: onPush
onPush
Parameters
- payload PushEvent -
trigger.github: ProjectCardService
Triggers when a new event related to project cards is received. Available actions: onCreated, onEdited, onMoved, onConverted, and onDeleted
onCreated
function onCreated(ProjectCardEvent payload) returns error?
Parameters
- payload ProjectCardEvent -
onEdited
function onEdited(ProjectCardEvent payload) returns error?
Parameters
- payload ProjectCardEvent -
onMoved
function onMoved(ProjectCardEvent payload) returns error?
Parameters
- payload ProjectCardEvent -
onConverted
function onConverted(ProjectCardEvent payload) returns error?
Parameters
- payload ProjectCardEvent -
onDeleted
function onDeleted(ProjectCardEvent payload) returns error?
Parameters
- payload ProjectCardEvent -
Enums
trigger.github: IssueCommentActions
Represent issue comment event action types.
Members
trigger.github: IssuesActions
Represent issue event action types.
Members
trigger.github: LabelActions
Represent label event action types.
Members
trigger.github: MilestoneActions
Represent milestone event action types.
Members
trigger.github: ProjectCardActions
Represent project card event action types
Members
trigger.github: PullRequestActions
Represent pull request event action types.
Members
trigger.github: PullRequestReviewActions
Represent pull request review event action types.
Members
trigger.github: PullRequestReviewCommentActions
Represent pull request review comment event action types.
Members
trigger.github: ReleaseActions
Represent release event action types.
Members
trigger.github: WatchActions
Represent watch event action types.
Members
Listeners
trigger.github: Listener
attach
function attach(GenericServiceType serviceRef, () attachPoint) returns error?
detach
function detach(GenericServiceType serviceRef) returns error?
Parameters
- serviceRef GenericServiceType -
'start
function 'start() returns error?
gracefulStop
function gracefulStop() returns error?
immediateStop
function immediateStop() returns error?
Records
trigger.github: Acknowledgement
Represent webhook acknowledgement
Fields
trigger.github: Asset
Represent GitHub Asset payload.
Fields
- url string - Asset URL
- browser_download_url string - Download URL for assets
- id int - Asset ID
- node_id string - Node ID
- name string - Name of the Asset
- label string? - Label name
- state string - State of the assets
- content_type string - Content-Type of the Asset
- size int - Size of the asset
- download_count int - Downloaded count
- created_at string - Created date time
- updated_at string - Updated date time
- uploader User - Uploaded user
trigger.github: Body
Represents body of a Change occured
Fields
- 'from string -
trigger.github: Branch
Represent the payload of GitHub Branch
Fields
- label string - Label name
- ref string - Reference link
- sha string - Sha of the branch
- user User - Auther of the branch
- repo Repository - Repository name
trigger.github: Changes
Represents the Change payload.
Fields
- name? Name - Name of the Change
- title? Title - Title of the Change
- body? Body - Body of the Change
- color? Color - Color of the Change
- permission? Permission - Permission of the Change
- description? Description - Description of the Change
- due_on? DueOn - Due on date time
- note? Note - Notes of the Change
trigger.github: Color
Represents color of a Change occured
Fields
- 'from string -
trigger.github: CommentsLink
Represent comments link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: Commit
Represent GitHub commit payload.
Fields
- id? string - ID
- sha? string - Commit sha
- message string - Commit message
- author CommitAuthor - Author of the commit
- url string - Commit URL
- 'distinct boolean -
- committer? CommitAuthor - Commit author
- tree_id? string - Tree Id
- timestamp? string - Timestamp of the commit
- added? string[] - Added changes
- removed? string[] - Removed parts
- modified? string[] - Modified parts
trigger.github: CommitAuthor
Represent payload of GitHub commit author.
Fields
- name string - Name of the commit author
- email string - Email of the commit author
- username? string - GitHub username of the commit author
trigger.github: CommitsLink
Represent commits link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: CreateEvent
Represent GitHub create event.
Fields
- ref string - The git ref resource.
- ref_type string - The type of Git ref object created in the repository. Can be either branch or tag.
- master_branch string - The name of the repository's default branch (usually main).
- description string? - The repository's current description.
- repository Repository - The repository where the event occurred.
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
- sender User - The user that triggered the event.
trigger.github: Description
Represents description of a Change occured
Fields
- 'from string -
trigger.github: DueOn
Represents due on of a Change occured
Fields
- 'from string -
trigger.github: EventNotification
Represent event notification payload.
Fields
- hubName string - Hub name
- eventId string - Event Id
- message string - Message
trigger.github: ForkEvent
Represent GitHub fork event.
Fields
- forkee Repository - Forkee repository
- repository Repository - Fork repository
- sender User - Fork send user
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: GenericEventWrapper
Fields
- id? string - Unique identifier for the event
- 'type? string - The type of event.Events uses PascalCase for the name
trigger.github: Hook
Represent GitHub Hook payload.
Fields
- 'type string -
- id int - ID
- name string - Name of the Hook
- active boolean - Whether the Hook is active
- events string[] - Events associated with the Hook
- config HookConfig - Hook configuration
- updated_at string - Updated date time
- created_at string - Created date time
- url string - Hook URL
- test_url string - test URL
- ping_url string - Ping URL
- last_response HookLastResponse - Last Hook response
trigger.github: HookConfig
Represent GitHub Hook config payload.
Fields
- content_type string - Content Type of the Hook request
- secret? string - Hook secret
- url string - Hook registration URL
- insecure_ssl string - Insecure SSL
trigger.github: HookLastResponse
Represent GitHub Hook last response.
Fields
- code string? - Code associated with HookLastResponse
- status string - Hook status
- message string? - Hook message
trigger.github: HtmlLink
Represent html link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: Invitation
Represent the payload of GitHub Invitation
Fields
- id int - ID
- login string - Login name for Invitation
- email string - Email of the Invitation
- role string - Role of the Invitation
- created_at string - Created date time
- inviter User - Inviter
- team_count int - Team count
- invitation_team_url string - Invitation team url
trigger.github: Issue
Represents the GitHub Issue payload.
Fields
- url string - Url of the payload
- repository_url string - Repository URl
- labels_url string - Labels URl
- comments_url string - Comments URl
- events_url string - Events URL
- html_url string - HTML URL
- id int - ID
- node_id string - Node ID
- number int - Issue number
- title string - Issue title
- user User - Author of the issue
- labels Label[] - Labels assigned to the issue
- state string - State of the issue.
- locked boolean - Whether the issue is locked
- assignee User? - Assigne of the issue.
- assignees User[] - Assignes of the issue.
- milestone Milestone? - Milestone of the issue
- comments int - Comments for the issue
- created_at string - Created at date time
- updated_at string - Updated date time
- closed_at string? - Closed date time
- author_association string - Author associations
- active_lock_reason string? - Active lock reasons
- body string? - Description of the Issue
- performed_via_github_app string? -
trigger.github: IssueComment
Represents the GitHub issue comment payload
Fields
- url string - Issue comment url
- html_url string - HTML url for the issue comment
- issue_url string - Issue URL
- id int - ID
- node_id string - Node ID
- user User - Author of the comment
- created_at string - Created date time
- updated_at string - Updated date time
- author_association string - Author association
- body string - Description of the issue comment
- performed_via_github_app string? - Whether performed via GitHub Apps
trigger.github: IssueCommentEvent
Repesent GitHub issue comment event.
Fields
- action IssueCommentActions - Issue comment event action
- issue Issue - Associated issue.
- changes? Changes - Changes associated to the Issue comment
- comment IssueComment - Comment
- repository Repository - Issue comment associated repository
- sender User - Issue comment send user
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: IssueLink
Represent issue link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: IssuesEvent
Represent GitHub issue event.
Fields
- action IssuesActions - Issue event action
- issue Issue - Issue associated
- changes? Changes - Changes associated with the issue
- label? Label - Label of the issue event
- assignee? User - assignee of the issue event
- milestone? Milestone - Milestone associated with
- repository Repository - Repository of the issue events
- sender User - User associated with issue event
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: Label
Represents the GitHub Label payload.
Fields
- id int - Label ID
- node_id string - Node ID of the label
- url string - Label URL
- name string - Name of the label
- color string - Color of the label
- description string? - Description of the label
- 'default boolean -
trigger.github: LabelEvent
Repesent GitHub label event.
Fields
- action LabelActions - Label event action
- label Label - Label payload
- issue? Issue - Issue associated with
- changes? Changes - Changes associated with
- repository Repository - Repository associated with
- sender User - Sender of the label event
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: License
Represent repository licence
Fields
- key string - License key
- name string - License name
- spdx_id string? - Short identifier specified by https://spdx.org/licenses
- url string? - URL to the license on https://choosealicense.com
- node_id string - GItHub node ID
trigger.github: Links
Represent the payload of Github Links
Fields
- 'self? SelfLink -
- html? HtmlLink - Html Link
- issue? IssueLink - Issue link
- comments? CommentsLink - Comments link
- review_comments? ReviewCommentsLink - Review comments link
- review_comment? ReviewCommentLink - Review comment
- commits? CommitsLink - Commits
- statuses? StatusesLink - Statuses
- pull_request? PullRequestLink - Pull request
trigger.github: ListenerConfig
Fields
- webhookSecret string(default DEFAULT_SECRET) -
trigger.github: MetaEvent
Represent GitHub meta event.
Fields
- action string - Action of the meta event
- hook_id int - The ID of the webhook that triggered the ping.
- hook Hook - The webhook configuration.
- repository Repository - The repository where the event occurred.
- sender User - The user that triggered the event.
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: Milestone
Represents the GitHub Milestone payload.
Fields
- url string - Milestone URL
- html_url string - HTML URL
- labels_url string - Lables URL
- id int - ID
- node_id string - Node ID
- number int - Milestone number
- title string - Title of the milestone
- description string? - Description of the milestone
- creator User - Author of the milestone
- open_issues int - Number of open issues
- closed_issues int - Number of closed issues
- state string - State of the milestone
- created_at string - Created date time
- updated_at string - Updated date time
- due_on string? - Due of date time
- closed_at string? - Closed date time
trigger.github: MilestoneEvent
Represent GitHub milestone event.
Fields
- action MilestoneActions - Milestone event action
- milestone Milestone - Milestone payload
- changes? Changes - Changes associated with
- repository Repository - Repository associated with
- sender User - Sender of the label event
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: Name
Represents name of a Change occured
Fields
- 'from string -
trigger.github: Note
Represents note of a Change occured
Fields
- 'from string -
trigger.github: Organization
Represents the payload of an Organization
Fields
- login string - Login name of the Organization
- id int - ID of the organization
- node_id string - Node ID
- url string - URL of the organization
- name? string - Name of the organization
- repos_url string - Reposiotries URL
- events_url string - Events URL
- hooks_url string - Hooks URL
- issues_url string - Issues URL
- members_url string - Members URl
- public_members_url string - Public members URl
- avatar_url string - Avatar URl
- description string? - Description URL
trigger.github: Page
Represents the Page payload.
Fields
- page_name string - Name of the page
- title string - Title of the page
- summary string? - Summery
- action string - Action
- sha string - Sha of the page
- html_url string - HTML URL of the page
trigger.github: Payload
Represent event Payload
Fields
- eventType string - Event type.
- eventData json - Event data.
trigger.github: Permission
Represents permission of a Change occured
Fields
- 'from string -
trigger.github: PingEvent
Represent GitHub ping event.
Fields
- zen string - Random string of GitHub zen.
- hook_id int - The ID of the webhook that triggered the ping.
- hook Hook - The webhook configuration.
- repository Repository - The repository where the event occurred.
- sender User - The user that triggered the event.
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: ProjectCard
Represent GitHub ProjectCard payload
Fields
- url string - Project card URL
- project_url string - Project URL
- column_url string - Project column URL
- column_id int - Id of the column
- id int - ID
- node_id string - Node ID
- note string? - Note of the Project Card
- archived boolean - Whether archieved
- created_at string - Created date time
- updated_at string - Updated date time
- content_url string - Url of the issue
- creator User - Author of the Project Card
trigger.github: ProjectCardEvent
Represent GitHub project_card event
Fields
- action ProjectCardActions - Project_card event action
- project_card ProjectCard - Project card itself
- repository Repository - Repository associated with
- changes? Changes - The changes to the project card if the action was edited or converted.
- sender User - Sender of the project_card event
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: PullRequest
Represent payload of GitHub payload.
Fields
- url string - Pull request URL
- id int - ID
- node_id string - Node ID
- html_url string - Html Url
- diff_url string - Diff URL
- patch_url string - Patch URl
- issue_url string? - Issues URL
- number int - Pull Request number
- state string - State of the PR
- locked boolean - Whether merge locked
- title string - Title of the Pull Request
- user User - Auther of the Pull Request
- body string? - Body of the pull request
- created_at string - Created date time
- updated_at string - Updated date time
- closed_at string? - Closed date time
- merged_at string? - Merged date time
- merge_commit_sha string? - Merge commit sha
- assignee User? - Assignee of the PR
- assignees User[] - Assignees of the PR
- requested_reviewers User[] - Requested reviewers list
- requested_teams Team[] - Requested Items
- labels Label[] - Labels list
- milestone Milestone? - Milestone of the PR
- draft boolean - Whether the PR is a draft
- commits_url string - Commits URL of the PR
- review_comments_url string - Revew comments URL of the PR
- review_comment_url string - Review comment URL
- comments_url string - Comments URL
- statuses_url string - Statuses URL
- head Branch - Head ref of the PR
- base Branch - base Ref of the PR
- _links Links - Links of the Pr
- author_association string - Author association
- merged? boolean - Whether the PR is merged
- mergeable? boolean? - Whether the PR is mergeable
- rebaseable? boolean? - Whether the PR is rebaseble
- mergeable_state? string - Mergeable state of the PR
- merged_by? User? - Merged User
- comments? int - List of comments
- review_comments? int - Review comments
- maintainer_can_modify? boolean - Whether maintainer can modify the PR
- commits? int - Commits
- additions? int - Addition changes
- deletions? int - Deletion changes
- changed_files? int - Change files references
- active_lock_reason string? - Active lock reason
trigger.github: PullRequestEvent
Represent GitHub Pull request event
Fields
- action PullRequestActions - Pull Request Event action
- number int - Pull request number
- changes? Changes - Changes associated with
- pull_request PullRequest - Pull Request payload
- assignee? User - Associated assignee to the Pull Request
- label? Label - Labels associated with
- requested_reviewer? User - Requested reviewer
- repository Repository - Repository associated with
- sender User - Pull request sender
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: PullRequestLink
Represent pull request link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: PullRequestReviewComment
Represent GitHub pull request review comment payload.
Fields
- url string - URL of the pull request review commment
- pull_request_review_id int - Pull Request review id
- id int - ID
- node_id string - Node ID
- diff_hunk string - Diff hunk of the PR review
- path string - Path for the Pull Request Review Comment
- position int - Position of the Review
- original_position int - Original posiiton of the Change
- commit_id string - Commit ID of the PR
- original_commit_id string - Original commit id
- user User - Author of the Pull Request Review
- body string - Body of the Pull Request Review
- created_at string - Created date time
- updated_at string - Updated date time
- html_url string - HTML url for the review
- pull_request_url string - URL for the Pull Request
- author_association string - Author association
- _links Links - Links associates
- start_line string? - Start line number of the review
- original_start_line string? - Original start line
- start_side string? - Start side of the review
- line int - Line number
- original_line int - Original line
- side string - Side of the Pull Request Review
- in_reply_to_id? int - Reply to the PR ID
trigger.github: PullRequestReviewCommentEvent
Represent GitHub pull request review comment event.
Fields
- action string - Pull request review comment event action
- changes? Changes - Changes associated with
- pull_request PullRequest - Pull request associated with
- comment PullRequestReviewComment - Comments associated with
- repository Repository - Repository associated with
- sender User - Pull request review comment sender
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: PullRequestReviewEvent
Represent GitHub pull request review event.
Fields
- action PullRequestReviewActions - Pull Request Review Event action
- review Review - Pull Request Review payload.
- pull_request PullRequest - Pull Request associated with
- changes? Changes - Changes associated with
- repository Repository - Repository associated with
- sender User - Sender associated with
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: PushEvent
Represent GitHub push event
Fields
- ref string - The full git ref that was pushed. Example:
- before string - The SHA of the most recent commit on ref before the push.
- after string - The SHA of the most recent commit on ref after the push.
- created boolean - Created date time
- deleted boolean - Deleted date time
- forced boolean - Forced psuh
- base_ref string? - Base git ref
- compare string - Comparison
- commits Commit[] - Array of commits
- head_commit Commit? - Head ref commit
- repository Repository - The repository where the event occurred.
- pusher CommitAuthor - The user who pushed the commits.
- sender User - The user that triggered the event.
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: Release
Represent GitHub Release payload.
Fields
- url string - Release URL
- assets_url string - Assets URL
- upload_url string - Upload URL
- html_url string - HTML URL
- id int - ID
- node_id string - Node ID
- tag_name string - Tag name
- target_commitish string - Target commitsh
- name string? - Name of the release
- draft boolean - Whether release is in draft state
- author User - Author of the release
- prerelease boolean - Whether release is a pre-release
- created_at string - Created date time
- published_at string? - Published date time
- assets Asset[] - Release artifacts
- tarball_url string? - Tarball URL
- zipball_url string? - Zipball URL
- body string? - Release body
trigger.github: ReleaseEvent
Represent GitHub release event.
Fields
- action ReleaseActions - The action that was performed.
- release Release - The release object.
- repository Repository - The repository where the event occurred.
- sender User - The user that triggered the event.
- changes? Changes - The previous version of the body if the action was edited.
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
trigger.github: Repository
Represent the GitHub Repository payload.
Fields
- id int - ID o fthe Repository
- node_id string - Node ID of the repository
- name string - Name of the Repository
- full_name string - Full name of the Repository
- owner User - Owner of the repository
- 'private boolean -
- html_url string - HTML URL of the repository.
- description string? - Description of the repository.
- 'fork boolean -
- url string - URL of the repository
- forks_url string - Fork URL of the repository.
- keys_url string - Keys URl of the repository
- collaborators_url string - Collaborators URL of the repository
- teams_url string - Teams URL of the repository
- hooks_url string - Hooks URL
- issue_events_url string - Issue events URL
- events_url string - Events URl
- assignees_url string - Assignees URL
- branches_url string - Branches URL
- tags_url string - Tags URL
- blobs_url string - Blobs URL
- git_tags_url string - Git Tags URL
- git_refs_url string - Git Refs URL
- trees_url string - Trees URL
- statuses_url string - Statuses URL
- languages_url string - Languages URL.
- stargazers_url string - Stargazers URL
- contributors_url string - Contributors URL
- subscribers_url string - Subscribers URL
- subscription_url string - Subscription URL.
- commits_url string - Commits URL
- git_commits_url string - Git Commits URL
- comments_url string - Comments URL
- issue_comment_url string - Issue Comments URL
- contents_url string - Contents URL
- compare_url string - Compare URL
- merges_url string - Merges URL
- archive_url string - Archieve URL
- downloads_url string - Downloads URL
- issues_url string - Issues URL
- pulls_url string - Pulls URL
- milestones_url string - Milestone URLs
- notifications_url string - Notification URLs
- labels_url string - Labels URLs
- releases_url string - Releases URL
- updated_at string - Updated time
- git_url string - Git URL
- ssh_url string - SSH URL
- clone_url string - Clone URL
- svn_url string - SVN URL
- homepage string? - Home page URL
- size int - Size of the repository
- stargazers_count int - Stargazers count
- watchers_count int - Watchers count
- language string? - Language
- has_issues boolean - Whether issues are available
- has_downloads boolean - Whether downloads are available
- has_wiki boolean - Wther Wikis are available
- has_pages boolean - Whether GitHub pages available
- forks_count int - Number of forks
- mirror_url string? - Mirror URl
- deployments_url? string - Deployment URL
- open_issues_count int - Open issues count
- license License? - Licence URl
- forks int - Forks
- open_issues int - Open Issues
- watchers int - Watches
- default_branch string - Default branch
- archived? boolean - Whether archieved
- disabled? boolean - Whether disabled
- has_projects? boolean - Whether includes projects
- allow_squash_merge? boolean - Whether allow squash and merge
- allow_merge_commit? boolean - Whether allow merge commits
- allow_rebase_merge? boolean - Whether allow rebase merge
- delete_branch_on_merge? boolean - Whether delete branch on merge
- stargazers? int - Stargazers
- master_branch? string - Refrence to master branch
trigger.github: Review
Represents GitHub Review payload.
Fields
- id int - ID of the Review
- node_id string - Node ID
- user User - Auther of the review
- body string? - Body of the review
- commit_id string - Commit
- submitted_at string - Submitted date time
- state string - State of the review
- html_url string - HTML of the Review
- pull_request_url string - Pull request URL
- author_association string - Author association
- _links Links - Links associations
trigger.github: ReviewCommentLink
Represent a review comment link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: ReviewCommentsLink
Represent review comments link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: SelfLink
Represent self link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: StartupMessage
Represent event startup message.
Fields
- hubName string - Hub name
- subscriberId string - Subscriber Id
trigger.github: StatusesLink
Represent statuses link of GitHub Link
Fields
- href string - Hyper-reference of the Link
trigger.github: Team
Represent Team payload.
Fields
- name string - Name of the Team
- id int - ID
- node_id string - Node ID
- slug string - Slug of the Team
- description string? - Description of the Team
- privacy string - Privacy link of the Team
- url string - URL of the Team
- members_url string - Members URL of the team
- repositories_url string - Repositories URL of the Team
- permission string - Permissions of the Team
trigger.github: Title
Represents the title of a Change
Fields
- 'from string -
trigger.github: User
Represent the GitHub User payload.
Fields
- login string - The username used to login.
- id int - User ID
- node_id? string - Node ID
- avatar_url string - A URL pointing to the user's public avatar.
- gravatar_id string - Graveter ID
- url string - The HTTP URL for this user
- html_url string - HTML url
- followers_url string - Followers URL
- following_url string - Following URL
- gists_url string - Gists URL
- starred_url string - Starred URL
- subscriptions_url string - Subscription URL
- organizations_url string - Organization URL
- repos_url string - Repositories URL
- events_url string - Events URL
- received_events_url string - Received events URL.
- 'type string -
- site_admin boolean - is the user is Site Admin
- name? string - Name of the user
- email? string? - Email of the user.
trigger.github: WatchEvent
Represent GitHub watch event.
Fields
- action WatchActions - The action that was performed. Currently, can only be started.
- repository Repository - The repository where the event occurred.
- sender User - The user that triggered the event.
- organization? Organization - Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository owned by an organization.
Union types
trigger.github: GenericServiceType
GenericServiceType
trigger.github: GenericDataType
GenericDataType
Import
import ballerinax/trigger.github;
Metadata
Released date: about 1 year ago
Version: 0.9.2
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.7.1
GraalVM compatible: Yes
Pull count
Total: 11952
Current verison: 85
Weekly downloads
Keywords
Communication/Team Chat
Cost/Freemium
Trigger
Contributors
Dependencies