Github connector
OAuth 2.0Developer ToolsCollaborationGitHub is a cloud-based Git repository hosting service that allows developers to store, manage, and track changes to their code.
Github connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Set up the connector
Section titled “Set up the connector”Register your Github credentials with Scalekit so it handles the token lifecycle. You do this once per environment.
Dashboard setup steps
Register your Scalekit environment with the GitHub connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:
-
Set up auth redirects
-
In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find GitHub and click Create.
-
Click Use your own credentials and copy the redirect URI. It looks like
https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.
-
Go to GitHub Developer Settings and open your OAuth app.
-
Under General, paste the copied URI into the Authorization callback URL field and click Save application.

-
-
Get client credentials
In GitHub Developer Settings, open your OAuth app:
- Client ID — listed on the app’s main settings page
- Client Secret — click Generate a new client secret if you don’t have one
-
Add credentials in Scalekit
-
In Scalekit dashboard, go to AgentKit > Connections and open the connection you created.
-
Enter your credentials:
- Client ID (from your GitHub OAuth app)
- Client Secret (from your GitHub OAuth app)

-
Click Save.
-
-
-
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'github'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Github:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'github_user_repos_list',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "github"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Github:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="github_user_repos_list",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Read repositories — fetch repo metadata, files, commits, branches, and tags
- Manage issues — create, update, close, and comment on issues
- Work with pull requests — open PRs, post reviews, and merge changes
- Search code — search across repositories by keyword, language, or file path
- Trigger workflows — dispatch GitHub Actions workflow runs
Common workflows
Section titled “Common workflows”Proxy API call
const result = await actions.request({ connectionName: 'github', identifier: 'user_123', path: '/user', method: 'GET',});console.log(result);result = actions.request( connection_name='github', identifier='user_123', path="/user", method="GET",)print(result)Execute a tool
const result = await actions.executeTool({ connector: 'github', identifier: 'user_123', toolName: 'github_branch_create', toolInput: {},});console.log(result);result = actions.execute_tool( connection_name='github', identifier='user_123', tool_name='github_branch_create', tool_input={},)print(result)Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
github_branch_create#Create a new branch in a GitHub repository. Requires the SHA of the commit to branch from (typically the HEAD of main).4 params
Create a new branch in a GitHub repository. Requires the SHA of the commit to branch from (typically the HEAD of main).
branch_namestringrequiredName of the new branch to createownerstringrequiredThe account owner of the repositoryrepostringrequiredThe name of the repositoryshastringrequiredThe SHA of the commit to branch from. Use the HEAD SHA of the base branch (e.g. main).github_branch_get#Get details of a specific branch in a GitHub repository. Returns the branch name, latest commit SHA, and protection status.3 params
Get details of a specific branch in a GitHub repository. Returns the branch name, latest commit SHA, and protection status.
branchstringrequiredThe name of the branch to retrieveownerstringrequiredThe account owner of the repositoryrepostringrequiredThe name of the repositorygithub_branches_list#List all branches in a GitHub repository. Returns branch names, commit SHAs, and protection status. Supports pagination.5 params
List all branches in a GitHub repository. Returns branch names, commit SHAs, and protection status. Supports pagination.
ownerstringrequiredThe account owner of the repositoryrepostringrequiredThe name of the repositorypageintegeroptionalPage number of results to return (default 1)per_pageintegeroptionalNumber of results per page (max 100, default 30)protectedbooleanoptionalFilter to only protected branchesgithub_file_contents_get#Get the contents of a file or directory from a GitHub repository. Returns Base64 encoded content for files.4 params
Get the contents of a file or directory from a GitHub repository. Returns Base64 encoded content for files.
ownerstringrequiredThe account owner of the repositorypathstringrequiredThe content path (file or directory path in the repository)repostringrequiredThe name of the repositoryrefstringoptionalThe name of the commit/branch/taggithub_file_create_update#Create a new file or update an existing file in a GitHub repository. Content must be Base64 encoded. Requires SHA when updating existing files.9 params
Create a new file or update an existing file in a GitHub repository. Content must be Base64 encoded. Requires SHA when updating existing files.
contentstringrequiredThe new file content (Base64 encoded)messagestringrequiredThe commit message for this changeownerstringrequiredThe account owner of the repositorypathstringrequiredThe file path in the repositoryrepostringrequiredThe name of the repositoryauthorobjectoptionalAuthor information object with name and emailbranchstringoptionalThe branch namecommitterobjectoptionalCommitter information object with name and emailshastringoptionalThe blob SHA of the file being replaced (required when updating existing files)github_issue_create#Create a new issue in a repository. Requires push access to set assignees, milestones, and labels.8 params
Create a new issue in a repository. Requires push access to set assignees, milestones, and labels.
ownerstringrequiredThe account owner of the repositoryrepostringrequiredThe name of the repositorytitlestringrequiredThe title of the issueassigneesarrayoptionalGitHub usernames to assign to the issuebodystringoptionalThe contents of the issuelabelsarrayoptionalLabels to associate with the issuemilestonenumberoptionalMilestone number to associate with the issuetypestringoptionalThe name of the issue typegithub_issues_list#List issues in a repository. Both issues and pull requests are returned as issues in the GitHub API.12 params
List issues in a repository. Both issues and pull requests are returned as issues in the GitHub API.
ownerstringrequiredThe account owner of the repositoryrepostringrequiredThe name of the repositoryassigneestringoptionalFilter by assigned usercreatorstringoptionalFilter by issue creatordirectionstringoptionalSort orderlabelsstringoptionalFilter by comma-separated list of label namesmilestonestringoptionalFilter by milestone number or statepagenumberoptionalPage number of results to fetchper_pagenumberoptionalNumber of results per page (max 100)sincestringoptionalShow issues updated after this timestamp (ISO 8601 format)sortstringoptionalProperty to sort issues bystatestringoptionalFilter by issue stategithub_public_repos_list#List public repositories for a specified user. Does not require authentication.6 params
List public repositories for a specified user. Does not require authentication.
usernamestringrequiredThe GitHub username to list repositories fordirectionstringoptionalSort orderpagenumberoptionalPage number of results to fetchper_pagenumberoptionalNumber of results per page (max 100)sortstringoptionalProperty to sort repositories bytypestringoptionalFilter repositories by typegithub_pull_request_create#Create a new pull request in a repository. Requires write access to the head branch.8 params
Create a new pull request in a repository. Requires write access to the head branch.
basestringrequiredThe name of the branch you want the changes pulled intoheadstringrequiredThe name of the branch where your changes are implemented (format: user:branch)ownerstringrequiredThe account owner of the repositoryrepostringrequiredThe name of the repositorybodystringoptionalThe contents of the pull request descriptiondraftbooleanoptionalIndicates whether the pull request is a draftmaintainer_can_modifybooleanoptionalIndicates whether maintainers can modify the pull requesttitlestringoptionalThe title of the pull requestgithub_pull_requests_list#List pull requests in a repository with optional filtering by state, head, and base branches.9 params
List pull requests in a repository with optional filtering by state, head, and base branches.
ownerstringrequiredThe account owner of the repositoryrepostringrequiredThe name of the repositorybasestringoptionalFilter by base branch namedirectionstringoptionalSort orderheadstringoptionalFilter by head branch (format: user:ref-name)pagenumberoptionalPage number of results to fetchper_pagenumberoptionalNumber of results per page (max 100)sortstringoptionalProperty to sort pull requests bystatestringoptionalFilter by pull request stategithub_repo_get#Get detailed information about a GitHub repository including metadata, settings, and statistics.2 params
Get detailed information about a GitHub repository including metadata, settings, and statistics.
ownerstringrequiredThe account owner of the repository (case-insensitive)repostringrequiredThe name of the repository without the .git extension (case-insensitive)github_user_repos_list#List repositories for the authenticated user. Requires authentication.5 params
List repositories for the authenticated user. Requires authentication.
directionstringoptionalSort orderpagenumberoptionalPage number of results to fetchper_pagenumberoptionalNumber of results per page (max 100)sortstringoptionalProperty to sort repositories bytypestringoptionalFilter repositories by type