The GitHub component is an application component that allows users to do anything available on GitHub. It can carry out the following tasks:
- List Pull Requests
- Get Pull Request
- Get Commit
- List Review Comments
- Create Review Comment
- List Issues
- Get Issue
- Get User
- Get Organization
- Create Issue
- Create Webhook
#Release Stage
Alpha
#Configuration
The component definition and tasks are defined in the definition.yaml and tasks.yaml files respectively.
#Setup
In order to communicate with GitHub, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's setup
block, or you can create a Connection from
the Integration Settings
page and reference the whole setup
as setup: ${connection.<my-connection-id>}
.
Field | Field ID | Type | Note |
---|---|---|---|
Token (required) | token | string | Fill in your GitHub access token for advanced usages. For more information about how to create tokens, please refer to the github settings. |
#Supported Tasks
#List Pull Requests
Get the list of all pull requests in a repository. Detailed information about each commit in a PR is omitted, please use the Get Commit
task or the Get Pull Request
task to get the details of a commit.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_LIST_PULL_REQUESTS |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
State | state | string | State of the PRs, including open, closed, all. Default is open. Enum values
|
Sort | sort | string | Sort the PRs by created, updated, popularity, or long-running. Default is created. Enum values
|
Direction | direction | string | Direction of the sort, including asc or desc. Default is desc. Enum values
|
Page | page | integer | Page number of the results to fetch. Default is 1. |
Per Page | per-page | integer | Number of results to fetch per page. Default is 30. |
Output | Field ID | Type | Description |
---|---|---|---|
Pull Requests | pull-requests | array[object] | An array of PRs. |
Output Objects in List Pull Requests
Pull Requests
Field | Field ID | Type | Note |
---|---|---|---|
PR base | base | string | Base commit of the PR (in SHA value). |
PR body | body | string | Body of the PR. |
Number of PR comments | comments-num | integer | Number of comments on the PR. |
Commits | commits | array | Commits in the PR. |
Number of PR commits | commits-num | integer | Number of commits in the PR. |
PR diff url | diff-url | string | URL to the diff of the PR. |
PR head | head | string | Head commit of the PR (in SHA value). |
PR id | id | integer | ID of the PR. |
PR number | number | integer | Number of the PR. |
Number of PR review comments | review-comments-num | integer | Number of review comments in the PR. |
PR state | state | string | State of the PR. |
PR Title | title | string | Title of the PR. |
Commits
Field | Field ID | Type | Note |
---|---|---|---|
Files | files | array | Files in the commit. |
Commit message | message | string | Message of the commit. |
Commit SHA | sha | string | SHA of the commit. |
Commit stats | stats | object | Stats of changes. |
Commit Stats
Field | Field ID | Type | Note |
---|---|---|---|
Additions | additions | integer | Number of additions in the commit. |
Total changes | changes | integer | Total number of changes in the commit. |
Deletions | deletions | integer | Number of deletions in the commit. |
Files
Field | Field ID | Type | Note |
---|---|---|---|
Additions | additions | integer | Number of additions in the commit. |
Total changes | changes | integer | Total number of changes in the commit. |
Deletions | deletions | integer | Number of deletions in the commit. |
File name | filename | string | Name of the file. |
Patch | patch | string | Patch of the file. |
#Get Pull Request
Get a pull request from a repository, given the PR number. This will default to the latest PR if no PR number is provided.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_GET_PULL_REQUEST |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
PR Number | pr-number | integer | Number of the PR. 0 for the latest PR. |
Output | Field ID | Type | Description |
---|---|---|---|
PR ID (optional) | id | integer | ID of the PR. |
PR Number (optional) | number | integer | Number of the PR. |
PR State (optional) | state | string | State of the PR. |
PR Title (optional) | title | string | Title of the PR. |
PR Body (optional) | body | string | Body of the PR. |
PR Diff URL (optional) | diff-url | string | URL to the diff of the PR. |
PR Head (optional) | head | string | Head commit of the PR (in SHA value). |
PR Base (optional) | base | string | Base commit of the PR (in SHA value). |
Number of PR Comments (optional) | comments-num | integer | Number of comments on the PR. |
Number of PR Commits (optional) | commits-num | integer | Number of commits in the PR. |
Number of PR Review Comments (optional) | review-comments-num | integer | Number of review comments in the PR. |
Commits (optional) | commits | array[object] | Commits in the PR. |
Output Objects in Get Pull Request
Commits
Field | Field ID | Type | Note |
---|---|---|---|
Files | files | array | Files in the commit. |
Commit message | message | string | Message of the commit. |
Commit SHA | sha | string | SHA of the commit. |
Commit stats | stats | object | Stats of changes. |
Commit Stats
Field | Field ID | Type | Note |
---|---|---|---|
Additions | additions | integer | Number of additions in the commit. |
Total changes | changes | integer | Total number of changes in the commit. |
Deletions | deletions | integer | Number of deletions in the commit. |
Files
Field | Field ID | Type | Note |
---|---|---|---|
Additions | additions | integer | Number of additions in the commit. |
Total changes | changes | integer | Total number of changes in the commit. |
Deletions | deletions | integer | Number of deletions in the commit. |
File name | filename | string | Name of the file. |
Patch | patch | string | Patch of the file. |
#Get Commit
Get a commit from a repository, given the commit SHA
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_GET_COMMIT |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
Commit SHA (required) | sha | string | SHA of the commit. |
Output | Field ID | Type | Description |
---|---|---|---|
Commit SHA (optional) | sha | string | SHA of the commit. |
Commit Message (optional) | message | string | Message of the commit. |
Commit Stats (optional) | stats | object | Stats of changes. |
Files (optional) | files | array[object] | Files in the commit. |
Output Objects in Get Commit
Commit Stats
Field | Field ID | Type | Note |
---|---|---|---|
Additions | additions | integer | Number of additions in the commit. |
Total changes | changes | integer | Total number of changes in the commit. |
Deletions | deletions | integer | Number of deletions in the commit. |
Files
Field | Field ID | Type | Note |
---|---|---|---|
Additions | additions | integer | Number of additions in the commit. |
Total changes | changes | integer | Total number of changes in the commit. |
Deletions | deletions | integer | Number of deletions in the commit. |
File name | filename | string | Name of the file. |
Patch | patch | string | Patch of the file. |
#List Review Comments
Get the review comments in a pull request. The comments can be on a specific line or on the PR as a whole.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_LIST_REVIEW_COMMENTS |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
PR Number | pr-number | integer | Number of the PR. Default is 0 , which retrieves all comments on all PRs in the repository. |
Sort | sort | string | Sort the comments by created, updated. Default is created. Enum values
|
Direction | direction | string | Direction of the sort, including asc or desc. Default is desc. Enum values
|
Since | since | string | Date (in YYYY-MM-DD format) from which comments will start to be fetched. The date will be in the UTC timezone. |
Page | page | integer | Page number of the results to fetch. Default is 1. |
Per Page | per-page | integer | Number of results to fetch per page. Default is 30. |
Output | Field ID | Type | Description |
---|---|---|---|
Comments | comments | array[object] | An array of comments. |
Output Objects in List Review Comments
Comments
Field | Field ID | Type | Note |
---|---|---|---|
Comment body | body | string | Body of the comment. |
Commit SHA | commit-id | string | SHA of the commit on which you want to comment. |
Comment created at | created-at | string | Time the comment was created. |
Comment id | id | integer | ID of the comment. |
In Reply To | in-reply-to-id | integer | ID of the comment this comment is in reply to. |
Comment end line | line | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. |
Comment path | path | string | Path of the file the comment is on. |
Comment end side | side | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. |
Comment start line | start-line | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. |
Comment start side | start-side | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. |
Comment type | subject-type | string | Subject type of the comment, can be one of: line, file. Default is line. |
Comment updated at | updated-at | string | Time the comment was updated. |
User | user | object | User who created the comment. |
User
Field | Field ID | Type | Note |
---|---|---|---|
User id | id | integer | ID of the user. |
User URL | url | string | URL of the user. |
#Create Review Comment
Create a review comment in a pull request. The comment can be a general comment or a review comment. The comment can be on a specific line or on the PR as a whole.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_CREATE_REVIEW_COMMENT |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
PR Number (required) | pr-number | integer | Number of the PR. |
Comment (required) | comment | object | The comment to be added. |
Input Objects in Create Review Comment
Comment
The comment to be added.
Field | Field ID | Type | Note |
---|---|---|---|
Comment body | body | string | Body of the comment. |
Commit SHA | commit-id | string | SHA of the commit on which you want to comment. |
Comment end line | line | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. |
Comment path | path | string | Path of the file the comment is on. |
Comment end side | side | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. Enum values
|
Comment start line | start-line | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. |
Comment start side | start-side | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. Enum values
|
Comment type | subject-type | string | Subject type of the comment, can be one of: line, file. Default is line. Enum values
|
Output | Field ID | Type | Description |
---|---|---|---|
Comment ID (optional) | id | integer | ID of the comment. |
In Reply To (optional) | in-reply-to-id | integer | ID of the comment this comment is in reply to. |
Commit SHA (optional) | commit-id | string | SHA of the commit on which you want to comment. |
Comment Body (optional) | body | string | Body of the comment. |
Comment Path (optional) | path | string | Path of the file the comment is on. |
Comment End Line (optional) | line | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. |
Comment Start Line (optional) | start-line | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. |
Comment End Side (optional) | side | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. |
Comment Start Side (optional) | start-side | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. |
Comment Type (optional) | subject-type | string | Subject type of the comment, can be one of: line, file. Default is line. |
Comment Created At (optional) | created-at | string | Time the comment was created. |
Comment Updated At (optional) | updated-at | string | Time the comment was updated. |
User (optional) | user | object | User who created the comment. |
Output Objects in Create Review Comment
User
Field | Field ID | Type | Note |
---|---|---|---|
User id | id | integer | ID of the user. |
User URL | url | string | URL of the user. |
#List Issues
Get the list of all issues in a repository,This can be a pull request or a general issue, and you can tell by the is-pull-request
field.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_LIST_ISSUES |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
State | state | string | State of the issues, can be one of: open, closed, all. Default is open. Enum values
|
Sort | sort | string | Sort the issues by created, updated, popularity, or long-running. Default is created. Enum values
|
Direction | direction | string | Direction of the sort, can be one of: asc, desc. Default is desc. Enum values
|
Since | since | string | Date (in YYYY-MM-DD format) from which issues will start to be fetched. The date will be in the UTC timezone. |
No Pull Request | no-pull-request | boolean | Whether to not include pull requests in the response. Since issue and pr use the same indexing system in GitHub, the API returns all relevant objects (issues and pr). Default is false. |
Page | page | integer | Page number of the results to fetch. Default is 1. |
Per Page | per-page | integer | Number of results to fetch per page. Default is 30. |
Output | Field ID | Type | Description |
---|---|---|---|
Issues | issues | array[object] | An array of issues. |
Output Objects in List Issues
Issues
Field | Field ID | Type | Note |
---|---|---|---|
Assignee | assignee | string | Assignee of the issue. |
Assignees | assignees | array | Assignees of the issue. |
Issue body | body | string | Body of the issue. |
Is Pull Request | is-pull-request | boolean | Whether the issue is a pull request. |
Labels | labels | array | Labels of the issue. |
Issue Number | number | integer | Number of the issue. |
Issue state | state | string | State of the issue. |
Issue title | title | string | Title of the issue. |
#Get Issue
Get an issue. This can be a pull request or a general issue, and you can tell by the is-pull-request
field.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_GET_ISSUE |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
Issue Number (required) | issue-number | integer | Number of the issue. |
Output | Field ID | Type | Description |
---|---|---|---|
Issue Number (optional) | number | integer | Number of the issue. |
Issue State (optional) | state | string | State of the issue. |
Issue Title (optional) | title | string | Title of the issue. |
Issue Body (optional) | body | string | Body of the issue. |
Assignee (optional) | assignee | string | Assignee of the issue. |
Assignees (optional) | assignees | array[string] | Assignees of the issue. |
Labels (optional) | labels | array[string] | Labels of the issue. |
Is Pull Request (optional) | is-pull-request | boolean | Whether the issue is a pull request. |
#Get User
Get a user by name or ID.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_GET_USER |
Name | name | string | The GitHub username of the user. |
ID | id | integer | The GitHub user ID. If both name and id are provided, id takes precedence. |
Output | Field ID | Type | Description |
---|---|---|---|
User (optional) | user | any | The GitHub user information. |
#Get Organization
Get an organization by name or ID.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_GET_ORGANIZATION |
Name | name | string | The GitHub organization name. |
ID | id | integer | The GitHub organization ID. If both name and id are provided, id takes precedence. |
Output | Field ID | Type | Description |
---|---|---|---|
Organization Full (optional) | organization | object | Organization Full |
Output Objects in Get Organization
Organization Full
Field | Field ID | Type | Note |
---|---|---|---|
Advanced Security Enabled For New Repositories | advanced-security-enabled-for-new-repositories | boolean | Whether GitHub Advanced Security is enabled for new repositories. |
Archived At | archived-at | string | The timestamp when the organization was archived, if applicable. |
Avatar URL | avatar-url | string | The URL of the organization's avatar image. |
Billing Email | billing-email | string | The billing email address for the organization. |
Blog | blog | string | The blog URL of the organization. |
Collaborators | collaborators | integer | The number of collaborators on private repositories. |
Company | company | string | The company name associated with the organization. |
Created At | created-at | string | The timestamp when the organization was created. |
Default Repository Permission | default-repository-permission | string | The default repository permission level for organization members. |
Dependabot Alerts Enabled For New Repositories | dependabot-alerts-enabled-for-new-repositories | boolean | Whether Dependabot alerts are enabled for new repositories. |
Dependabot Security Updates Enabled For New Repositories | dependabot-security-updates-enabled-for-new-repositories | boolean | Whether Dependabot security updates are enabled for new repositories. |
Dependency Graph Enabled For New Repositories | dependency-graph-enabled-for-new-repositories | boolean | Whether dependency graph is enabled for new repositories. |
Deploy Keys Enabled For Repositories | deploy-keys-enabled-for-repositories | boolean | Controls whether or not deploy keys may be added and used for repositories in the organization. |
Description | description | string | The description of the organization. |
Disk Usage | disk-usage | integer | The amount of disk space used by the organization. |
email | string | The public email address of the organization. | |
Events URL | events-url | string | The URL of the organization's events API endpoint. |
Followers | followers | integer | The number of followers. |
Following | following | integer | The number of users the organization is following. |
Has Organization Projects | has-organization-projects | boolean | Whether organization projects are enabled. |
Has Repository Projects | has-repository-projects | boolean | Whether repository projects are enabled. |
Hooks URL | hooks-url | string | The URL of the organization's webhooks API endpoint. |
HTML URL | html-url | string | The URL of the organization's GitHub homepage. |
ID | id | integer | The unique identifier of the organization. |
Is Verified | is-verified | boolean | Whether the organization is verified by GitHub. |
Issues URL | issues-url | string | The URL of the organization's issues API endpoint. |
Location | location | string | The location of the organization. |
Login | login | string | The organization's username. |
Members Allowed Repository Creation Type | members-allowed-repository-creation-type | string | The type of repositories members are allowed to create. |
Members Can Create Internal Repositories | members-can-create-internal-repositories | boolean | Whether members can create internal repositories. |
Members Can Create Pages | members-can-create-pages | boolean | Whether members can create GitHub Pages sites. |
Members Can Create Private Pages | members-can-create-private-pages | boolean | Whether members can create private GitHub Pages sites. |
Members Can Create Private Repositories | members-can-create-private-repositories | boolean | Whether members can create private repositories. |
Members Can Create Public Pages | members-can-create-public-pages | boolean | Whether members can create public GitHub Pages sites. |
Members Can Create Public Repositories | members-can-create-public-repositories | boolean | Whether members can create public repositories. |
Members Can Create Repositories | members-can-create-repositories | boolean | Whether organization members can create repositories. |
Members Can Fork Private Repositories | members-can-fork-private-repositories | boolean | Whether members can fork private repositories. |
Members URL | members-url | string | The URL of the organization's members API endpoint. |
Name | name | string | The display name of the organization. |
Node ID | node-id | string | The GraphQL node ID of the organization. |
Owned Private Repositories | owned-private-repos | integer | The number of private repositories owned by the organization. |
Plan | plan | object | The organization's plan details. |
Private Gists | private-gists | integer | The number of private gists. |
Public Gists | public-gists | integer | The number of public gists. |
Public Members URL | public-members-url | string | The URL of the organization's public members API endpoint. |
Public Repositories | public-repos | integer | The number of public repositories. |
Repositories URL | repos-url | string | The URL of the organization's repositories API endpoint. |
Secret Scanning Enabled For New Repositories | secret-scanning-enabled-for-new-repositories | boolean | Whether secret scanning is enabled for new repositories. |
Secret Scanning Push Protection Custom Link | secret-scanning-push-protection-custom-link | string | An optional URL string to display to contributors who are blocked from pushing a secret. |
Secret Scanning Push Protection Custom Link Enabled | secret-scanning-push-protection-custom-link-enabled | boolean | Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. |
Secret Scanning Push Protection Enabled For New Repositories | secret-scanning-push-protection-enabled-for-new-repositories | boolean | Whether secret scanning push protection is enabled for new repositories. |
Total Private Repositories | total-private-repos | integer | The total number of private repositories. |
Twitter Username | twitter-username | string | The Twitter username of the organization. |
Two Factor Requirement Enabled | two-factor-requirement-enabled | boolean | Whether two-factor authentication is required for all members. |
Type | type | string | The type of the account. |
Updated At | updated-at | string | The timestamp when the organization was last updated. |
URL | url | string | The URL of the organization's API endpoint. |
Web Commit Signoff Required | web-commit-signoff-required | boolean | Whether web commit sign-off is required. |
Plan
Field | Field ID | Type | Note |
---|---|---|---|
Filled Seats | filled-seats | integer | The number of filled seats in the plan. |
Name | name | string | The name of the plan. |
Private Repositories | private-repos | integer | The number of private repositories included in the plan. |
Seats | seats | integer | The total number of seats in the plan. |
Space | space | integer | The amount of disk space included in the plan. |
#Create Issue
Create an issue.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_CREATE_ISSUE |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
Issue Title (required) | title | string | Title of the issue. |
Issue Body (required) | body | string | Body of the issue. |
Assignees | assignees | array[string] | Assignees of the issue. |
Labels | labels | array[string] | Labels of the issue. |
Output | Field ID | Type | Description |
---|---|---|---|
Issue Number (optional) | number | integer | Number of the issue. |
Issue State (optional) | state | string | State of the issue. |
Issue Title (optional) | title | string | Title of the issue. |
Issue Body (optional) | body | string | Body of the issue. |
Assignee (optional) | assignee | string | Assignee of the issue. |
Assignees (optional) | assignees | array[string] | Assignees of the issue. |
Labels (optional) | labels | array[string] | Labels of the issue. |
Is Pull Request (optional) | is-pull-request | boolean | Whether the issue is a pull request. |
#Create Webhook
Create a webhook for a repository.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_CREATE_WEBHOOK |
Owner (required) | owner | string | Owner of the repository. |
Repository (required) | repository | string | Repository name. |
Webhook URL (required) | hook-url | string | URL to send the payload to. |
Events (required) | events | array[string] | Events to trigger the webhook. Please see the github document for more information. |
Active | active | boolean | Whether the webhook is active. Default is false. |
Content Type | content-type | string | Content type of the webhook, can be one of: json, form. Default is json. Enum values
|
Hook Secret | hook-secret | string | If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers. (see the document). |
Output | Field ID | Type | Description |
---|---|---|---|
Webhook ID (optional) | id | integer | ID of the webhook. |
Webhook URL (optional) | url | string | URL of the webhook. |
Ping URL (optional) | ping-url | string | URL to ping the webhook. |
Test URL (optional) | test-url | string | URL to test the webhook. |
Config (optional) | config | object | Configuration of the webhook. |
Output Objects in Create Webhook
Config
Field | Field ID | Type | Note |
---|---|---|---|
Content Type | content-type | string | Content type of the webhook. |
Insecure SSL | insecure-ssl | string | Whether the webhook is insecure. |
Webhook URL | url | string | URL of the webhook. |
#Supported Events
Only repository owners can configure event. Make sure you have owner permissions for the repository you want to monitor.
#Star Created Event
A star created event from GitHub.
Configuration | ID | Type | Description |
---|---|---|---|
Repository | repository | string | The repository to watch for star events. |
Event Message | ID | Type | Description |
---|---|---|---|
Action | action | string | The action performed (always "created"). |
Starred At | starred-at | string | The time the star was created. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ . Will be null for the deleted action. |
Repository | repository | object | A git repository. |
Sender | sender | object | User who performed the action. |
Event Message Objects
Repository
Field | Field ID | Type | Note |
---|---|---|---|
ID | id | integer | Unique identifier of the repository. |
Node ID | node-id | string | The GraphQL identifier of the repository. |
Name | name | string | The name of the repository. |
Full Name | full-name | string | The full, globally unique, name of the repository. |
Private | private | boolean | Whether the repository is private or public. |
Owner | owner | object | The owner of the repository. |
HTML URL | html-url | string | The URL to view the repository on GitHub.com. |
Description | description | string | The repository description. |
Fork | fork | boolean | Whether the repository is a fork. |
URL | url | string | The URL to get more information about the repository from the GitHub API. |
Forks URL | forks-url | string | The API URL to list the forks of the repository. |
Keys URL | keys-url | string | A template for the API URL to get information about deploy keys on the repository. |
Collaborators URL | collaborators-url | string | A template for the API URL to get information about collaborators of the repository. |
Teams URL | teams-url | string | The API URL to list the teams on the repository. |
Hooks URL | hooks-url | string | The API URL to list the hooks on the repository. |
Issue Events URL | issue-events-url | string | A template for the API URL to get information about issue events on the repository. |
Events URL | events-url | string | The API URL to list the events of the repository. |
Assignees URL | assignees-url | string | A template for the API URL to list the available assignees for issues in the repository. |
Branches URL | branches-url | string | A template for the API URL to get information about branches in the repository. |
Tags URL | tags-url | string | The API URL to get information about tags on the repository. |
Blobs URL | blobs-url | string | A template for the API URL to create or retrieve a raw Git blob in the repository. |
Git Tags URL | git-tags-url | string | A template for the API URL to get information about Git tags of the repository. |
Git Refs URL | git-refs-url | string | A template for the API URL to get information about Git refs of the repository. |
Trees URL | trees-url | string | A template for the API URL to create or retrieve a raw Git tree of the repository. |
Statuses URL | statuses-url | string | A template for the API URL to get information about statuses of a commit. |
Languages URL | languages-url | string | The API URL to get information about the languages of the repository. |
Stargazers URL | stargazers-url | string | The API URL to list the stargazers on the repository. |
Contributors URL | contributors-url | string | A template for the API URL to list the contributors to the repository. |
Subscribers URL | subscribers-url | string | The API URL to list the subscribers on the repository. |
Subscription URL | subscription-url | string | The API URL to subscribe to notifications for this repository. |
Commits URL | commits-url | string | A template for the API URL to get information about commits on the repository. |
Git Commits URL | git-commits-url | string | A template for the API URL to get information about Git commits of the repository. |
Comments URL | comments-url | string | A template for the API URL to get information about comments on the repository. |
Issue Comment URL | issue-comment-url | string | A template for the API URL to get information about issue comments on the repository. |
Contents URL | contents-url | string | A template for the API URL to get the contents of the repository. |
Compare URL | compare-url | string | A template for the API URL to compare two commits or refs. |
Merges URL | merges-url | string | The API URL to merge branches in the repository. |
Archive URL | archive-url | string | A template for the API URL to download the repository as an archive. |
Downloads URL | downloads-url | string | The API URL to list the downloads on the repository. |
Issues URL | issues-url | string | A template for the API URL to get information about issues on the repository. |
Pulls URL | pulls-url | string | A template for the API URL to get information about pull requests on the repository. |
Milestones URL | milestones-url | string | A template for the API URL to get information about milestones of the repository. |
Notifications URL | notifications-url | string | A template for the API URL to get information about notifications on the repository. |
Labels URL | labels-url | string | A template for the API URL to get information about labels of the repository. |
Releases URL | releases-url | string | A template for the API URL to get information about releases on the repository. |
Deployments URL | deployments-url | string | The API URL to list the deployments of the repository. |
Created At | created-at | string/integer | The time the repository was created. |
Updated At | updated-at | string | The time the repository was last updated. |
Pushed At | pushed-at | string/integer/null | The time the repository was last pushed to. |
Git URL | git-url | string | The Git URL to the repository. |
SSH URL | ssh-url | string | The SSH URL to the repository. |
Clone URL | clone-url | string | The URL to clone the repository. |
SVN URL | svn-url | string | The SVN URL to the repository. |
Homepage | homepage | string | The homepage URL of the repository. |
Size | size | integer | The size of the repository. |
Stargazers Count | stargazers-count | integer | The number of stargazers. |
Watchers Count | watchers-count | integer | The number of watchers. |
Language | language | string | The primary language of the repository. |
Has Issues | has-issues | boolean | Whether issues are enabled. |
Has Projects | has-projects | boolean | Whether projects are enabled. |
Has Downloads | has-downloads | boolean | Whether downloads are enabled. |
Has Wiki | has-wiki | boolean | Whether the wiki is enabled. |
Has Pages | has-pages | boolean | Whether GitHub Pages is enabled. |
Has Discussions | has-discussions | boolean | Whether discussions are enabled. |
Forks Count | forks-count | integer | The number of forks. |
Mirror URL | mirror-url | string | The URL of the repository mirror. |
Archived | archived | boolean | Whether the repository is archived. |
Disabled | disabled | boolean | Whether the repository is disabled. |
Open Issues Count | open-issues-count | integer | The number of open issues. |
License | license | object | The license information. |
Forks | forks | integer | The number of forks. |
Open Issues | open-issues | integer | The number of open issues. |
Watchers | watchers | integer | The number of watchers. |
Default Branch | default-branch | string | The default branch of the repository. |
Is Template | is-template | boolean | Whether the repository is a template. |
Web Commit Signoff Required | web-commit-signoff-required | boolean | Whether commit signoff is required. |
Topics | topics | array[string] | List of repository topics. |
Visibility | visibility | string | Visibility level of the repository. |
Custom Properties | custom-properties | object | Custom properties of the repository. |
Repository Owner
Field | Field ID | Type | Note |
---|---|---|---|
Login | login | string | The username of the owner. |
ID | id | integer | Unique identifier of the owner. |
Node ID | node-id | string | The GraphQL identifier of the owner. |
Name | name | string | The name of the owner. |
email | string | The email of the owner. | |
Avatar URL | avatar-url | string | URL of the owner's avatar image. |
Gravatar ID | gravatar-id | string | The owner's Gravatar ID. |
URL | url | string | The URL to the owner's GitHub profile. |
HTML URL | html-url | string | The HTML URL to the owner's GitHub profile. |
Followers URL | followers-url | string | The URL to list the owner's followers. |
Following URL | following-url | string | The URL to list who the owner follows. |
Gists URL | gists-url | string | The URL to list the owner's gists. |
Starred URL | starred-url | string | The URL to list repositories the owner has starred. |
Subscriptions URL | subscriptions-url | string | The URL to list the owner's subscriptions. |
Organizations URL | organizations-url | string | The URL to list the owner's organizations. |
Repos URL | repos-url | string | The URL to list the owner's repositories. |
Events URL | events-url | string | The URL to list the owner's events. |
Received Events URL | received-events-url | string | The URL to list events received by the owner. |
Type | type | string | Type of account (Bot, User, or Organization). |
Site Admin | site-admin | boolean | Whether the owner is a GitHub admin. |
Sender
Field | Field ID | Type | Note |
---|---|---|---|
Login | login | string | The username of the sender. |
ID | id | integer | Unique identifier of the sender. |
Node ID | node-id | string | The GraphQL identifier of the sender. |
Avatar URL | avatar-url | string | URL of the sender's avatar image. |
Gravatar ID | gravatar-id | string | The sender's Gravatar ID. |
URL | url | string | The URL to the sender's GitHub profile. |
HTML URL | html-url | string | The HTML URL to the sender's GitHub profile. |
Followers URL | followers-url | string | The URL to list the sender's followers. |
Following URL | following-url | string | The URL to list who the sender follows. |
Gists URL | gists-url | string | The URL to list the sender's gists. |
Starred URL | starred-url | string | The URL to list repositories the sender has starred. |
Subscriptions URL | subscriptions-url | string | The URL to list the sender's subscriptions. |
Organizations URL | organizations-url | string | The URL to list the sender's organizations. |
Repos URL | repos-url | string | The URL to list the sender's repositories. |
Events URL | events-url | string | The URL to list the sender's events. |
Received Events URL | received-events-url | string | The URL to list events received by the sender. |
Type | type | string | Type of account (Bot, User, or Organization). |
Site Admin | site-admin | boolean | Whether the sender is a GitHub admin. |
#Example Recipes
Summarise and pick the most important issues from this list
Recipe for the List GitHub Repo Issues pipeline.
version: v1betacomponent: anthropic-0: type: anthropic task: TASK_TEXT_GENERATION_CHAT input: max-new-tokens: 1000 model-name: claude-3-5-sonnet-latest prompt: Summarise and pick the most important issues from this list ${github.output.issues} system-message: You are a helpful assistant. temperature: 0.7 top-k: 10 github: type: github task: TASK_LIST_ISSUES input: direction: desc no-pull-request: false owner: ${variable.repository-owner} page: 1 per-page: 30 repository: ${variable.repository-name} since: "2021-01-01T00:00:00Z" sort: created state: open setup: token: ${secret.github-demo}variable: repository-name: title: Repository Name description: Name of the repository i.e. instill-core type: string repository-owner: title: Repository Owner description: Name of the repository owner i.e. instill-ai type: stringoutput: result: title: Result value: ${anthropic-0.output.text}
Send a message to Slack when a repository is starred
version: v1betaon: github-0: type: github event: EVENT_STAR_CREATED config: repository: instill-ai/instill-core setup: ${connection.my-github-connection}variable: repository: title: repository type: string listen: - ${on.github-0.message.repository.full-name} user: title: user type: string listen: - ${on.github-0.message.sender.login} description: title: user type: string listen: - ${on.github-0.message.repository.description} stargazers-count: title: stargazers-count type: number listen: - ${on.github-0.message.repository.stargazers-count}output: text: value: ${variable.repository} ${variable.user}component: slack-0: type: slack input: channel-name: test-slack message: | ${variable.user} just starred ${variable.repository}! *Repository Details:* • Description: ${variable.description} • Total Stars: ${variable.stargazers-count} as-user: false condition: setup: ${connection.my-slack-connection} task: TASK_WRITE_MESSAGE