Note
Enterprise-owned GitHub Apps are currently in 公共预览版 and subject to change.
You can create a GitHub App under your enterprise account. The app can only be installed on organizations within your enterprise, and can only be authorized by members of your enterprise. The app can't be installed on user accounts.
Step 1: Registering a GitHub App
To create a GitHub App, you must first register the app. See "注册 GitHub 应用."
Step 2: Building a GitHub App
After registering a GitHub App, you will want to write code to make your GitHub App do something. For examples of how to write code, see:
- "有关生成 GitHub 应用的快速入门"
- "构建响应 Webhook 事件的 GitHub 应用"
- "使用 GitHub Apps 生成“使用 GitHub 登录”按钮"
- "使用 GitHub Apps 生成 CLI"
- "使用 GitHub Actions 工作流中的 GitHub App 发出经过身份验证的 API 请求"
You should aim to follow best practices. See "创建 GitHub 应用的最佳做法."
Step 3: Authorizing or sharing your GitHub App
Once your GitHub App is registered, you'll need to make it available to organizations in your enterprise, either through authorization or installation, depending on the app’s purpose.
Step 3a: Authorizing your GitHub App
Some GitHub Apps, like Copilot extensions, require authorization but do not need to be installed on an organization. Users in your enterprise can authorize the app to access resources within organizations. However, the app will only have access to GitHub resources where it is installed. See "授权 GitHub Apps."
Step 3b: Sharing your GitHub App via an installation link
For apps that require installation to function, you can provide organization owners with an installation link. Once the app is installed, it will have access to the organization's resources. See "共享 GitHub 应用."
Step 4: Installing your GitHub App (if required)
If your GitHub App requires installation (not just authorization), organization owners can use the install link to install the app on their organization. See "从第三方途径安装 GitHub Apps."