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
- 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.
// 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);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "github",
"piece_action": "github_create_issue",
"input": {
"repository": "<repository>",
"title": "<title>"
},
"env": "dev"
}
}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.
| 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 |
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