GitHub
Create issues, manage repos, and open pull requests on GitHub.
On this page
- Connect
- Call it from a workflow
- Actions (17)
- github_create_issue
- add_labels_to_issue
- create_branch
- createCommentOnAIssue
- custom_api_call
- delete_branch
- find_branch
- find_issue
- find_user
- getIssueInformation
- github_create_commit_comment
- github_create_discussion_comment
- github_create_pull_request_review_comment
- lockIssue
- rawGraphqlQuery
- unlockIssue
- update_issue
- Env keys
- Details
Connect
Auth type: OAuth (oauth2). Click Connect and approve access on the provider's page. Appbricx runs the OAuth flow (signed single-use state, PKCE where the provider supports it), stores the tokens encrypted and refreshes them before they expire.
Scopes requested: reporead:user
OAuth needs an OAuth app: the platform's when the operator configured one, or your own (admin panel, Integrations, Configure). You can also bring your own credentials.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("github", "github_create_issue", {
"repository": "<repository>",
"title": "<title>"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("GitHub answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "github-github-create-issue",
name: "GitHub: Create Issue",
description: "Calls GitHub when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("github", {
"action": "github_create_issue",
"repository": "<repository>",
"title": "<title>"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/github/github_create_issue" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"repository":"<repository>","title":"<title>"}}'Actions
github_create_issuein catalog
Create Issue. Create Issue in GitHub Repository
Also accepted as create_issue.
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
titlerequired | text | The title of the issue |
descriptionoptional | long text | The description of the issue |
labelsoptional | ids (picked from your account) | Labels for the Issue |
assigneesoptional | ids (picked from your account) | Assignees for the Issue |
add_labels_to_issue
Add Labels to Issue. Adds labels to an existing issue.
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
issue_numberrequired | id (picked from your account) | The issue to select. |
labelsrequired | ids (picked from your account) | Labels for the Issue |
create_branch
Create Branch. Creates a new branch on a repository.
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
source_branchrequired | id (picked from your account) | The source branch that will be used to create the new branch |
new_branch_namerequired | text | The name for the new branch (e.g., 'feature/new-design'). |
createCommentOnAIssue
Create comment on a issue. Adds a comment to the specified issue (also works with pull requests)
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
issue_numberrequired | number | The number of the issue to comment on |
commentrequired | long text | The comment to add to the issue |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
delete_branch
Delete Branch. Deletes a branch from a repository.
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
branchrequired | id (picked from your account) | Branch |
find_branch
Find Branch. Finds a branch by name and returns its details.
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
branchrequired | text | Branch Name |
find_issue
Find Issue. Finds an issue based title.
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
titlerequired | text | Title |
staterequired | one of "open" | "closed" | "all" | Filter issues by their state. |
find_user
Find User. Finds a user by their login name.
| Input | Type | Description |
|---|---|---|
usernamerequired | text | The GitHub username (login) to look up. |
getIssueInformation
Get issue information. Grabs information from a specific issue
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
issue_numberrequired | number | The number of the issue you want to get information from |
github_create_commit_comment
Create Commit Comment. Creates a comment on a commit in a GitHub repository
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
sharequired | text | The SHA of the commit to comment on |
bodyrequired | long text | The content of the comment |
pathoptional | text | The relative path to the file to comment on (optional) |
positionoptional | number | The line index in the diff to comment on (optional) |
github_create_discussion_comment
Create Discussion Comment. Creates a comment on a discussion in a GitHub repository
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
discussion_numberrequired | number | The number of the discussion to comment on |
bodyrequired | long text | The content of the comment (supports markdown) |
github_create_pull_request_review_comment
Create Pull Request Review Comment. Creates a review comment on a pull request in a GitHub repository
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
pull_numberrequired | number | The number of the pull request |
commit_idrequired | text | The SHA of the commit to comment on |
pathrequired | text | The relative path to the file to comment on |
bodyrequired | long text | The content of the review comment |
positionrequired | number | The position in the diff where the comment should be placed |
lockIssue
Lock issue. Locks the specified issue
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
issue_numberrequired | number | The number of the issue to be locked |
lock_reasonoptional | id (picked from your account) | The reason for locking the issue |
rawGraphqlQuery
Raw GraphQL query. Perform a raw GraphQL query
| Input | Type | Description |
|---|---|---|
queryrequired | long text | Query |
variablesoptional | object | Parameters |
unlockIssue
Unlock issue. Unlocks the specified issue
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
issue_numberrequired | number | The number of the issue to be unlocked |
update_issue
Update Issue. Updates an existing issue.
| Input | Type | Description |
|---|---|---|
repositoryrequired | id (picked from your account) | Repository |
issue_numberrequired | id (picked from your account) | The issue to select. |
titleoptional | text | Title |
bodyoptional | long text | Body |
stateoptional | one of "open" | "closed" | The new state of the issue. |
state_reasonoptional | one of "completed" | "not_planned" | "reopened" | "duplicate" | The reason for the state change. (Only used if State is changed). |
milestoneoptional | id (picked from your account) | The milestone to associate this issue with. |
labelsoptional | ids (picked from your account) | Labels for the Issue |
assigneesoptional | ids (picked from your account) | Assignees for the Issue |
Env keys
When connected, these credential fields are exposed to the project's runtime as environment variables (GitHub API access (repos, issues, PRs).). Server keys never reach the browser.
| Variable | Field | Where |
|---|---|---|
GITHUB_TOKEN | access_token | server only |
Details
- Id
github- Category
- Developer tools
- Tags
- git, vcs, code, pull-request, issues
- Package
@activepieces/piece-github@0.6.6- Tier
- Built in