ByteChef LogoByteChef

GitHub

GitHub is a web-based platform for version control and collaboration using Git.

Categories: Developer Tools

Type: github/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdClient idSTRINGtrue
clientSecretClient secretSTRINGtrue

Connection Setup

  1. Login to your GitHub account.
  2. Click on your profile icon in the top right corner.
  3. Select Settings from the dropdown menu.
  4. In the left sidebar, click on Developer settings.
  5. In the left sidebar, click on OAuth Apps.
  6. Click on New OAuth App.
  7. Fill in the required fields:
    • Application name: Enter a name for your application (e.g., Test App).
    • Homepage URL: Provide the homepage URL for your application (e.g., https://www.bytechef.io/).
    • Authorization callback URL: Specify the URL where users will be redirected after authorization (e.g., http://127.0.0.1:5173/callback).
  8. Click Register application.
  9. Click on Generate a new client secret.
  10. Copy the Client ID and Client Secret for later use.

Actions

Add Assignee to Issue

Name: addAssigneesToIssue

Adds an assignees to the specified issue.

Properties

NameLabelTypeDescriptionRequired
repositoryRepositorySTRINGtrue
issueIssue NumberSTRING
Depends On repository
The number of the issue to add assignee to.true
assigneesAssigneesARRAY
Items [STRING]
The list of assignees to add to the issue.true

Example JSON Structure

{
  "label" : "Add Assignee to Issue",
  "name" : "addAssigneesToIssue",
  "parameters" : {
    "repository" : "",
    "issue" : "",
    "assignees" : [ "" ]
  },
  "type" : "github/v1/addAssigneesToIssue"
}

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL linking directly to the issue on GitHub.
repository_urlSTRINGThe URL of the repository where the issue is located.
idNUMBERID of the issue.
numberINTEGERA unique number identifying the issue within its repository.
titleSTRINGThe title or headline of the issue.
stateSTRINGThe current state of the issue, such as open or closed.
assigneesARRAY
Items [{STRING(login), STRING(id), STRING(html_url), STRING(type)}]
A list of users assigned to the issue.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
A collection of labels associated with the issue.
bodySTRINGThe main content of the issue.

Output Example

{
  "url" : "",
  "repository_url" : "",
  "id" : 0.0,
  "number" : 1,
  "title" : "",
  "state" : "",
  "assignees" : [ {
    "login" : "",
    "id" : "",
    "html_url" : "",
    "type" : ""
  } ],
  "labels" : [ {
    "id" : "",
    "name" : "",
    "description" : ""
  } ],
  "body" : ""
}

Add Labels to Issue

Name: addLabelsToIssue

Adds labels to the specified issue.

Properties

NameLabelTypeDescriptionRequired
repositoryRepositorySTRINGtrue
issueIssue NumberSTRING
Depends On repository
The number of the issue to add labels to.true
labelsLabelsARRAY
Items [STRING]
The list of labels to add to the issue.true

Example JSON Structure

{
  "label" : "Add Labels to Issue",
  "name" : "addLabelsToIssue",
  "parameters" : {
    "repository" : "",
    "issue" : "",
    "labels" : [ "" ]
  },
  "type" : "github/v1/addLabelsToIssue"
}

Output

Type: ARRAY

Items Type: OBJECT

Properties

NameTypeDescription
idSTRINGID of the label
nameSTRINGName of the label.
descriptionSTRINGDescription of the label.
colorSTRINGThe hexadecimal color code for the label, without the leading #.

Output Example

[ {
  "id" : "",
  "name" : "",
  "description" : "",
  "color" : ""
} ]

Create Comment on Issue

Name: createCommentOnIssue

Adds a comment to the specified issue.

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGRepository where the issue is located.true
issueIssue NumberSTRING
Depends On repository, owner
The number of the issue to comment on.true
bodyCommentSTRINGThe comment to add to the issue.true

Example JSON Structure

{
  "label" : "Create Comment on Issue",
  "name" : "createCommentOnIssue",
  "parameters" : {
    "owner" : "",
    "repository" : "",
    "issue" : "",
    "body" : ""
  },
  "type" : "github/v1/createCommentOnIssue"
}

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL linking directly to the issue on GitHub.
repository_urlSTRINGThe URL of the repository where the issue is located.
idNUMBERID of the issue.
numberINTEGERA unique number identifying the issue within its repository.
titleSTRINGThe title or headline of the issue.
stateSTRINGThe current state of the issue, such as open or closed.
assigneesARRAY
Items [{STRING(login), STRING(id), STRING(html_url), STRING(type)}]
A list of users assigned to the issue.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
A collection of labels associated with the issue.
bodySTRINGThe main content of the issue.

Output Example

{
  "url" : "",
  "repository_url" : "",
  "id" : 0.0,
  "number" : 1,
  "title" : "",
  "state" : "",
  "assignees" : [ {
    "login" : "",
    "id" : "",
    "html_url" : "",
    "type" : ""
  } ],
  "labels" : [ {
    "id" : "",
    "name" : "",
    "description" : ""
  } ],
  "body" : ""
}

Create Fork

Name: createFork

Create a fork of Github repository.

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGRepository that will be forked.true
nameNameSTRINGA new name for the fork.false
organizationOrganizationSTRINGThe organization name if forking into an organization.false
defaultBranchOnlyDefault Branch OnlyBOOLEAN
Options true, false
When forking from an existing repository, fork with only the default branch.false

Example JSON Structure

{
  "label" : "Create Fork",
  "name" : "createFork",
  "parameters" : {
    "owner" : "",
    "repository" : "",
    "name" : "",
    "organization" : "",
    "defaultBranchOnly" : false
  },
  "type" : "github/v1/createFork"
}

Output

Type: OBJECT

Properties

NameTypeDescription
idSTRINGThe unique identifier of the fork.
node_idSTRINGThe node ID of the fork.
nameSTRINGThe name of the forked repository.
full_nameSTRINGThe full name of the forked repository including owner.
ownerOBJECT
Properties {STRING(login), STRING(id), STRING(node_id), STRING(url)}
Owner information.
privateBOOLEAN
Options true, false
Indicates if the forked repository is private.
html_urlSTRINGHTML URL of the forked repository.
urlSTRINGAPI URL of the forked repository.
descriptionSTRINGDescription of the repository.
forkSTRINGWhether this repository is a fork.
created_atSTRINGCreation timestamp.
updated_atSTRINGLast update timestamp.
pushed_atSTRINGLast push timestamp.
default_branchSTRINGDefault branch name.

Output Example

{
  "id" : "",
  "node_id" : "",
  "name" : "",
  "full_name" : "",
  "owner" : {
    "login" : "",
    "id" : "",
    "node_id" : "",
    "url" : ""
  },
  "private" : false,
  "html_url" : "",
  "url" : "",
  "description" : "",
  "fork" : "",
  "created_at" : "",
  "updated_at" : "",
  "pushed_at" : "",
  "default_branch" : ""
}

Create Issue

Name: createIssue

Create Issue in GitHub Repository

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGRepository where new issue will be created.true
titleTitleSTRINGTitle of the issue.false
bodyDescriptionSTRINGThe description of the issue.false

Example JSON Structure

{
  "label" : "Create Issue",
  "name" : "createIssue",
  "parameters" : {
    "owner" : "",
    "repository" : "",
    "title" : "",
    "body" : ""
  },
  "type" : "github/v1/createIssue"
}

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL linking directly to the issue on GitHub.
repository_urlSTRINGThe URL of the repository where the issue is located.
idNUMBERID of the issue.
numberINTEGERA unique number identifying the issue within its repository.
titleSTRINGThe title or headline of the issue.
stateSTRINGThe current state of the issue, such as open or closed.
assigneesARRAY
Items [{STRING(login), STRING(id), STRING(html_url), STRING(type)}]
A list of users assigned to the issue.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
A collection of labels associated with the issue.
bodySTRINGThe main content of the issue.

Output Example

{
  "url" : "",
  "repository_url" : "",
  "id" : 0.0,
  "number" : 1,
  "title" : "",
  "state" : "",
  "assignees" : [ {
    "login" : "",
    "id" : "",
    "html_url" : "",
    "type" : ""
  } ],
  "labels" : [ {
    "id" : "",
    "name" : "",
    "description" : ""
  } ],
  "body" : ""
}

Create Pull Request

Name: createPullRequest

Creates a new pull request.

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGRepository where new pull request will be created.true
titleTitleSTRINGTitle of the new pull request.false
bodyBodySTRINGThe contents of the pull request.false
headHeadSTRINGThe name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.true
head_repoHead RepoSTRINGThe name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization.false
baseBaseSTRINGThe name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.true
issueIssueINTEGERAn issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless title is specified.false
draftDraftBOOLEAN
Options true, false
Indicates whether the pull request is a draft.true

Example JSON Structure

{
  "label" : "Create Pull Request",
  "name" : "createPullRequest",
  "parameters" : {
    "owner" : "",
    "repository" : "",
    "title" : "",
    "body" : "",
    "head" : "",
    "head_repo" : "",
    "base" : "",
    "issue" : 1,
    "draft" : false
  },
  "type" : "github/v1/createPullRequest"
}

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL of the created pull request.
idINTEGERID of the created pull request.
node_idSTRING
html_urlSTRING
diff_urlSTRING
patch_urlSTRING
issue_urlSTRING
commits_urlSTRING
review_comment_urlSTRING
comments_urlSTRING
statuses_urlSTRING
numberINTEGERNumber uniquely identifying the pull request within its repository.
stateSTRINGThe state of the pull request. Either open or closed.
lockedBOOLEAN
Options true, false
titleSTRINGThe title of the pull request.
userOBJECT
Properties {STRING(login), STRING(id), STRING(html_url), STRING(type)}
A GitHub user.
bodySTRINGThe contents of the pull request.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
commentsINTEGERThe number of comments on the pull request.
review_commentsINTEGERThe number of comments for review on the pull request.
maintainer_can_modifyBOOLEAN
Options true, false
Indicates whether maintainers can modify the pull request.
commitsINTEGERThe number of commits in the pull request.
additionsINTEGERThe number of additions in the pull request.
deletionsINTEGERThe number of deletions in the pull request.
changed_filesINTEGERThe number of changed files in the pull request.

Output Example

{
  "url" : "",
  "id" : 1,
  "node_id" : "",
  "html_url" : "",
  "diff_url" : "",
  "patch_url" : "",
  "issue_url" : "",
  "commits_url" : "",
  "review_comment_url" : "",
  "comments_url" : "",
  "statuses_url" : "",
  "number" : 1,
  "state" : "",
  "locked" : false,
  "title" : "",
  "user" : {
    "login" : "",
    "id" : "",
    "html_url" : "",
    "type" : ""
  },
  "body" : "",
  "labels" : [ {
    "id" : "",
    "name" : "",
    "description" : ""
  } ],
  "comments" : 1,
  "review_comments" : 1,
  "maintainer_can_modify" : false,
  "commits" : 1,
  "additions" : 1,
  "deletions" : 1,
  "changed_files" : 1
}

Get Issue

Name: getIssue

Get information from a specific issue

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGRepository where the issue is located.true
issueIssue NumberSTRING
Depends On repository, owner
The number of the issue you want to get details from.true

Example JSON Structure

{
  "label" : "Get Issue",
  "name" : "getIssue",
  "parameters" : {
    "owner" : "",
    "repository" : "",
    "issue" : ""
  },
  "type" : "github/v1/getIssue"
}

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL linking directly to the issue on GitHub.
repository_urlSTRINGThe URL of the repository where the issue is located.
idNUMBERID of the issue.
numberINTEGERA unique number identifying the issue within its repository.
titleSTRINGThe title or headline of the issue.
stateSTRINGThe current state of the issue, such as open or closed.
assigneesARRAY
Items [{STRING(login), STRING(id), STRING(html_url), STRING(type)}]
A list of users assigned to the issue.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
A collection of labels associated with the issue.
bodySTRINGThe main content of the issue.

Output Example

{
  "url" : "",
  "repository_url" : "",
  "id" : 0.0,
  "number" : 1,
  "title" : "",
  "state" : "",
  "assignees" : [ {
    "login" : "",
    "id" : "",
    "html_url" : "",
    "type" : ""
  } ],
  "labels" : [ {
    "id" : "",
    "name" : "",
    "description" : ""
  } ],
  "body" : ""
}

Get Repository Content

Name: getRepositoryContent

Gets the contents of a file or directory in a repository. If the content is a directory, the response will be each item in the directory and if the content is a file, the response will be file as a string.

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGRepository where the content is located.true
pathPathSTRINGPath to the file or the directory.true

Example JSON Structure

{
  "label" : "Get Repository Content",
  "name" : "getRepositoryContent",
  "parameters" : {
    "owner" : "",
    "repository" : "",
    "path" : ""
  },
  "type" : "github/v1/getRepositoryContent"
}

Output

Type: STRING

List Issues

Name: listIssues

Retrieve issues assigned to the authenticated user across all accessible repositories.

Properties

NameLabelTypeDescriptionRequired
filterFilterSTRING
Options assigned, created, mentioned, subscribed, repos, all
Specifies the types of issues to return.true
stateStateSTRING
Options open, closed, all
Indicates the state of the issues to return.true

Example JSON Structure

{
  "label" : "List Issues",
  "name" : "listIssues",
  "parameters" : {
    "filter" : "",
    "state" : ""
  },
  "type" : "github/v1/listIssues"
}

Output

Type: ARRAY

Items Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL linking directly to the issue on GitHub.
repository_urlSTRINGThe URL of the repository where the issue is located.
idNUMBERID of the issue.
numberINTEGERA unique number identifying the issue within its repository.
titleSTRINGThe title or headline of the issue.
stateSTRINGThe current state of the issue, such as open or closed.
assigneesARRAY
Items [{STRING(login), STRING(id), STRING(html_url), STRING(type)}]
A list of users assigned to the issue.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
A collection of labels associated with the issue.
bodySTRINGThe main content of the issue.

Output Example

[ {
  "url" : "",
  "repository_url" : "",
  "id" : 0.0,
  "number" : 1,
  "title" : "",
  "state" : "",
  "assignees" : [ {
    "login" : "",
    "id" : "",
    "html_url" : "",
    "type" : ""
  } ],
  "labels" : [ {
    "id" : "",
    "name" : "",
    "description" : ""
  } ],
  "body" : ""
} ]

List Repository Issues

Name: listRepositoryIssues

Lists issues in a repository. Only open issues will be listed.

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGThe name of the repositorytrue

Example JSON Structure

{
  "label" : "List Repository Issues",
  "name" : "listRepositoryIssues",
  "parameters" : {
    "owner" : "",
    "repository" : ""
  },
  "type" : "github/v1/listRepositoryIssues"
}

Output

Type: ARRAY

Items Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL linking directly to the issue on GitHub.
repository_urlSTRINGThe URL of the repository where the issue is located.
idNUMBERID of the issue.
numberINTEGERA unique number identifying the issue within its repository.
titleSTRINGThe title or headline of the issue.
stateSTRINGThe current state of the issue, such as open or closed.
assigneesARRAY
Items [{STRING(login), STRING(id), STRING(html_url), STRING(type)}]
A list of users assigned to the issue.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
A collection of labels associated with the issue.
bodySTRINGThe main content of the issue.

Output Example

[ {
  "url" : "",
  "repository_url" : "",
  "id" : 0.0,
  "number" : 1,
  "title" : "",
  "state" : "",
  "assignees" : [ {
    "login" : "",
    "id" : "",
    "html_url" : "",
    "type" : ""
  } ],
  "labels" : [ {
    "id" : "",
    "name" : "",
    "description" : ""
  } ],
  "body" : ""
} ]

Star Repository

Name: starRepository

Stars a repository for the authenticated user.

Properties

NameLabelTypeDescriptionRequired
ownerUser/OrganizationSTRINGThe owner of the repository (user or organization).true
repositoryRepositorySTRINGThe name of the repository including owner without the .git extension. The name is not case sensitive.true

Example JSON Structure

{
  "label" : "Star Repository",
  "name" : "starRepository",
  "parameters" : {
    "owner" : "",
    "repository" : ""
  },
  "type" : "github/v1/starRepository"
}

Output

This action does not produce any output.

Triggers

Events Trigger

Name: eventsTrigger

Triggers on specified events.

Type: DYNAMIC_WEBHOOK

Properties

NameLabelTypeDescriptionRequired
repositoryRepositorySTRINGtrue
eventsEventsARRAY
Items [STRING]
Determines what events the hook is triggered for.true

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

JSON Example

{
  "label" : "Events Trigger",
  "name" : "eventsTrigger",
  "parameters" : {
    "repository" : "",
    "events" : [ "" ]
  },
  "type" : "github/v1/eventsTrigger"
}

New Issue

Name: newIssue

Triggers when a new issue is created.

Type: POLLING

Properties

NameLabelTypeDescriptionRequired
repositoryRepositorySTRINGtrue

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRINGThe URL linking directly to the issue on GitHub.
repository_urlSTRINGThe URL of the repository where the issue is located.
idNUMBERID of the issue.
numberINTEGERA unique number identifying the issue within its repository.
titleSTRINGThe title or headline of the issue.
stateSTRINGThe current state of the issue, such as open or closed.
assigneesARRAY
Items [{STRING(login), STRING(id), STRING(html_url), STRING(type)}]
A list of users assigned to the issue.
labelsARRAY
Items [{STRING(id), STRING(name), STRING(description)}]
A collection of labels associated with the issue.
bodySTRINGThe main content of the issue.

JSON Example

{
  "label" : "New Issue",
  "name" : "newIssue",
  "parameters" : {
    "repository" : ""
  },
  "type" : "github/v1/newIssue"
}

New Pull Request

Name: newPullRequest

Triggers when a new pull request is created.

Type: POLLING

Properties

NameLabelTypeDescriptionRequired
repositoryRepositorySTRINGtrue

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

JSON Example

{
  "label" : "New Pull Request",
  "name" : "newPullRequest",
  "parameters" : {
    "repository" : ""
  },
  "type" : "github/v1/newPullRequest"
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.

How is this guide?

Last updated on

On this page