节点 / builtin / integration
GitHub
Integrate with GitHub to work with issues, pull requests, repositories, and releases.
此内容尚不支持你的语言。
Open, update and comment on GitHub issues, read and review pull requests, and look up repositories and releases.
What it does
Section titled “What it does”The GitHub node works on four kinds of things (Resource):
- Issue: create, get, update, comment on, list or close issues.
- Pull request: get or list pull requests, comment on one, submit a review (approve, request changes, comment), or list the files it changes.
- Repository: get one repository, list your own repositories, or search all public ones.
- Release: get the latest release, or list releases.
Every operation that targets a repository takes Owner and Repository as two fields. List operations return 30 results by default (Limit, up to 100).
When to use it
Section titled “When to use it”- File an issue from a page or a stack trace you just selected.
- Post a comment on a pull request from a review checklist.
- Check a project’s latest release every morning and get notified when it changes.
- List open issues with a given label and summarize them with an AI node.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Credential (必填) | Credential | The Credential to use to make the request. |
16 个选项 · 选择“Resource and Operation”以查看其设置
Issue · Create 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Title (必填) | Text | The title of the issue. |
| Body | Text | The contents (Markdown supported). |
| Labels | List | Labels to associate with the issue. |
| Assignees | List | GitHub logins to assign to the issue. |
Issue · Get 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Issue Number (必填) | Number | The number that identifies the issue. |
Issue · Update 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Issue Number (必填) | Number | The number that identifies the issue. |
| Title | Text | The title of the issue. |
| Body | Text | The contents (Markdown supported). |
| State | Choice | The open or closed state to set. Options: Open, Closed. |
| Labels | List | Labels to associate with the issue. |
| Assignees | List | GitHub logins to assign to the issue. |
Issue · Comment 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Issue Number (必填) | Number | The number that identifies the issue. |
| Comment (必填) | Text | The comment text (Markdown supported). |
Issue · List 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| State | Choice | Filter by state. Options: Open, Closed, All. |
| Labels | Text | Comma-separated list of label names to filter by. |
| Limit | Number | Number of results to return (1-100). 默认值:30 |
Issue · Close 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Issue Number (必填) | Number | The number that identifies the issue. |
Pull request · Get 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Pull Request Number (必填) | Number | The number that identifies the pull request. |
Pull request · List 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| State | Choice | Filter by state. Options: Open, Closed, All. |
| Limit | Number | Number of results to return (1-100). 默认值:30 |
Pull request · Comment 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Pull Request Number (必填) | Number | The number that identifies the pull request. |
| Comment (必填) | Text | The comment text (Markdown supported). |
Pull request · Review 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Pull Request Number (必填) | Number | The number that identifies the pull request. |
| Review Event (必填) | Choice | The kind of review to submit. Options: Approve, Request changes, Comment. |
| Review Body | Text | The body text of the review (required for Request changes and Comment). |
Pull request · List files 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Pull Request Number (必填) | Number | The number that identifies the pull request. |
| Limit | Number | Number of results to return (1-100). 默认值:30 |
Repository · Get 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
Repository · List 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Limit | Number | Number of results to return (1-100). 默认值:30 |
Repository · Search 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Search Query (必填) | Text | The repository search query. |
| Limit | Number | Number of results to return (1-100). 默认值:30 |
Release · Get latest 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
Release · List 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Owner (必填) | Text | The account owner of the repository (user or organization). |
| Repository (必填) | Text | The name of the repository (without the owner). |
| Limit | Number | Number of results to return (1-100). 默认值:30 |
正在显示 Issue · Create 的设置
- Split the repository address: for
github.com/octocat/hello-world, Owner isoctocatand Repository ishello-world. - Issue Number and Pull Request Number are the number after
#, for example42. - On Issue → List, Labels is a comma-separated list such as
bug,urgent; on Create and Update, Labels and Assignees are lists of names. - Review Body is required when Review Event is Request changes or Comment.
- Search Query uses GitHub’s search syntax, for example
topic:automation language:typescript stars:>100.
Outputs
Section titled “Outputs”-
Output
- Issue, pull request, repository and release operations return the GitHub object, with fields such as
number,title,stateandhtml_url(the link to open it in the browser). - List operations return a list, one entry per issue, pull request, file or release. GitHub counts pull requests as issues, so Issue → List can include them.
- Repository → Search returns
total_countand the matches initems.
Dependencies and credentials
Section titled “Dependencies and credentials”- Credential (connection, Bearer Token): required. See Connect GitHub.
Use a GitHub personal access token. A fine-grained token is safest: on GitHub, open Settings → Developer settings → Personal access tokens → Fine-grained tokens, limit it to the repositories you need, and give it only the permissions you use, for example Issues: Read and write or Pull requests: Read and write (plus Contents: Read for releases). A classic token also works but opens your whole account. See Create a credential.
Example workflow
Section titled “Example workflow”- A Context Menu trigger runs when you right-click selected text.
- Get Selected Text reads the error message you selected.
- Basic LLM Chain writes a short bug title and description.
- GitHub, Issue → Create, Owner
my-org, Repositorymy-app, Title and Body from the previous step, Labelsbug.
Common issues
Section titled “Common issues”- “GitHub API Error: Bad credentials”. The token is wrong, expired or revoked. Create a new one and update the credential.
- “GitHub API Error: Not Found” on a repository you can see. The token does not include that repository, or lacks the permission for this operation. Edit the token on GitHub.
- “GitHub API Error: rate limit exceeded”. You made too many requests in the last hour. Wait, or run the workflow less often.
- “GitHub API Error: Validation Failed”. A value is not accepted, for example an unknown assignee, or an empty Review Body with Request changes.
Related nodes
Section titled “Related nodes”- Linear: issues in Linear instead.
- RSS Feed Read: follow a repository’s release feed without a token.
- Http Request: call GitHub API endpoints this node does not cover.