Add new conceptual article "About creating GitHub Apps" (#36149)
Co-authored-by: Sarah Edwards <skedwards88@github.com> Co-authored-by: Hirsch Singhal <1666363+hpsin@users.noreply.github.com> Co-authored-by: Niky <20468684+nikymorg@users.noreply.github.com> Co-authored-by: Jess Hosman <1183847+jhosman@users.noreply.github.com>
This commit is contained in:
@@ -153,7 +153,7 @@ We recommend creating a README file to help people learn how to use your action.
|
|||||||
|
|
||||||
## Comparing {% data variables.product.prodname_actions %} to {% data variables.product.prodname_github_apps %}
|
## Comparing {% data variables.product.prodname_actions %} to {% data variables.product.prodname_github_apps %}
|
||||||
|
|
||||||
{% data variables.product.prodname_marketplace %} offers tools to improve your workflow. Understanding the differences and the benefits of each tool will allow you to select the best tool for your job. For more information about building apps, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-apps)."
|
{% data variables.product.prodname_marketplace %} offers tools to improve your workflow. Understanding the differences and the benefits of each tool will allow you to select the best tool for your job. For more information about building apps, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)."
|
||||||
|
|
||||||
### Strengths of GitHub Actions and GitHub Apps
|
### Strengths of GitHub Actions and GitHub Apps
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Here are the steps you'll take to configure the template GitHub App:
|
|||||||
|
|
||||||
You may find it helpful to have a basic understanding of the following:
|
You may find it helpful to have a basic understanding of the following:
|
||||||
|
|
||||||
* [GitHub Apps](/apps/creating-github-apps/setting-up-a-github-app/about-apps)
|
* [GitHub Apps](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)
|
||||||
* [Webhooks](/webhooks-and-events/webhooks/about-webhooks)
|
* [Webhooks](/webhooks-and-events/webhooks/about-webhooks)
|
||||||
* [The Ruby programming language](https://www.ruby-lang.org/en/)
|
* [The Ruby programming language](https://www.ruby-lang.org/en/)
|
||||||
* [REST APIs](/rest)
|
* [REST APIs](/rest)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Once you've worked through the steps, you'll be ready to develop other kinds of
|
|||||||
|
|
||||||
You may find it helpful to have a basic understanding of the following:
|
You may find it helpful to have a basic understanding of the following:
|
||||||
|
|
||||||
* [GitHub Apps](/apps/creating-github-apps/setting-up-a-github-app/about-apps)
|
* [GitHub Apps](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)
|
||||||
* [Webhooks](/webhooks-and-events/webhooks/about-webhooks)
|
* [Webhooks](/webhooks-and-events/webhooks/about-webhooks)
|
||||||
* [The Ruby programming language](https://www.ruby-lang.org/en/)
|
* [The Ruby programming language](https://www.ruby-lang.org/en/)
|
||||||
* [REST APIs](/rest)
|
* [REST APIs](/rest)
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
---
|
|
||||||
title: About apps
|
|
||||||
intro: 'You can build integrations with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} APIs to add flexibility and reduce friction in your own workflow.{% ifversion fpt or ghec %} You can also share integrations with others on [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace).{% endif %}'
|
|
||||||
redirect_from:
|
|
||||||
- /apps/building-integrationssetting-up-a-new-integration
|
|
||||||
- /apps/building-integrations
|
|
||||||
- /apps/getting-started-with-building-apps
|
|
||||||
- /apps/about-apps
|
|
||||||
- /developers/apps/about-apps
|
|
||||||
- /developers/apps/getting-started-with-apps/about-apps
|
|
||||||
- /apps/creating-github-apps/creating-github-apps/about-apps
|
|
||||||
versions:
|
|
||||||
fpt: '*'
|
|
||||||
ghes: '*'
|
|
||||||
ghae: '*'
|
|
||||||
ghec: '*'
|
|
||||||
topics:
|
|
||||||
- GitHub Apps
|
|
||||||
---
|
|
||||||
Apps on {% data variables.product.prodname_dotcom %} allow you to automate and improve your workflow. You can build apps to improve your workflow.{% ifversion fpt or ghec %} You can also share or sell apps in [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace). To learn how to list an app on {% data variables.product.prodname_marketplace %}, see "[AUTOTITLE](/apps/publishing-apps-to-github-marketplace/github-marketplace-overview/about-github-marketplace)."{% endif %}
|
|
||||||
|
|
||||||
{% data reusables.marketplace.github_apps_preferred %}, but GitHub supports both {% data variables.product.prodname_oauth_apps %} and {% data variables.product.prodname_github_apps %}. For information on choosing a type of app, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/differences-between-github-apps-and-oauth-apps)."
|
|
||||||
|
|
||||||
{% data reusables.apps.general-apps-restrictions %}
|
|
||||||
|
|
||||||
For a walkthrough of the process of building a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/guides/using-the-github-api-in-your-app)."
|
|
||||||
|
|
||||||
## About {% data variables.product.prodname_github_apps %}
|
|
||||||
|
|
||||||
{% data variables.product.prodname_github_apps %} are first-class actors within GitHub. A {% data variables.product.prodname_github_app %} acts on its own behalf, taking actions via the API directly using its own identity, which means you don't need to maintain a bot or service account as a separate user.
|
|
||||||
|
|
||||||
{% data variables.product.prodname_github_apps %} can be installed directly on organizations and personal accounts and granted access to specific repositories. They come with built-in webhooks and narrow, specific permissions. When you set up your {% data variables.product.prodname_github_app %}, you can select the repositories you want it to access. For example, you can set up an app called `MyGitHub` that writes issues in the `octocat` repository and _only_ the `octocat` repository. To install a {% data variables.product.prodname_github_app %}, you must be an organization owner or have admin permissions in a repository.
|
|
||||||
|
|
||||||
{% data reusables.apps.app_manager_role %}
|
|
||||||
|
|
||||||
{% data variables.product.prodname_github_apps %} are applications that need to be hosted somewhere. For step-by-step instructions that cover servers and hosting, see "[AUTOTITLE](/apps/creating-github-apps/guides/using-the-github-api-in-your-app)."
|
|
||||||
|
|
||||||
To improve your workflow, you can create a {% data variables.product.prodname_github_app %} that contains multiple scripts or an entire application, and then connect that app to many other tools. For example, you can connect {% data variables.product.prodname_github_apps %} to GitHub, Slack, other in-house apps you may have, email programs, or other APIs.
|
|
||||||
|
|
||||||
Keep these ideas in mind when creating {% data variables.product.prodname_github_apps %}:
|
|
||||||
|
|
||||||
{% ifversion fpt or ghec %}
|
|
||||||
* {% data reusables.apps.maximum-github-apps-allowed %} {% endif %}
|
|
||||||
* A {% data variables.product.prodname_github_app %} should take actions independent of a user (unless the app is using a [user access token](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)). {% data reusables.apps.expiring_user_authorization_tokens %}
|
|
||||||
|
|
||||||
* Make sure the {% data variables.product.prodname_github_app %} integrates with specific repositories.
|
|
||||||
* The {% data variables.product.prodname_github_app %} should connect to a personal account or an organization.
|
|
||||||
* Don't expect the {% data variables.product.prodname_github_app %} to know and do everything a user can.
|
|
||||||
* Don't use a {% data variables.product.prodname_github_app %} if you just need a "Login with GitHub" service. But a {% data variables.product.prodname_github_app %} can generate a [user access token](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app) to log users in _and_ do other things.
|
|
||||||
* Don't build a {% data variables.product.prodname_github_app %} if you _only_ want to act as a GitHub user and do everything that user can do.{% ifversion fpt or ghec %}
|
|
||||||
* {% data reusables.apps.general-apps-restrictions %}{% endif %}
|
|
||||||
|
|
||||||
To begin developing {% data variables.product.prodname_github_apps %}, start with "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)."{% ifversion fpt or ghec %} To learn how to use {% data variables.product.prodname_github_app %} Manifests, which allow people to create preconfigured {% data variables.product.prodname_github_apps %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest)."{% endif %}
|
|
||||||
|
|
||||||
## About {% data variables.product.prodname_oauth_apps %}
|
|
||||||
|
|
||||||
OAuth2 is a protocol that lets external applications request authorization to private details in a user's {% data variables.product.prodname_dotcom %} account without accessing their password. This is preferred over Basic Authentication because tokens can be limited to specific types of data and can be revoked by users at any time.
|
|
||||||
|
|
||||||
{% data reusables.apps.deletes_ssh_keys %}
|
|
||||||
|
|
||||||
An {% data variables.product.prodname_oauth_app %} uses {% data variables.product.prodname_dotcom %} as an identity provider to authenticate as the user who grants access to the app. This means when a user grants an {% data variables.product.prodname_oauth_app %} access, they grant permissions to _all_ repositories they have access to in their account, and also to any organizations they belong to that haven't blocked third-party access.
|
|
||||||
|
|
||||||
Building an {% data variables.product.prodname_oauth_app %} is a good option if you are creating more complex processes than a simple script can handle. Note that {% data variables.product.prodname_oauth_apps %} are applications that need to be hosted somewhere.
|
|
||||||
|
|
||||||
Keep these ideas in mind when creating {% data variables.product.prodname_oauth_apps %}:
|
|
||||||
|
|
||||||
{% ifversion fpt or ghec %}
|
|
||||||
* {% data reusables.apps.maximum-oauth-apps-allowed %} {% endif %}
|
|
||||||
* An {% data variables.product.prodname_oauth_app %} should always act as the authenticated {% data variables.product.prodname_dotcom %} user across all of {% data variables.product.prodname_dotcom %} (for example, when providing user notifications).
|
|
||||||
* An {% data variables.product.prodname_oauth_app %} can be used as an identity provider by enabling a "Login with {% data variables.product.prodname_dotcom %}" for the authenticated user.
|
|
||||||
* Don't build an {% data variables.product.prodname_oauth_app %} if you want your application to act on a single repository. With the `repo` OAuth scope, {% data variables.product.prodname_oauth_apps %} can act on _all_ of the authenticated user's repositories.
|
|
||||||
* Don't build an {% data variables.product.prodname_oauth_app %} to act as an application for your team or company. {% data variables.product.prodname_oauth_apps %} authenticate as a single user, so if one person creates an {% data variables.product.prodname_oauth_app %} for a company to use, and then they leave the company, no one else will have access to it.{% ifversion fpt or ghec %}
|
|
||||||
* {% data reusables.apps.oauth-apps-restrictions %}{% endif %}
|
|
||||||
|
|
||||||
For more on {% data variables.product.prodname_oauth_apps %}, see "[AUTOTITLE](/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app)" and "[AUTOTITLE](/rest/guides/basics-of-authentication#registering-your-app)."
|
|
||||||
|
|
||||||
## {% data variables.product.pat_generic_caps %}s
|
|
||||||
|
|
||||||
A [{% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) is a string of characters that functions similarly to an [OAuth token](/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps) in that you can specify its permissions via [scopes](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps). A {% data variables.product.pat_generic %} is also similar to a password, but you can have many of them and you can revoke access to each one at any time.
|
|
||||||
|
|
||||||
As an example, you can enable a {% data variables.product.pat_generic %} to write to your repositories. If then you run a `curl` command or write a script that [creates an issue](/rest/issues#create-an-issue) in your repository, you would pass the {% data variables.product.pat_generic %} to authenticate. You can store the {% data variables.product.pat_generic %} as an environment variable to avoid typing it every time you use it.
|
|
||||||
|
|
||||||
Keep these ideas in mind when using {% data variables.product.pat_generic %}s:
|
|
||||||
|
|
||||||
* Remember to use this token to represent yourself only.
|
|
||||||
* You can perform one-off `curl` requests.
|
|
||||||
* You can run personal scripts.
|
|
||||||
* Don't set up a script for your whole team or company to use.
|
|
||||||
* Don't set up a shared personal account to act as a bot user.
|
|
||||||
* Grant your token the minimal privileges it needs.
|
|
||||||
* Set an expiration for your {% data variables.product.pat_generic %}s, to help keep your information secure.
|
|
||||||
|
|
||||||
## Determining which integration to build
|
|
||||||
|
|
||||||
Before you get started creating integrations, you need to determine the best way to access, authenticate, and interact with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} APIs.
|
|
||||||
|
|
||||||
To decide whether to use {% data variables.product.pat_generic %}s, {% data variables.product.prodname_github_apps %}, or {% data variables.product.prodname_oauth_apps %} for your integration, consider these questions about how your integration needs to behave and what it needs to access:
|
|
||||||
|
|
||||||
* Will my integration act only as me, or will it act more like an application?
|
|
||||||
* Do I want it to act independently of me as its own entity?
|
|
||||||
* Will it access everything that I can access, or do I want to limit its access?
|
|
||||||
* Is it simple or complex? For example, {% data variables.product.pat_generic %}s are good for simple scripts and `curl` commands, whereas an {% data variables.product.prodname_oauth_app %} can handle more complex scripting.
|
|
||||||
|
|
||||||
If the integration will act only as you, but you want to limit its access, use a {% data variables.product.prodname_github_app %} or a {% data variables.product.pat_v2 %}.
|
|
||||||
|
|
||||||
If the integration will act more like an application, consider whether you want the integration to act independently of you as its own entity. If so, use a {% data variables.product.prodname_github_app %}.
|
|
||||||
|
|
||||||
## Requesting support
|
|
||||||
|
|
||||||
{% data reusables.support.help_resources %}
|
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
---
|
||||||
|
title: About creating GitHub Apps
|
||||||
|
intro: "{% data variables.product.prodname_github_app %}s let you build integrations to automate processes and extend {% data variables.product.company_short %}'s functionality."
|
||||||
|
versions:
|
||||||
|
fpt: '*'
|
||||||
|
ghes: '*'
|
||||||
|
ghae: '*'
|
||||||
|
ghec: '*'
|
||||||
|
redirect_from:
|
||||||
|
- /apps/creating-github-apps/creating-github-apps/about-apps
|
||||||
|
- /apps/building-integrations/setting-up-a-new-integration
|
||||||
|
- /apps/building-integrations
|
||||||
|
- /apps/getting-started-with-building-apps
|
||||||
|
- /apps/about-apps
|
||||||
|
- /developers/apps/about-apps
|
||||||
|
- /developers/apps/getting-started-with-apps/about-apps
|
||||||
|
topics:
|
||||||
|
- GitHub Apps
|
||||||
|
---
|
||||||
|
|
||||||
|
## About {% data variables.product.prodname_github_apps %}
|
||||||
|
|
||||||
|
A {% data variables.product.prodname_github_app %} is a type of integration that you can build to interact with and extend the functionality of {% data variables.product.company_short %}. You can build a {% data variables.product.prodname_github_app %} to provide flexibility and reduce friction in your processes, without needing to sign in a user or create a service account.
|
||||||
|
|
||||||
|
Common use cases for {% data variables.product.prodname_github_apps %} include:
|
||||||
|
- Automating tasks or background processes
|
||||||
|
- Supporting "Sign in with GitHub," which allows users to sign in with their {% data variables.product.prodname_dotcom %} account to provide their identity in your ecosystem
|
||||||
|
- As a developer tool, allowing users to work with {% data variables.product.prodname_dotcom %} by signing into your {% data variables.product.prodname_github_app %}, which can then act on their behalf
|
||||||
|
- Integrating your tool or external service with {% data variables.product.company_short %}
|
||||||
|
|
||||||
|
{% data variables.product.prodname_github_apps %} are independent actors within {% data variables.product.prodname_dotcom %}. A {% data variables.product.prodname_github_app %} acts on its own behalf, which means that you don't need to maintain a bot or service account as a separate user. They can also authenticate as a user and act on the user's behalf, using the permissions granted to it.
|
||||||
|
|
||||||
|
A user or organization can own up to 100 {% data variables.product.prodname_github_apps %}, but there is no limit to how many can be installed on an account.
|
||||||
|
|
||||||
|
If you want your app to respond to events on {% data variables.product.prodname_dotcom %}, your app should subscribe to webhooks. For example, you may want your app to leave a comment when a pull request is opened. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/using-webhooks-with-github-apps)."
|
||||||
|
|
||||||
|
During development, you can run your app locally for development. Once the app is ready for production use, you should deploy your app to a dedicated server. For example, you can use [Azure App Service](https://azure.microsoft.com/products/app-service/).
|
||||||
|
|
||||||
|
### Permissions and visibility for {% data variables.product.prodname_github_apps %}
|
||||||
|
|
||||||
|
{% data variables.product.prodname_github_apps %} can be installed directly on organizations and personal accounts and granted access to specific repositories. They come with built-in webhooks and narrow, specific permissions. When you set up your {% data variables.product.prodname_github_app %}, you can select specific permissions for the app. These permissions determine what the app can do via the {% data variables.product.prodname_dotcom %} API, what they can do on behalf of a signed in user, and what webhooks the app can receive. When the app is then installed on a user or organization account, the person who installs the app decides what repositories the app can access under that account. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-a-github-app)."
|
||||||
|
|
||||||
|
{% data reusables.apps.app_manager_role %}
|
||||||
|
|
||||||
|
You can set the visibility of your app to control who can install it. You can make it public so that other {% data variables.product.prodname_dotcom %} users or organizations can install the app, or private so that you can only install it on the account that owns the app. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/making-a-github-app-public-or-private)."
|
||||||
|
|
||||||
|
## When to use {% data variables.product.prodname_github_apps %}
|
||||||
|
|
||||||
|
When building an integration, you should consider using a {% data variables.product.prodname_github_app %} in the following scenarios instead of an {% data variables.product.prodname_oauth_app %}, {% data variables.product.pat_generic%}, or {% data variables.product.prodname_actions %}.
|
||||||
|
|
||||||
|
### Using a {% data variables.product.prodname_github_app %} instead of an {% data variables.product.prodname_oauth_app %}
|
||||||
|
|
||||||
|
You should always favor building a {% data variables.product.prodname_github_app %} over an {% data variables.product.prodname_oauth_app %}. {% data variables.product.prodname_github_apps %} provide more granular control over the app's access and permissions. Administrators benefit too, because they get better control and visibility into what your application can do in their organization.
|
||||||
|
|
||||||
|
For information on how to migrate an {% data variables.product.prodname_oauth_app %} to a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/guides/migrating-oauth-apps-to-github-apps)."
|
||||||
|
|
||||||
|
### Choosing between a {% data variables.product.prodname_github_app %} or a {% data variables.product.pat_generic %}
|
||||||
|
|
||||||
|
If you want to access {% data variables.product.prodname_dotcom %} resources on behalf of a user or in an organization, or you anticipate a long-lived integration, we recommend building a {% data variables.product.prodname_github_app %}.
|
||||||
|
|
||||||
|
You can use {% data variables.product.pat_generic_plural %} for API testing or short-lived scripts. It is important to note that since a {% data variables.product.pat_generic %} is associated to a user, your automation could break if the user no longer has access to the resources you need. A {% data variables.product.prodname_github_app %} installed in an organization is not dependent on a user.
|
||||||
|
|
||||||
|
{% data variables.product.company_short %} supports two types of {% data variables.product.pat_generic_plural %}, but recommends that you use {% data variables.product.pat_v2 %}s instead of {% data variables.product.pat_v1_plural %} whenever possible. For more information about {% data variables.product.pat_generic_plural %}, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#types-of-personal-access-tokens)."
|
||||||
|
|
||||||
|
### Choosing between a {% data variables.product.prodname_github_app %} or {% data variables.product.prodname_actions %}
|
||||||
|
|
||||||
|
{% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_actions %} both provide ways to build automation and workflow tools.
|
||||||
|
|
||||||
|
{% data variables.product.prodname_actions %} provide automation that can perform jobs like continuous integration, deployment tasks, and project management in a repository. They run directly on {% data variables.product.prodname_dotcom %}-hosted runner machines or self-hosted runners that your administrator sets up. {% data variables.product.prodname_actions %} do not run persistently. They run in response to events that occur in their repository, and only have access to the resources of the repository that they are set up for. However, they can be shared across repositories and organizations, allowing developers to reuse and modify existing actions to meet their needs. {% data variables.product.prodname_actions %} also come with built-in secret management, which you can use to securely interact with third-party services and manage deploy keys safely.
|
||||||
|
|
||||||
|
{% data variables.product.prodname_github_apps %} run persistently on a server or compute infrastructure that you provide, and they react to webhook events as well as events from outside the {% data variables.product.prodname_dotcom %} ecosystem. They are a good option for operations that span multiple repositories or organizations, or for providing hosted services to other organizations. A {% data variables.product.prodname_github_app %} is the best choice when building a tool with functions that occur primarily outside of {% data variables.product.prodname_dotcom %} or require more time than what an action is allotted for execution.
|
||||||
|
|
||||||
|
For more information about comparing {% data variables.product.prodname_actions %} to {% data variables.product.prodname_github_apps %}, see "[AUTOTITLE](/actions/creating-actions/about-custom-actions#comparing-github-actions-to-github-apps)."
|
||||||
|
|
||||||
|
{% ifversion projects-v2 %}You can use a {% data variables.product.prodname_github_app %} to authenticate in a {% data variables.product.prodname_actions %}
|
||||||
|
workflow if the built in `GITHUB_TOKEN` does not have sufficient permissions. For an example workflow that authenticates with a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions#example-workflow-authenticating-with-a-github-app)."{% endif %}
|
||||||
|
|
||||||
|
## Understanding what type of {% data variables.product.prodname_github_app %} to build
|
||||||
|
|
||||||
|
There are multiple ways to design a {% data variables.product.prodname_github_app %} that you will want to consider, based on the functionality you want the app to have.
|
||||||
|
|
||||||
|
### {% data variables.product.prodname_github_apps %} that act on behalf of a user
|
||||||
|
|
||||||
|
If you want your app to take actions on behalf of a user, you should use a user access token for authentication. This type of request is sometimes called "user-to-server," and it means that the app will be limited by the permissions that have been given to the app as well as the user's permission. With this pattern, the user must authorize the app before the app can take action. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)."
|
||||||
|
|
||||||
|
Some examples of automations you could create with a {% data variables.product.prodname_github_app %}, where the app acts on a user's behalf, include:
|
||||||
|
- A {% data variables.product.prodname_github_app %} that uses {% data variables.product.prodname_dotcom %} as an identity provider for your ecosystem
|
||||||
|
- A {% data variables.product.prodname_github_app %} that adds a service on top of {% data variables.product.prodname_dotcom_the_website %} that might be useful to a {% data variables.product.prodname_dotcom %} user. You can share the app with other developers via {% data variables.product.prodname_marketplace %} or by making the app public
|
||||||
|
|
||||||
|
### {% data variables.product.prodname_github_apps %} that act on their own behalf
|
||||||
|
|
||||||
|
If you want your app to take actions on behalf of itself, rather than a user, you should use an installation access token for authentication. This type of request is sometimes called "server-to-server," and it means that the app will be limited by the permissions that have been given to the app. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation)."
|
||||||
|
|
||||||
|
Some examples of automations you could create with a {% data variables.product.prodname_github_app %}, where the app acts on its own behalf, include:
|
||||||
|
- A {% data variables.product.prodname_github_app %} that uses webhooks to react to an event given a certain set of criteria. {% ifversion pat-v2 %}For example, you could create an automation around the REST API endpoints for [reviewing requests for {% data variables.product.pat_v2 %}](/rest/orgs/personal-access-tokens?apiVersion=2022-11-28#review-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens) that approves a request given a certain policy{% else %}For example, you could create an automation that uses [the REST API endpoints for labels](/rest/issues/labels) to add a label to each new issue created in a repository, given a certain set of criteria{% endif %}
|
||||||
|
- A {% data variables.product.prodname_github_app %} that helps repository contributors. For example, the app could post helpful resources after a contributor creates a pull request or makes a comment
|
||||||
|
- A {% data variables.product.prodname_github_app %} that generates short-lived tokens to give to other CI/CD tools, or to pull information from a repository
|
||||||
|
|
||||||
|
## Further reading
|
||||||
|
|
||||||
|
- "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/creating-a-github-app)"
|
||||||
|
- "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app)"
|
||||||
|
- [Guides on building GitHub Apps](/apps/creating-github-apps/guides)
|
||||||
@@ -12,7 +12,7 @@ redirect_from:
|
|||||||
topics:
|
topics:
|
||||||
- GitHub Apps
|
- GitHub Apps
|
||||||
children:
|
children:
|
||||||
- /about-apps
|
- /about-creating-github-apps
|
||||||
- /differences-between-github-apps-and-oauth-apps
|
- /differences-between-github-apps-and-oauth-apps
|
||||||
- /rate-limits-for-github-apps
|
- /rate-limits-for-github-apps
|
||||||
- /creating-a-github-app
|
- /creating-a-github-app
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ We recommend creating a GitHub App rather than an OAuth App. {% data reusables.m
|
|||||||
- Apps should not share service accounts such as email or database services to manage your SaaS service.
|
- Apps should not share service accounts such as email or database services to manage your SaaS service.
|
||||||
- All services used in your app should have unique login and password credentials.
|
- All services used in your app should have unique login and password credentials.
|
||||||
- Admin privilege access to the production hosting infrastructure should only be given to engineers and employees with administrative duties.
|
- Admin privilege access to the production hosting infrastructure should only be given to engineers and employees with administrative duties.
|
||||||
- Apps should not use {% data variables.product.pat_generic %}s to authenticate and should authenticate as an [OAuth App](/apps/creating-github-apps/setting-up-a-github-app/about-apps#about-oauth-apps) or a [GitHub App](/apps/creating-github-apps/setting-up-a-github-app/about-apps#about-github-apps):
|
- Apps should not use {% data variables.product.pat_generic %}s to authenticate and should authenticate as an [OAuth App](/apps/oauth-apps/building-oauth-apps) or a [GitHub App](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps#about-github-apps):
|
||||||
- OAuth Apps should authenticate using an [OAuth token](/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps).
|
- OAuth Apps should authenticate using an [OAuth token](/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps).
|
||||||
- GitHub Apps should authenticate using either a [JSON Web Token (JWT)](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app), [OAuth token](/apps/creating-github-apps/authenticating-with-a-github-app/identifying-and-authorizing-users-for-github-apps), or [installation access token](/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app).
|
- GitHub Apps should authenticate using either a [JSON Web Token (JWT)](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app), [OAuth token](/apps/creating-github-apps/authenticating-with-a-github-app/identifying-and-authorizing-users-for-github-apps), or [installation access token](/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app).
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ shortTitle: 'Create a {% data variables.product.pat_generic %}'
|
|||||||
|
|
||||||
{% data variables.product.pat_generic_caps %}s are an alternative to using passwords for authentication to {% data variables.product.product_name %} when using the [GitHub API](/rest/overview/authenticating-to-the-rest-api) or the [command line](#using-a-personal-access-token-on-the-command-line).
|
{% data variables.product.pat_generic_caps %}s are an alternative to using passwords for authentication to {% data variables.product.product_name %} when using the [GitHub API](/rest/overview/authenticating-to-the-rest-api) or the [command line](#using-a-personal-access-token-on-the-command-line).
|
||||||
|
|
||||||
{% data variables.product.pat_generic_caps %}s are intended to access {% data variables.product.company_short %} resources on behalf of yourself. To access resources on behalf of an organization, or for long-lived integrations, you should use a {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-apps)."
|
{% data variables.product.pat_generic_caps %}s are intended to access {% data variables.product.company_short %} resources on behalf of yourself. To access resources on behalf of an organization, or for long-lived integrations, you should use a {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)."
|
||||||
|
|
||||||
{% ifversion pat-v2 %}
|
{% ifversion pat-v2 %}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Integrations can be {% data variables.product.prodname_github_apps %}, {% data v
|
|||||||
|
|
||||||
For more information, see:
|
For more information, see:
|
||||||
- "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/differences-between-github-apps-and-oauth-apps)"
|
- "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/differences-between-github-apps-and-oauth-apps)"
|
||||||
- "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-apps)"
|
- "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)"
|
||||||
- "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)"
|
- "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)"
|
||||||
- "[AUTOTITLE](/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps)"
|
- "[AUTOTITLE](/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps)"
|
||||||
- "[AUTOTITLE](/apps/using-github-apps/authorizing-github-apps)"
|
- "[AUTOTITLE](/apps/using-github-apps/authorizing-github-apps)"
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ You can upgrade your {% data variables.product.product_name %} license to includ
|
|||||||
You can customize and automate work in organizations in your enterprise with {% data variables.product.prodname_dotcom %} and {% data variables.product.prodname_oauth_apps %}, {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, {% data variables.product.prodname_actions %}, {% data variables.product.prodname_registry %} , and {% data variables.product.prodname_pages %}.
|
You can customize and automate work in organizations in your enterprise with {% data variables.product.prodname_dotcom %} and {% data variables.product.prodname_oauth_apps %}, {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, {% data variables.product.prodname_actions %}, {% data variables.product.prodname_registry %} , and {% data variables.product.prodname_pages %}.
|
||||||
|
|
||||||
### 1. Building {% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %}
|
### 1. Building {% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %}
|
||||||
You can build integrations with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, such as {% data variables.product.prodname_github_apps %} or {% data variables.product.prodname_oauth_apps %}, for use in organizations in your enterprise to complement and extend your workflows. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-apps)."
|
You can build integrations with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, such as {% data variables.product.prodname_github_apps %} or {% data variables.product.prodname_oauth_apps %}, for use in organizations in your enterprise to complement and extend your workflows. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)."
|
||||||
### 2. Using the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API
|
### 2. Using the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API
|
||||||
{% data reusables.getting-started.api %}
|
{% data reusables.getting-started.api %}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ To replace GitHub Services with Webhooks:
|
|||||||
|
|
||||||
- **GitHub Apps**: Update your app's permissions and subscribed events to configure your app to receive the relevant webhook events.
|
- **GitHub Apps**: Update your app's permissions and subscribed events to configure your app to receive the relevant webhook events.
|
||||||
- **OAuth Apps**: Request either the `repo_hook` and/or `org_hook` scope(s) to manage the relevant events on behalf of users.
|
- **OAuth Apps**: Request either the `repo_hook` and/or `org_hook` scope(s) to manage the relevant events on behalf of users.
|
||||||
- **GitHub Service providers**: Request that users manually configure a webhook with the relevant events sent to you, or take this opportunity to build an app to manage this functionality. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-apps)."
|
- **GitHub Service providers**: Request that users manually configure a webhook with the relevant events sent to you, or take this opportunity to build an app to manage this functionality. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)."
|
||||||
|
|
||||||
3. Move additional configuration from outside of GitHub. Some GitHub Services require additional, custom configuration on the configuration page within GitHub. If your service does this, you will need to move this functionality into your application or rely on GitHub or OAuth Apps where applicable.
|
3. Move additional configuration from outside of GitHub. Some GitHub Services require additional, custom configuration on the configuration page within GitHub. If your service does this, you will need to move this functionality into your application or rely on GitHub or OAuth Apps where applicable.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
By default, only organization owners can manage the settings of GitHub Apps in an organization. To allow additional users to change the developer settings of GitHub Apps owned by the organization, an owner can grant them GitHub App manager permissions. GitHub App Managers can't manage third-party applications. For more information about adding and removing GitHub App managers in your organization, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#github-app-managers)" .
|
By default, only organization owners can manage the settings of GitHub Apps in an organization. To allow additional users to change the developer settings of GitHub Apps owned by the organization, an owner can grant them GitHub App manager permissions. GitHub App Managers can't manage third-party applications. For more information about adding and removing GitHub App managers in your organization, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#github-app-managers)."
|
||||||
|
|||||||
Reference in New Issue
Block a user