# 将 GitHub 接入 Open Flow

Source: https://openflow.run/zh-cn/integrations/github/

[全部集成](https://openflow.run/zh-cn/integrations/)

提供仓库或 Pull Request，让 AI 分析相关内容；也可以把缺陷报告整理成包含复现步骤的 Issue。

*   [147 个工具](https://openflow.run/zh-cn/integrations/github/#integration-actions)
*   OAuth 2.0
*   开发工具

[连接 GitHub](https://console.openflow.run/connections/github)

每月 20,000 次免费应用调用（付费服务另计）

## 可以做什么

GitHub 连接提供仓库、Issue、Pull Request 等 API 操作，访问范围取决于账号权限和授予的授权。

### 读取与维护 Issue

列出仓库 Issue、读取评论、创建 Issue，并更新 Issue 信息。

### 查看 Pull Request

读取 Pull Request 详情、变更文件和审查记录。

### 搜索与读取仓库内容

搜索代码和仓库，获取文件内容及仓库 README。

## 使用 GitHub 的模板

![Encode GitHub Contributors with GCF 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/encode-github-contributors-with-gcf/light-cover.webp)

开发者工具

### [Encode GitHub Contributors with GCF](https://openflow.run/zh-cn/templates/encode-github-contributors-with-gcf/)

Encode GitHub contributor data as GCF, compare estimated token counts, and decode it back to JSON.

![Back Up Squarespace Code Injections to GitHub 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/backup-squarespace-code-injections-to-github/light-cover.webp)

开发者工具

### [Back Up Squarespace Code Injections to GitHub](https://openflow.run/zh-cn/templates/backup-squarespace-code-injections-to-github/)

Back up Squarespace header and footer injections as HTML files in GitHub.

![Receive GitHub Repository Events 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/receive-github-repository-events/light-cover.webp)

开发者工具

### [Receive GitHub Repository Events](https://openflow.run/zh-cn/templates/receive-github-repository-events/)

Receive webhook events from a GitHub repository.

![Trigger Travis Builds from GitHub 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/trigger-travis-builds-from-github/light-cover.webp)

开发者工具

### [Trigger Travis Builds from GitHub](https://openflow.run/zh-cn/templates/trigger-travis-builds-from-github/)

Request a Travis CI build when a GitHub repository is pushed or a pull request opens.

![Assign GitHub Issues from Requests 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/assign-github-issues-from-requests/light-cover.webp)

开发

### [Assign GitHub Issues from Requests](https://openflow.run/zh-cn/templates/assign-github-issues-from-requests/)

Assign an unassigned GitHub issue to its author or commenter when they request it.

![Email the Latest GitHub Release Notes 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/email-latest-github-release-notes/light-cover.webp)

开发者工具

### [Email the Latest GitHub Release Notes](https://openflow.run/zh-cn/templates/email-latest-github-release-notes/)

Email the latest published GitHub release notes as HTML each day.

更多模板（15）

![Create or Comment on GitHub Issues from Zendesk 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/zendesk-ticket-to-github-issue/light-cover.webp)

支持

### [Create or Comment on GitHub Issues from Zendesk](https://openflow.run/zh-cn/templates/zendesk-ticket-to-github-issue/)

Create a GitHub issue for a Zendesk ticket or add a comment to its linked issue.

![Create Pipedrive Leads for GitHub Forks 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-fork-to-pipedrive-lead/light-cover.webp)

销售

### [Create Pipedrive Leads for GitHub Forks](https://openflow.run/zh-cn/templates/github-fork-to-pipedrive-lead/)

Create a Pipedrive lead and GitHub profile note when a repository is forked.

![Add GitHub Pull Requests to Pipedrive Contacts 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-pull-request-pipedrive-note/light-cover.webp)

销售

### [Add GitHub Pull Requests to Pipedrive Contacts](https://openflow.run/zh-cn/templates/github-pull-request-pipedrive-note/)

Add a GitHub pull request link to Pipedrive people whose email matches the event sender.

![Assign GitHub Issues on Request 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/assign-github-issues-on-request/light-cover.webp)

开发

### [Assign GitHub Issues on Request](https://openflow.run/zh-cn/templates/assign-github-issues-on-request/)

Assign an unassigned GitHub issue to its author or commenter when they request it.

![Sync GitHub Issues to a Notion Database 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/sync-github-issues-to-notion-database/light-cover.webp)

开发

### [Sync GitHub Issues to a Notion Database](https://openflow.run/zh-cn/templates/sync-github-issues-to-notion-database/)

Keep a Notion database updated when GitHub issues are opened, edited, closed, reopened or deleted.

![Telegram Command to GitHub Release 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/telegram-command-to-github-release/light-cover.webp)

开发者工具

### [Telegram Command to GitHub Release](https://openflow.run/zh-cn/templates/telegram-command-to-github-release/)

Create a GitHub release for a version supplied by an authorized Telegram user.

![GitHub Repository Alert Light 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-repository-alert-light/light-cover.webp)

开发者工具

### [GitHub Repository Alert Light](https://openflow.run/zh-cn/templates/github-repository-alert-light/)

Turn a Home Assistant light red whenever GitHub delivers an event from a selected repository.

![GitHub User Profile to Slack 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-user-profile-to-slack/light-cover.webp)

开发者工具

### [GitHub User Profile to Slack](https://openflow.run/zh-cn/templates/github-user-profile-to-slack/)

Look up a GitHub profile and matching author emails from its last 25 pull requests, then post the bounded results and avatar to Slack.

![GitHub Release Slack Notifications 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-release-slack-notifications/light-cover.webp)

开发者工具

### [GitHub Release Slack Notifications](https://openflow.run/zh-cn/templates/github-release-slack-notifications/)

Post GitHub release events to Slack with the repository, tag, complete release notes and original release URL.

![GitHub Repository Profile 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-repository-profile/light-cover.webp)

开发者工具

### [GitHub Repository Profile](https://openflow.run/zh-cn/templates/github-repository-profile/)

Read a GitHub repository’s community health score and community file metadata.

![GitHub Prompt Runner 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-prompt-runner/light-cover.webp)

内容

### [GitHub Prompt Runner](https://openflow.run/zh-cn/templates/github-prompt-runner/)

Read a prompt file from GitHub, fill its variables, and return one text response from a configured model.

![GitHub Star Alerts in Slack 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-star-slack-alert/light-cover.webp)

开发

### [GitHub Star Alerts in Slack](https://openflow.run/zh-cn/templates/github-star-slack-alert/)

Post Slack alerts when a repository gains or loses a GitHub star.

![GitHub Issues to Telegram 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-low-comment-issues-telegram/light-cover.webp)

开发

### [GitHub Issues to Telegram](https://openflow.run/zh-cn/templates/github-low-comment-issues-telegram/)

Notify Telegram about recently updated open Bug issues with fewer than five comments.

![GitHub Release Slack Alerts 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-release-slack-alerts/light-cover.webp)

运营

### [GitHub Release Slack Alerts](https://openflow.run/zh-cn/templates/github-release-slack-alerts/)

Check configured GitHub repositories daily and notify Slack when their latest release was published within the last 24 hours.

![GitHub Devto Engagement 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/github-devto-engagement-monitor/light-cover.webp)

营销

### [GitHub Devto Engagement](https://openflow.run/zh-cn/templates/github-devto-engagement-monitor/)

Collect stars, forks, open issues, Dev.to reactions and comments in one summary every 12 hours.

## 所有工具

147 个工具

### Get Current User

获取当前已认证的 GitHub 用户个人资料。

`github.get_current_user`

### List My Repositories

列出对已认证 GitHub 用户可见的仓库。

`github.list_my_repositories`

### Create Repository

为已认证的 GitHub 用户创建仓库。

`github.create_repository`

### List Branches

列出 GitHub 仓库中的分支。

`github.list_branches`

### Get Branch

按名称获取 GitHub 分支。

`github.get_branch`

### Get Repository

按所有者和名称获取 GitHub 仓库的元数据。

`github.get_repository`

### Delete Repository

按所有者和名称删除 GitHub 仓库。

`github.delete_repository`

### List Commits

列出 GitHub 仓库中的提交，可选用分支、路径、作者和日期筛选。

`github.list_commits`

### Create Ref

在 GitHub 仓库中创建 Git 引用。

`github.create_ref`

### Get Commit

按 SHA 获取 GitHub 仓库中的提交。

`github.get_commit`

### Compare Commits

比较 GitHub 仓库中的两个提交引用。

`github.compare_commits`

### List Repository Issues

列出 GitHub 仓库的问题。拉取请求会从响应中过滤掉；pageInfo.fetched 报告过滤前的原始页面长度，因此分页调用方必须在 fetched 等于 perPage（默认 30）时继续，即使 issues 数组很短或为空。

`github.list_repository_issues`

### Create Issue

在 GitHub 仓库中创建问题。

`github.create_issue`

### Get Issue

按编号获取 GitHub 问题。

`github.get_issue`

### Update Issue

按编号更新 GitHub 问题。

`github.update_issue`

### List Repository Labels

列出 GitHub 仓库中可用的标签。

`github.list_repository_labels`

### Create Label

在 GitHub 仓库中创建标签。

`github.create_label`

### List Issue Labels

列出应用于 GitHub 问题的标签。

`github.list_issue_labels`

### Add Issue Labels

向 GitHub 问题添加标签。

`github.add_issue_labels`

### Set Issue Labels

替换 GitHub 问题上的所有标签。

`github.set_issue_labels`

### Remove Issue Label

从 GitHub 问题中移除一个标签。

`github.remove_issue_label`

### Clear Issue Labels

从 GitHub 问题中移除所有标签。

`github.clear_issue_labels`

### Add Issue Assignees

向 GitHub 问题添加分配人。

`github.add_issue_assignees`

### Remove Issue Assignees

从 GitHub 问题中移除分配人。

`github.remove_issue_assignees`

### Lock Issue

锁定 GitHub 问题对话。

`github.lock_issue`

### Unlock Issue

解锁 GitHub 问题对话。

`github.unlock_issue`

### List Issue Comments

列出 GitHub 问题下的评论。

`github.list_issue_comments`

### Create Issue Comment

在 GitHub 问题上创建评论。

`github.create_issue_comment`

### Search Issues And Pull Requests

使用原始 GitHub 搜索语法或结构化筛选器搜索 GitHub 问题和拉取请求。

`github.search_issues_and_pull_requests`

### List Pull Requests

列出 GitHub 仓库的拉取请求。

`github.list_pull_requests`

### List Pull Requests Associated With Commit

列出与提交 SHA 关联的拉取请求。

`github.list_pull_requests_associated_with_commit`

### List Pull Request Files

列出 GitHub 拉取请求中更改的文件。

`github.list_pull_request_files`

### List Pull Request Commits

列出 GitHub 拉取请求上的提交。

`github.list_pull_request_commits`

### List Pull Request Requested Reviewers

列出 GitHub 拉取请求上请求的审阅者。

`github.list_pull_request_requested_reviewers`

### List Pull Request Reviews

列出 GitHub 拉取请求的审阅。

`github.list_pull_request_reviews`

### List Pull Request Review Comments

列出 GitHub 拉取请求上的审阅评论。

`github.list_pull_request_review_comments`

### Create Pull Request Review

为 GitHub 拉取请求创建审阅，可选包含内联评论。

`github.create_pull_request_review`

### Submit Pull Request Review

提交待处理的 GitHub 拉取请求审阅。

`github.submit_pull_request_review`

### Create Pull Request Review Comment

在 GitHub 拉取请求差异上创建审阅评论。

`github.create_pull_request_review_comment`

### Reply Pull Request Review Comment

回复 GitHub 拉取请求的顶级审阅评论。

`github.reply_pull_request_review_comment`

### Get Pull Request

按编号获取 GitHub 拉取请求。

`github.get_pull_request`

### Create Pull Request

在 GitHub 仓库中创建拉取请求。

`github.create_pull_request`

### Update Pull Request

更新 GitHub 拉取请求的标题、正文、状态、基础分支或维护者可修改标志。

`github.update_pull_request`

### Update Pull Request Branch

使用最新的基础分支更改更新 GitHub 拉取请求分支。

`github.update_pull_request_branch`

### Request Pull Request Reviewers

请求 GitHub 拉取请求的审阅者。

`github.request_pull_request_reviewers`

### Remove Pull Request Reviewers

从 GitHub 拉取请求中移除请求的审阅者。

`github.remove_pull_request_reviewers`

### Merge Pull Request

合并 GitHub 拉取请求。

`github.merge_pull_request`

### Check Pull Request Merged

检查 GitHub 拉取请求是否已合并。

`github.check_pull_request_merged`

### Create Commit Status

为 GitHub 提交 SHA 创建提交状态。

`github.create_commit_status`

### Get Commit Statuses

按时间倒序列出提交引用的状态。

`github.get_commit_statuses`

### List Check Runs For Ref

列出提交 SHA、分支或标签的 GitHub 检查运行。

`github.list_check_runs_for_ref`

### Rerequest Check Run

重新请求 GitHub 检查运行。

`github.rerequest_check_run`

### Rerequest Check Suite

重新请求 GitHub 检查套件。

`github.rerequest_check_suite`

### List Repository Workflows

列出 GitHub 仓库中配置的工作流。

`github.list_repository_workflows`

### List Workflow Runs

列出仓库的 GitHub 工作流运行。

`github.list_workflow_runs`

### Get Workflow Run

按 ID 获取 GitHub 工作流运行。

`github.get_workflow_run`

### List Workflow Run Jobs

列出 GitHub 工作流运行的作业。

`github.list_workflow_run_jobs`

### Get Workflow Job Logs

下载 GitHub Actions 工作流任务的日志，并以纯文本返回。

`github.get_workflow_job_logs`

### Rerun Workflow

重新运行 GitHub Actions 工作流运行。

`github.rerun_workflow`

### List Releases

列出 GitHub 仓库的发布。

`github.list_releases`

### Create Release

在 GitHub 仓库中创建发布。

`github.create_release`

### Get Release

按数字 ID 获取 GitHub 发布。

`github.get_release`

### Get Latest Release

获取 GitHub 仓库的最新已发布发布。

`github.get_latest_release`

### Get Release By Tag

按标签名称获取 GitHub 发布。

`github.get_release_by_tag`

### List Release Assets

列出附加到 GitHub 发布的资产。

`github.list_release_assets`

### List Issue Timeline Events

列出 GitHub 问题的时间线事件。

`github.list_issue_timeline_events`

### List Issue Events

列出 GitHub 问题的事件。

`github.list_issue_events`

### List Repository Issue Events

列出 GitHub 仓库中的问题事件。

`github.list_repository_issue_events`

### List Public Events

列出全局公共 GitHub 事件源。

`github.list_public_events`

### List User Public Events

列出用户执行的公共 GitHub 事件。

`github.list_user_public_events`

### List User Received Public Events

列出用户接收的公共 GitHub 事件。

`github.list_user_received_public_events`

### List Authenticated User Events

列出 GitHub 用户的活动事件，并在认证凭据属于该用户时包含私有事件。

`github.list_authenticated_user_events`

### List Authenticated User Received Events

列出 GitHub 用户接收的活动事件，并在认证凭据属于该用户时包含私有事件。

`github.list_authenticated_user_received_events`

### List Repository Events

列出仓库的近期 GitHub 事件。

`github.list_repository_events`

### List Directory Contents

列出仓库目录路径下的条目。空路径表示仓库根目录。

`github.list_directory_contents`

### Get File Contents

读取仓库文件，并在可用时返回 base64 和解码文本。

`github.get_file_contents`

### Merge Branch

在 GitHub 仓库中将一个分支合并到另一个分支。

`github.merge_branch`

### Rename Branch

重命名 GitHub 仓库中的分支。

`github.rename_branch`

### Sync Fork Branch With Upstream

将分叉分支与其上游分支同步。

`github.sync_fork_branch_with_upstream`

### Search Repositories

使用 GitHub 搜索语法搜索 GitHub 仓库。

`github.search_repositories`

### Search Users

使用 GitHub 搜索语法搜索 GitHub 用户。

`github.search_users`

### Search Commits

按提交消息文本和限定符搜索 GitHub 提交。

`github.search_commits`

### Search Code

使用 GitHub 搜索语法搜索 GitHub 代码。

`github.search_code`

### Search Labels

按仓库 ID 和查询搜索 GitHub 仓库中的标签。

`github.search_labels`

### Search Topics

使用 GitHub 搜索语法搜索 GitHub 主题。

`github.search_topics`

### Create Or Update File

通过 GitHub contents API 创建或更新仓库文件。在 .github/workflows 下写入可能需要 GitHub 工作流权限范围。

`github.create_or_update_file`

### Delete File

通过 GitHub contents API 删除仓库文件。在 .github/workflows 下删除可能需要 GitHub 工作流权限范围。

`github.delete_file`

### Update Repository

更新 GitHub 仓库的设置和元数据。

`github.update_repository`

### Fork Repository

分叉 GitHub 仓库。分叉是异步进行的，因此返回的仓库可能不会立即可用。

`github.fork_repository`

### List Repository Forks

列出 GitHub 仓库的分叉。

`github.list_repository_forks`

### List Repository Tags

列出 GitHub 仓库中的标签。

`github.list_repository_tags`

### List Repository Languages

列出 GitHub 仓库中使用的语言及字节数。

`github.list_repository_languages`

### List Repository Contributors

列出 GitHub 仓库的贡献者。

`github.list_repository_contributors`

### List Repository Topics

列出 GitHub 仓库的主题。

`github.list_repository_topics`

### Replace Repository Topics

替换 GitHub 仓库的所有主题。

`github.replace_repository_topics`

### Get Repository Readme

获取 GitHub 仓库的 README，并在可用时返回 base64 和已解码的文本。

`github.get_repository_readme`

### List Organization Repositories

列出 GitHub 组织的仓库。

`github.list_organization_repositories`

### List User Repositories

列出 GitHub 用户的公共仓库。

`github.list_user_repositories`

### Get User

按用户名获取 GitHub 用户资料。

`github.get_user`

### List Repository Collaborators

列出 GitHub 仓库的协作者。

`github.list_repository_collaborators`

### Add Repository Collaborator

向 GitHub 仓库添加协作者或更新其权限。

`github.add_repository_collaborator`

### Remove Repository Collaborator

从 GitHub 仓库移除协作者。

`github.remove_repository_collaborator`

### Get Repository Permission For User

获取 GitHub 用户的仓库权限级别。

`github.get_repository_permission_for_user`

### Get Ref

获取 GitHub 仓库中的 Git 引用。

`github.get_ref`

### List Matching Refs

列出 GitHub 仓库中匹配前缀的 Git 引用。

`github.list_matching_refs`

### Update Ref

更新 GitHub 仓库中的 Git 引用。

`github.update_ref`

### Delete Ref

删除 GitHub 仓库中的 Git 引用。

`github.delete_ref`

### Create Commit Comment

在 GitHub 仓库的提交上创建评论。

`github.create_commit_comment`

### List Commit Comments

列出 GitHub 仓库中提交的评论。

`github.list_commit_comments`

### Star Repository

为已认证用户星标 GitHub 仓库。

`github.star_repository`

### Unstar Repository

为已认证用户取消星标 GitHub 仓库。

`github.unstar_repository`

### Check Repository Starred

检查已认证用户是否已星标 GitHub 仓库。

`github.check_repository_starred`

### List Repository Stargazers

列出星标 GitHub 仓库的用户。

`github.list_repository_stargazers`

### List My Starred Repositories

列出已认证 GitHub 用户星标的仓库。

`github.list_my_starred_repositories`

### List Repository Watchers

列出关注 GitHub 仓库的用户。

`github.list_repository_watchers`

### List Milestones

列出 GitHub 仓库的里程碑。

`github.list_milestones`

### Get Milestone

按编号获取 GitHub 里程碑。

`github.get_milestone`

### Create Milestone

在 GitHub 仓库中创建里程碑。

`github.create_milestone`

### Update Milestone

按编号更新 GitHub 里程碑。

`github.update_milestone`

### Delete Milestone

按编号删除 GitHub 里程碑。

`github.delete_milestone`

### Get Issue Comment

按 ID 获取 GitHub 问题评论。

`github.get_issue_comment`

### Update Issue Comment

按 ID 更新 GitHub 问题评论。

`github.update_issue_comment`

### Delete Issue Comment

按 ID 删除 GitHub 问题评论。

`github.delete_issue_comment`

### Get Label

按名称获取 GitHub 标签。

`github.get_label`

### Update Label

按名称更新 GitHub 标签。

`github.update_label`

### Delete Label

按名称删除 GitHub 标签。

`github.delete_label`

### List Assignees

列出 GitHub 仓库中可用于问题的受理人。

`github.list_assignees`

### Create Issue Reaction

向 GitHub 问题添加反应。

`github.create_issue_reaction`

### Create Issue Comment Reaction

向 GitHub 问题评论添加反应。

`github.create_issue_comment_reaction`

### Get Pull Request Review

按 ID 获取 GitHub 拉取请求审查。

`github.get_pull_request_review`

### Dismiss Pull Request Review

驳回 GitHub 拉取请求审查。

`github.dismiss_pull_request_review`

### Delete Pending Pull Request Review

删除待处理的 GitHub 拉取请求审查并返回已删除的审查。

`github.delete_pending_pull_request_review`

### Update Pull Request Review Comment

按 ID 更新 GitHub 拉取请求审查评论。

`github.update_pull_request_review_comment`

### Delete Pull Request Review Comment

按 ID 删除 GitHub 拉取请求审查评论。

`github.delete_pull_request_review_comment`

### Get Workflow

按 ID 或文件名获取 GitHub Actions 工作流。

`github.get_workflow`

### Dispatch Workflow

触发 GitHub Actions 工作流调度事件。

`github.dispatch_workflow`

### Cancel Workflow Run

取消 GitHub Actions 工作流运行。

`github.cancel_workflow_run`

### Rerun Failed Jobs

重新运行 GitHub Actions 工作流运行中失败的作业。

`github.rerun_failed_jobs`

### Enable Workflow

启用 GitHub Actions 工作流。

`github.enable_workflow`

### Disable Workflow

禁用 GitHub Actions 工作流。

`github.disable_workflow`

### List Workflow Run Artifacts

列出 GitHub Actions 工作流运行的工件。

`github.list_workflow_run_artifacts`

### Download Workflow Artifact

将 GitHub Actions 工作流工件 ZIP 下载到临时文件中转。

`github.download_workflow_artifact`

### Update Release

按数字 ID 更新 GitHub 发布。

`github.update_release`

### Delete Release

按数字 ID 删除 GitHub 发布。

`github.delete_release`

### Generate Release Notes

为 GitHub 发布生成发布说明内容。

`github.generate_release_notes`

### Get Release Asset

按数字 ID 获取 GitHub 发布资产。

`github.get_release_asset`

### Delete Release Asset

按数字 ID 删除 GitHub 发布资产。

`github.delete_release_asset`

没有符合搜索条件的工具。

## 将 GitHub 接入 Open Flow

[连接 GitHub](https://console.openflow.run/connections/github)

每月 20,000 次免费应用调用（付费服务另计）
