GitHub

Create issues, manage repos, and open pull requests on GitHub.

Developer toolsOAuth17 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (17)
  4. github_create_issue
  5. add_labels_to_issue
  6. create_branch
  7. createCommentOnAIssue
  8. custom_api_call
  9. delete_branch
  10. find_branch
  11. find_issue
  12. find_user
  13. getIssueInformation
  14. github_create_commit_comment
  15. github_create_discussion_comment
  16. github_create_pull_request_review_comment
  17. lockIssue
  18. rawGraphqlQuery
  19. unlockIssue
  20. update_issue
  21. Details

Connect

Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.

Scopes requested: reporead:user

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("github", action, input) resolves with the provider's answer and rejects when GitHub isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "github"} says whether yours can call it.

Workflow
// workflows/notify.ts: call GitHub when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellGithub = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when GitHub isn't connected.
  const output = await step.run("GitHub", () =>
    step.ctx.integrations.invoke("github", "github_create_issue", {
      "repository": "<repository>",
      "title": "<title>"
    }),
  );
  step.ctx.log("GitHub answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "github",
    "piece_action": "github_create_issue",
    "input": {
      "repository": "<repository>",
      "title": "<title>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
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_issue

Create Issue. Create Issue in GitHub Repository

Also accepted as create_issue.

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
titlerequiredtextThe title of the issue
descriptionoptionallong textThe description of the issue
labelsoptionalids (picked from your account)Labels for the Issue
assigneesoptionalids (picked from your account)Assignees for the Issue

add_labels_to_issue

Add Labels to Issue. Adds labels to an existing issue.

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
issue_numberrequiredid (picked from your account)The issue to select.
labelsrequiredids (picked from your account)Labels for the Issue

create_branch

Create Branch. Creates a new branch on a repository.

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
source_branchrequiredid (picked from your account)The source branch that will be used to create the new branch
new_branch_namerequiredtextThe 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)

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
issue_numberrequirednumberThe number of the issue to comment on
commentrequiredlong textThe comment to add to the issue

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

delete_branch

Delete Branch. Deletes a branch from a repository.

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
branchrequiredid (picked from your account)Branch

find_branch

Find Branch. Finds a branch by name and returns its details.

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
branchrequiredtextBranch Name

find_issue

Find Issue. Finds an issue based title.

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
titlerequiredtextTitle
staterequiredone of "open" | "closed" | "all"Filter issues by their state.

find_user

Find User. Finds a user by their login name.

InputTypeDescription
usernamerequiredtextThe GitHub username (login) to look up.

getIssueInformation

Get issue information. Grabs information from a specific issue

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
issue_numberrequirednumberThe 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

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
sharequiredtextThe SHA of the commit to comment on
bodyrequiredlong textThe content of the comment
pathoptionaltextThe relative path to the file to comment on (optional)
positionoptionalnumberThe 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

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
discussion_numberrequirednumberThe number of the discussion to comment on
bodyrequiredlong textThe 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

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
pull_numberrequirednumberThe number of the pull request
commit_idrequiredtextThe SHA of the commit to comment on
pathrequiredtextThe relative path to the file to comment on
bodyrequiredlong textThe content of the review comment
positionrequirednumberThe position in the diff where the comment should be placed

lockIssue

Lock issue. Locks the specified issue

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
issue_numberrequirednumberThe number of the issue to be locked
lock_reasonoptionalid (picked from your account)The reason for locking the issue

rawGraphqlQuery

Raw GraphQL query. Perform a raw GraphQL query

InputTypeDescription
queryrequiredlong textQuery
variablesoptionalobjectParameters

unlockIssue

Unlock issue. Unlocks the specified issue

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
issue_numberrequirednumberThe number of the issue to be unlocked

update_issue

Update Issue. Updates an existing issue.

InputTypeDescription
repositoryrequiredid (picked from your account)Repository
issue_numberrequiredid (picked from your account)The issue to select.
titleoptionaltextTitle
bodyoptionallong textBody
stateoptionalone of "open" | "closed"The new state of the issue.
state_reasonoptionalone of "completed" | "not_planned" | "reopened" | "duplicate"The reason for the state change. (Only used if State is changed).
milestoneoptionalid (picked from your account)The milestone to associate this issue with.
labelsoptionalids (picked from your account)Labels for the Issue
assigneesoptionalids (picked from your account)Assignees for the Issue

Details

Id
github
Category
Developer tools
Tags
git, vcs, code, pull-request, issues
Package
@activepieces/piece-github@0.6.6
Runs
Through the integration runner