Procedures

Automation procedures in the GitHub BDK Book.

to create a (pull request) in a repository source

Create a pull request for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

The details required to create a pull request. It includes the title, head, base, and body.

github pull request

Yes

Output Concepts

Concept
Description
Type

The pull request just created.

github pull request

Examples

Create a pull request from a repository

the pull request is '{"head": "feature-branch", "base": "main", "title": "This is the title", "body": "This is the body"}'
create the pull request in "kognitos/bdk-api"

to create an (issue) in a repository source

Create an issue for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

The details required to create an issue. It includes the title, and can contain body.

github issue

Yes

Output Concepts

Concept
Description
Type

The issue just created.

github issue

Examples

Create an issue from a repository

the issue is '{"title": "This is the title", "body": "This is the body"}'
create an issue in "kognitos/bdk-api"

to get the (commits) from a repository source

FILTER - CAPABLE

Fetch the list of commits for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

branch

The branch to fetch commits from. Defaults to 'main'.

text

No

main

Output Concepts

Concept
Description
Type

A list of commits with details such as commit message, author, and date.

github commit

Examples

Retrieve the list of commits from the main branch of a repository

get some commits from "kognitos/bdk-api"

Retrieve the list of commits from a specific branch of a repository

get some commits from "kognitos/bdk-api" with
    the branch is "develop"

Retrieve the list of commits that were committed in the specified time period

convert "2024-08-13T15:00:00Z" to a datetime
use the above as the start date
convert "2024-08-20T15:00:00Z" to a datetime
use the above as the end date
get the list of commits from "kognitos/bdk-api" whose date commited is after the start date and whose date commited is before the end date

to get the (issues) from a repository source

Fetch the list of issues for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

state

The state of the issues to fetch. Defaults to 'open'.

noun

No

open

Output Concepts

Concept
Description
Type

A list of issues with details such as title, description, and URL.

github issue

Examples

Retrieve the list of issues from a repository

get some issues from "kognitos/bdk-api"

Retrieve the list of closed issues from a repository

get some issues from "kognitos/bdk-api" with
    the state is closed

to get the (pull request) from a repository source

Fetch the list of pull requests for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

number

The number of the pull request to fetch.

number

Yes

Output Concepts

Concept
Description
Type

A pull request with details such as title, description, and URL.

github pull request

Examples

Retrieve the list of open pull requests from a repository

get a pull request in "kognitos/bdk-api"
    the number is 1

to get the (pull requests) from a repository source

Fetch the list of pull requests for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

state

The state of the pull requests to fetch. Defaults to 'open'.

noun

No

open

Output Concepts

Concept
Description
Type

A list of pull requests with details such as title, description, and URL.

github pull request

Examples

Retrieve the list of pull requests from a repository

get some pull requests in "kognitos/bdk-api"

Retrieve the list of open pull requests from a repository

get some pull requests in "kognitos/bdk-api" with
    the state is open

to get the (repositories) from a source organization

Fetch the list of repositories for a specified GitHub organization.

Input Concepts

Concept
Description
Type
Required
Default Value

source organization

The source organization to fetch repositories from.

conceptual or text

Yes

Output Concepts

Concept
Description
Type

A list of repositories with details such as repository name, description, and URL.

github repository

Examples

Retrieve the list of repositories from an organization

get some repositories from the source organization
   the source organization is "kognitos"

to get the (team) from a source organization

Fetch the team details for a specified GitHub organization.

Input Concepts

Concept
Description
Type
Required
Default Value

source organization

The source organization to fetch team from.

conceptual or text

Yes

slug

The slug of the team to fetch.

text

Yes

Output Concepts

Concept
Description
Type

A team with details such as team name.

github team

Examples

Retrieve the team from an organization

get "integrations-team" from "kognitos"

to get the (teams) from a source organization

Fetch the list of teams for a specified GitHub organization.

Input Concepts

Concept
Description
Type
Required
Default Value

source organization

The source organization to fetch teams from.

conceptual or text

Yes

Output Concepts

Concept
Description
Type

A list of teams with details such as team name.

github team

Examples

Retrieve the list of teams from an organization

get some teams from "kognitos"

to get the (user) from a name

Fetch the details of a user from GitHub.

Input Concepts

Concept
Description
Type
Required
Default Value

name

The name of the user to fetch.

conceptual or text

Yes

Output Concepts

Concept
Description
Type

The user details such as name, login, and email.

github user

Examples

Retrieve the details of a user

get the user "octocat"

to request reviewers for a (pull request)

Request reviewers for a pull request in a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

The pull request.

github pull request

Yes

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

text

Yes

user names

The list of reviewers to request.

text

Yes

team names

The list of team reviewers to request. Defaults to None.

text

No

Output Concepts

Concept
Description
Type

The pull request with the reviewers just requested.

github pull request

Examples

Request reviewers for a pull request to request reviewers for a github pull request the user names are "ignacio-kognitos", "asdflkasdjf" the team names are "kognitos-team"

get a pull request in "kognitos/bdk-api" with
    the number is 1
use the above as the pull request
request user_names for the pull request
    the repository source is "kognitos/bdk-api"
    the user names are "ignacio-kognitos", "asdflkasdjf"
    the team names are "kognitos-team"

to update a (pull request) in a repository source

Update a pull request for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

The details required to update a pull request. It includes the pull request number and can contain title, body, and state.

github pull request

Yes

Output Concepts

Concept
Description
Type

The pull request just updated.

github pull request

Examples

Update a pull request from a repository

the pull request is '{"number": "1", "title": "This is the edited title", "body": "This is the edited body", "state": "open"}'
update the pull request in "kognitos/bdk-api"

to update an (issue) in a repository source

Update an issue for a specified GitHub repository.

Input Concepts

Concept
Description
Type
Required
Default Value

repository source

The source of the repository. It is a combination of the owner and the repository name, separated by a forward slash. For example, 'torvalds/linux'.

conceptual or text

Yes

The details required to update an issue. It includes the issue number and can contain title, body, and state.

github issue

Yes

Output Concepts

Concept
Description
Type

The issue just updated.

github issue

Examples

Update an issue from a repository

the issue is '{"number": "1", "title": "This is the edited title", "body": "This is the edited body", "state" : "open"}'
update the issue in "kognitos/bdk-api"

Last updated

Was this helpful?