1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Merge branch 'main' into commonmark-fixes

This commit is contained in:
Rachael Sewell
2023-06-05 17:16:50 +00:00
214 changed files with 5230 additions and 3676 deletions

View File

@@ -6,7 +6,7 @@ module.exports = {
node: true, node: true,
}, },
parser: '@babel/eslint-parser', parser: '@babel/eslint-parser',
extends: ['eslint:recommended', 'standard', 'prettier'], extends: ['eslint:recommended', 'standard', 'plugin:import/errors', 'prettier'],
parserOptions: { parserOptions: {
ecmaVersion: 11, ecmaVersion: 11,
requireConfigFile: 'false', requireConfigFile: 'false',
@@ -39,4 +39,10 @@ module.exports = {
}, },
}, },
], ],
settings: {
'import/resolver': {
typescript: true,
node: true
}
}
} }

View File

@@ -7,11 +7,6 @@
# #
# [end-readme] # [end-readme]
# Translations are never tested in preview environments
# but let's keep the empty directory.
rm -rf translations
mkdir translations
# The assumption here is that a preview build will not # The assumption here is that a preview build will not
# need these legacy redirects. Only the redirects from # need these legacy redirects. Only the redirects from
# front-matter will be at play. # front-matter will be at play.

View File

@@ -17,6 +17,12 @@ on:
# unlike 'pull_request_target', these only have secrets if the pull # unlike 'pull_request_target', these only have secrets if the pull
# request creator has permission to access secrets. # request creator has permission to access secrets.
pull_request_target: pull_request_target:
types:
# In case someone puts the 'preview-with-translations' label on the PR
- opened
- synchronize
- reopened
- labeled
merge_group: merge_group:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
@@ -28,7 +34,10 @@ on:
description: 'The commit SHA to build' description: 'The commit SHA to build'
type: string type: string
required: true required: true
WITH_TRANSLATIONS:
description: 'With translations'
required: true
type: boolean
permissions: permissions:
contents: read contents: read
deployments: write deployments: write
@@ -153,6 +162,26 @@ jobs:
name: Merge docs-early-access repo's folders name: Merge docs-early-access repo's folders
run: .github/actions-scripts/merge-early-access.sh run: .github/actions-scripts/merge-early-access.sh
- name: Determine if we should include translations?
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
id: with-translations
with:
script: |
if (process.env.IS_INTERNAL_BUILD !== 'true') return false
if (context.eventName === "workflow_dispatch") {
return context.payload.inputs.WITH_TRANSLATIONS === 'true'
}
// This works for pull_request_target too
if (context.payload.pull_request?.labels) {
return context.payload.pull_request.labels.map(label => label.name).includes('preview-with-translations')
}
return false
- if: ${{ steps.with-translations.outputs.result == 'true' }}
uses: ./.github/actions/clone-translations
with:
token: ${{ secrets.DOCUBOT_REPO_PAT }}
- if: ${{ env.IS_PUBLIC_BUILD == 'true' }} - if: ${{ env.IS_PUBLIC_BUILD == 'true' }}
name: Check out user code to temp directory name: Check out user code to temp directory
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
@@ -188,7 +217,7 @@ jobs:
with: with:
context: . context: .
push: true push: true
target: preview target: ${{ steps.with-translations.outputs.result == 'true' && 'production' || 'preview' }}
tags: ${{ env.DOCKER_IMAGE }} tags: ${{ env.DOCKER_IMAGE }}
# we only pull the `main` cache image # we only pull the `main` cache image
cache-from: type=registry,ref=${{ secrets.NONPROD_REGISTRY_SERVER }}/${{ github.repository }}:main-preview cache-from: type=registry,ref=${{ secrets.NONPROD_REGISTRY_SERVER }}/${{ github.repository }}:main-preview

View File

@@ -1,79 +0,0 @@
name: Browser Tests
# **What it does**: This runs our browser tests on pull requests.
# **Why we have it**: This is the only way we currently test our browser JavaScript.
# **Who does it impact**: Docs engineering, open-source engineering contributors.
on:
workflow_dispatch:
pull_request:
paths:
- '**.js'
- '**.mjs'
- '**.ts'
- '**.tsx'
- jest.config.js
- package.json
# In case something like eslint or tsc or prettier upgrades
- package-lock.json
# Ultimately, for debugging this workflow itself
- .github/workflows/browser-test.yml
permissions:
contents: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
env:
ELASTICSEARCH_URL: http://localhost:9200/
jobs:
build:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: ./.github/actions/setup-elasticsearch
- name: Setup Node.js
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
with:
node-version-file: 'package.json'
cache: npm
- name: Install dependencies
env:
# This makes it so the puppeteer npm package doesn't bother
# to download a copy of chromium because it can use
# `$PUPPETEER_EXECUTABLE_PATH` from the ubuntu Action container.
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
run: npm ci --include=optional
- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ secrets.DOCUBOT_REPO_PAT }}
- name: Cache nextjs build
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
- name: Run build script
run: npm run build
- name: Index fixtures into the local Elasticsearch
run: npm run index-test-fixtures
- name: Check that Elasticsearch is accessible
run: |
curl --fail --retry-connrefused --retry 5 -I ${{ env.ELASTICSEARCH_URL }}
- name: Run browser-test
run: npm run browser-test

View File

@@ -21,7 +21,7 @@ jobs:
}} }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 - uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43
with: with:
project: Docs open source board project: Docs open source board
column: Help wanted column: Help wanted

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: move PR - name: move PR
uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43
with: with:
project: Docs open source board project: Docs open source board
column: Triage column: Triage

View File

@@ -40,23 +40,27 @@ jobs:
// repos. // repos.
// You can run multiple paths per suite as space-separated in `path`. // You can run multiple paths per suite as space-separated in `path`.
return [ return [
{ name: 'content', path: 'tests/content', },
{ name: 'automated-pipelines', path: 'src/automated-pipelines/tests', }, { name: 'automated-pipelines', path: 'src/automated-pipelines/tests', },
{ name: 'content', path: 'tests/content', },
// { name: 'content-linter', path: 'src/content-linter/tests', },
{ name: 'events', path: 'src/events/tests', }, { name: 'events', path: 'src/events/tests', },
{ name: 'ghes-releases', path: 'src/ghes-releases/tests', }, { name: 'ghes-releases', path: 'src/ghes-releases/tests', },
{ name: 'github-apps', path: 'src/github-apps/tests', },
{ name: 'graphql', path: 'src/graphql/tests', }, { name: 'graphql', path: 'src/graphql/tests', },
{ name: 'rest', path: 'src/rest/tests', }, { name: 'landings', path: 'src/landings/tests', },
{ name: 'webhooks', path: 'src/webhooks/tests', },
{ name: 'linting', path: 'src/content-linter/tests', }, { name: 'linting', path: 'src/content-linter/tests', },
{ name: 'meta', path: 'tests/meta', }, { name: 'meta', path: 'tests/meta', },
{ name: 'routing', path: 'tests/routing', }, { name: 'observability', path: 'src/observability/tests' },
{ name: 'pageinfo', path: 'src/pageinfo/tests', },
{ name: 'rendering', path: 'tests/rendering', }, { name: 'rendering', path: 'tests/rendering', },
{ name: 'rendering-fixtures', path: 'tests/rendering-fixtures', }, { name: 'rendering-fixtures', path: 'tests/rendering-fixtures', },
{ name: 'rest', path: 'src/rest/tests', },
{ name: 'routing', path: 'tests/routing', },
{ name: 'search', path: 'src/search/tests', }, { name: 'search', path: 'src/search/tests', },
{ name: 'pageinfo', path: 'src/pageinfo/tests', },
context.payload.repository.full_name === 'github/docs-internal' && context.payload.repository.full_name === 'github/docs-internal' &&
{ name: 'translations', path: 'tests/translations', }, { name: 'translations', path: 'tests/translations', },
{ name: 'unit', path: 'tests/unit', }, { name: 'unit', path: 'tests/unit', },
{ name: 'webhooks', path: 'src/webhooks/tests', },
].filter(Boolean) ].filter(Boolean)
test: test:

View File

@@ -61,10 +61,6 @@
{ {
"name": "WEB_CONCURRENCY", "name": "WEB_CONCURRENCY",
"value": "1" "value": "1"
},
{
"name": "ENABLED_LANGUAGES",
"value": "en"
} }
], ],
"resources": { "resources": {

View File

@@ -1,7 +1,10 @@
import pick from 'lodash/pick' import pick from 'lodash/pick'
import { createContext, useContext } from 'react' import { createContext, useContext } from 'react'
import { LearningTrack } from './ArticleContext' import { LearningTrack } from './ArticleContext'
import { FeaturedLink, getFeaturedLinksFromReq } from './ProductLandingContext' import {
FeaturedLink,
getFeaturedLinksFromReq,
} from 'src/landings/components/ProductLandingContext'
export type TocItem = { export type TocItem = {
fullPath: string fullPath: string

View File

@@ -1,8 +1,8 @@
import cx from 'classnames' import cx from 'classnames'
import { useMainContext } from 'components/context/MainContext' import { useMainContext } from 'components/context/MainContext'
import { SidebarProduct } from './SidebarProduct' import { SidebarProduct } from 'src/landings/components/SidebarProduct'
import { SidebarHomepage } from './SidebarHomepage' import { SidebarHomepage } from '../../src/landings/components/SidebarHomepage'
import { AllProductsLink } from './AllProductsLink' import { AllProductsLink } from './AllProductsLink'
import { ApiVersionPicker } from 'src/rest/components/ApiVersionPicker' import { ApiVersionPicker } from 'src/rest/components/ApiVersionPicker'
import { Link } from 'components/Link' import { Link } from 'components/Link'

View File

@@ -138,7 +138,7 @@ jobs:
- name: Deploy to Azure Web App - name: Deploy to Azure Web App
id: deploy-to-webapp id: deploy-to-webapp
uses: azure/webapps-deploy@05ac4e98bfa0f856e6669624239291c73ca27698 uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
with: with:
app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %} app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %}
publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %} publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %}

View File

@@ -116,7 +116,7 @@ jobs:
- name: Deploy to Azure Web App - name: Deploy to Azure Web App
id: deploy-to-webapp id: deploy-to-webapp
uses: azure/webapps-deploy@05ac4e98bfa0f856e6669624239291c73ca27698 uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
with: with:
app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %} app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %}
publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %} publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %}

View File

@@ -126,7 +126,7 @@ jobs:
- name: Deploy to Azure Web App - name: Deploy to Azure Web App
id: deploy-to-webapp id: deploy-to-webapp
uses: azure/webapps-deploy@05ac4e98bfa0f856e6669624239291c73ca27698 uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
with: with:
app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %} app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %}
publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %} publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %}

View File

@@ -121,7 +121,7 @@ jobs:
- name: 'Deploy to Azure WebApp' - name: 'Deploy to Azure WebApp'
id: deploy-to-webapp id: deploy-to-webapp
uses: azure/webapps-deploy@05ac4e98bfa0f856e6669624239291c73ca27698 uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
with: with:
app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %} app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %}
publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %} publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %}

View File

@@ -141,7 +141,7 @@ jobs:
- name: 'Deploy to Azure Web App' - name: 'Deploy to Azure Web App'
id: deploy-to-webapp id: deploy-to-webapp
uses: azure/webapps-deploy@05ac4e98bfa0f856e6669624239291c73ca27698 uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
with: with:
app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %} app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %}
publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %} publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %}

View File

@@ -134,7 +134,7 @@ jobs:
- name: 'Deploy to Azure Web App' - name: 'Deploy to Azure Web App'
id: deploy-to-webapp id: deploy-to-webapp
uses: azure/webapps-deploy@05ac4e98bfa0f856e6669624239291c73ca27698 uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
with: with:
app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %} app-name: {% raw %}${{ env.AZURE_WEBAPP_NAME }}{% endraw %}
publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %} publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %}

View File

@@ -38,6 +38,12 @@ You can set up automation to scale the number of self-hosted runners. For more i
{% endif %} {% endif %}
{% ifversion actions-single-use-tokens %}
You can register ephemeral runners that perform a single job before the registration is cleaned up by using just-in-time runner registration. For more information, see "[AUTOTITLE](/actions/security-guides/security-hardening-for-github-actions#using-just-in-time-runners)."
{% endif %}
## Prerequisites ## Prerequisites
{% data reusables.actions.self-hosted-runners-prerequisites %} {% data reusables.actions.self-hosted-runners-prerequisites %}

View File

@@ -60,6 +60,12 @@ The {% data variables.product.prodname_actions %} service will then automaticall
{% endnote %} {% endnote %}
{% ifversion actions-single-use-tokens %}
Alternatively, you can create ephemeral, just-in-time runners using the REST API. For more information, see "[AUTOTITLE](/rest/actions#self-hosted-runners)."
{% endif %}
{% ifversion fpt or ghec or ghes > 3.4 or ghae %} {% ifversion fpt or ghec or ghes > 3.4 or ghae %}
## Controlling runner software updates on self-hosted runners ## Controlling runner software updates on self-hosted runners

View File

@@ -20,9 +20,13 @@ shortTitle: Remove self-hosted runners
{% note %} {% note %}
**Note:** {% data reusables.actions.self-hosted-runner-removal-impact %} **Notes:**
{% data reusables.actions.self-hosted-runner-auto-removal %} - {% data reusables.actions.self-hosted-runner-removal-impact %}
- {% data reusables.actions.self-hosted-runner-auto-removal %}
{%- ifversion actions-single-use-tokens %}
- {% data reusables.actions.jit-runner-removal %}
{%- endif %}
{% endnote %} {% endnote %}
@@ -39,9 +43,13 @@ To remove a self-hosted runner from a user repository you must be the repository
{% note %} {% note %}
**Note:** {% data reusables.actions.self-hosted-runner-removal-impact %} **Notes:**
{% data reusables.actions.self-hosted-runner-auto-removal %} - {% data reusables.actions.self-hosted-runner-removal-impact %}
- {% data reusables.actions.self-hosted-runner-auto-removal %}
{%- ifversion actions-single-use-tokens %}
- {% data reusables.actions.jit-runner-removal %}
{%- endif %}
{% endnote %} {% endnote %}
@@ -62,10 +70,13 @@ If you use {% data variables.product.prodname_ghe_cloud %}, you can also remove
{% ifversion ghec or ghes or ghae %} {% ifversion ghec or ghes or ghae %}
{% note %} {% note %}
**Note:** {% data reusables.actions.self-hosted-runner-removal-impact %} **Notes:**
{% data reusables.actions.self-hosted-runner-auto-removal %}
- {% data reusables.actions.self-hosted-runner-removal-impact %}
- {% data reusables.actions.self-hosted-runner-auto-removal %}
{%- ifversion actions-single-use-tokens %}
- {% data reusables.actions.jit-runner-removal %}
{%- endif %}
{% endnote %} {% endnote %}
To remove a self-hosted runner from an enterprise, you must be an enterprise owner. We recommend that you also have access to the self-hosted runner machine. For information about how to remove a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/actions#self-hosted-runners). To remove a self-hosted runner from an enterprise, you must be an enterprise owner. We recommend that you also have access to the self-hosted runner machine. For information about how to remove a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/actions#self-hosted-runners).

View File

@@ -19,7 +19,7 @@ versions:
## About encrypted secrets ## About encrypted secrets
Secrets are encrypted variables that you create in an organization, repository, or repository environment. The secrets that you create are available to use in {% data variables.product.prodname_actions %} workflows. {% data variables.product.prodname_dotcom %} uses a [libsodium sealed box](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes) to help ensure that secrets are encrypted before they reach {% data variables.product.prodname_dotcom %} and remain encrypted until you use them in a workflow. Secrets are variables that you create in an organization, repository, or repository environment. The secrets that you create are available to use in {% data variables.product.prodname_actions %} workflows. {% data variables.product.prodname_actions %} can only read a secret if you explicitly include the secret in a workflow.
{% data reusables.actions.secrets-org-level-overview %} {% data reusables.actions.secrets-org-level-overview %}

View File

@@ -323,6 +323,26 @@ You should also consider the environment of the self-hosted runner machines:
Some customers might attempt to partially mitigate these risks by implementing systems that automatically destroy the self-hosted runner after each job execution. However, this approach might not be as effective as intended, as there is no way to guarantee that a self-hosted runner only runs one job. Some jobs will use secrets as command-line arguments which can be seen by another job running on the same runner, such as `ps x -w`. This can lead to secret leakages. Some customers might attempt to partially mitigate these risks by implementing systems that automatically destroy the self-hosted runner after each job execution. However, this approach might not be as effective as intended, as there is no way to guarantee that a self-hosted runner only runs one job. Some jobs will use secrets as command-line arguments which can be seen by another job running on the same runner, such as `ps x -w`. This can lead to secret leakages.
{% ifversion actions-single-use-tokens %}
### Using just-in-time runners
To improve runner registration security, you can use the REST API to create ephemeral, just-in-time (JIT) runners. These self-hosted runners perform at most one job before being automatically removed from the repository, organization, or enterprise. For more information about configuring JIT runners, see "[AUTOTITLE](/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-organization)."
{% note %}
**Note:** Re-using hardware to host JIT runners can risk exposing information from the environment. Use automation to ensure the JIT runner uses a clean environment. For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#using-ephemeral-runners-for-autoscaling)."
{% endnote %}
Once you have the config file from the REST API response, you can pass it to the runner at startup.
```shell
./run.sh --jitconfig ${encoded_jit_config}
```
{% endif %}
### Planning your management strategy for self-hosted runners ### Planning your management strategy for self-hosted runners
A self-hosted runner can be added to various levels in your {% data variables.product.prodname_dotcom %} hierarchy: the enterprise, organization, or repository level. This placement determines who will be able to manage the runner: A self-hosted runner can be added to various levels in your {% data variables.product.prodname_dotcom %} hierarchy: the enterprise, organization, or repository level. This placement determines who will be able to manage the runner:

View File

@@ -133,7 +133,7 @@ The scope of the events that appear in your enterprise's audit log depend on whe
| `business.invite_admin` | An invitation for someone to be an enterprise owner{% ifversion ghes %} or site administrator{% endif %} of an enterprise was sent. | `business.invite_admin` | An invitation for someone to be an enterprise owner{% ifversion ghes %} or site administrator{% endif %} of an enterprise was sent.
| `business.invite_billing_manager` | An invitation for someone to be an billing manager of an enterprise was sent. | `business.invite_billing_manager` | An invitation for someone to be an billing manager of an enterprise was sent.
{%- endif %} {%- endif %}
| `business.members_can_update_protected_branches.clear` | An enterprise owner{% ifversion ghes %} or site administrator{% endif %} unset a policy for whether members of an enterprise can update protected branches on repositories for individual organizations. Organization administrators can choose whether to allow updating protected branches settings. | `business.members_can_update_protected_branches.clear` | An enterprise owner{% ifversion ghes %} or site administrator{% endif %} unset a policy for whether members of an enterprise can update protected branches on repositories for individual organizations. Organization owners can choose whether to allow updating protected branches settings.
| `business.members_can_update_protected_branches.disable` | The ability for enterprise members to update branch protection rules was disabled. Only enterprise owners can update protected branches. | `business.members_can_update_protected_branches.disable` | The ability for enterprise members to update branch protection rules was disabled. Only enterprise owners can update protected branches.
| `business.members_can_update_protected_branches.enable` | The ability for enterprise members to update branch protection rules was enabled. Enterprise owners and members can update protected branches. | `business.members_can_update_protected_branches.enable` | The ability for enterprise members to update branch protection rules was enabled. Enterprise owners and members can update protected branches.
| `business.remove_admin` | An enterprise owner{% ifversion ghes %} or site administrator{% endif %} was removed from an enterprise. | `business.remove_admin` | An enterprise owner{% ifversion ghes %} or site administrator{% endif %} was removed from an enterprise.
@@ -205,9 +205,10 @@ The scope of the events that appear in your enterprise's audit log depend on whe
Action | Description Action | Description
----------------------------- | ----------------------------------------------- ----------------------------- | -----------------------------------------------
| `business_secret_scanning_custom_pattern.create` | An enterprise-level custom pattern is published for {% data variables.product.prodname_secret_scanning %}. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-enterprise-account)." | `business_secret_scanning_custom_pattern.create` | An enterprise-level custom pattern was created for {% data variables.product.prodname_secret_scanning %}. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-enterprise-account)."
| `business_secret_scanning_custom_pattern.delete` | An enterprise-level custom pattern is removed from {% data variables.product.prodname_secret_scanning %}. | `business_secret_scanning_custom_pattern.delete` | An enterprise-level custom pattern was removed from {% data variables.product.prodname_secret_scanning %}.
| `business_secret_scanning_custom_pattern.update` | Changes to an enterprise-level custom pattern are saved for {% data variables.product.prodname_secret_scanning %}. | `business_secret_scanning_custom_pattern.publish` | An enterprise-level custom pattern was published for {% data variables.product.prodname_secret_scanning %}.
| `business_secret_scanning_custom_pattern.update` | Changes to an enterprise-level custom pattern were saved and a dry run was executed for {% data variables.product.prodname_secret_scanning %}.
{%- endif %} {%- endif %}
{%- ifversion secret-scanning-custom-pattern-push-protection-audit %} {%- ifversion secret-scanning-custom-pattern-push-protection-audit %}
@@ -719,7 +720,7 @@ Before you'll see `git` category actions, you must enable Git events in the audi
| `org.integration_manager_removed` | An organization owner removed access to manage all GitHub Apps owned by an organization from an organization member. | `org.integration_manager_removed` | An organization owner removed access to manage all GitHub Apps owned by an organization from an organization member.
| `org.invite_member` | A new user was invited to join an organization. {% ifversion fpt or ghec %}For more information, see "[AUTOTITLE](/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization)."{% endif %} | `org.invite_member` | A new user was invited to join an organization. {% ifversion fpt or ghec %}For more information, see "[AUTOTITLE](/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization)."{% endif %}
| `org.invite_to_business` | An organization was invited to join an enterprise. | `org.invite_to_business` | An organization was invited to join an enterprise.
| `org.members_can_update_protected_branches.clear` | An organization owner unset a policy for whether members of an organization can update protected branches on repositories in an organization. Organization administrators can choose whether to allow updating protected branches settings. | `org.members_can_update_protected_branches.clear` | An organization owner unset a policy for whether members of an organization can update protected branches on repositories in an organization. Organization owners can choose whether to allow updating protected branches settings.
| `org.members_can_update_protected_branches.disable` | The ability for enterprise members to update protected branches was disabled. Only enterprise owners can update protected branches. | `org.members_can_update_protected_branches.disable` | The ability for enterprise members to update protected branches was disabled. Only enterprise owners can update protected branches.
| `org.members_can_update_protected_branches.enable` | The ability for enterprise members to update protected branches was enabled. Members of an organization can update protected branches. | `org.members_can_update_protected_branches.enable` | The ability for enterprise members to update protected branches was enabled. Members of an organization can update protected branches.
{%- ifversion fpt or ghec %} {%- ifversion fpt or ghec %}
@@ -817,9 +818,10 @@ Before you'll see `git` category actions, you must enable Git events in the audi
| Action | Description | Action | Description
|--------|--------------- |--------|---------------
| `org_secret_scanning_custom_pattern.create` | A custom pattern is published for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-organization)." | `org_secret_scanning_custom_pattern.create` | A custom pattern was created for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-organization)."
| `org_secret_scanning_custom_pattern.delete` | A custom pattern is removed from {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)." | `org_secret_scanning_custom_pattern.delete` | A custom pattern was removed from {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)."
| `org_secret_scanning_custom_pattern.update` |Changes to a custom pattern are saved for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)." | `org_secret_scanning_custom_pattern.publish` | A custom pattern was published for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-organization)."
| `org_secret_scanning_custom_pattern.update` | Changes to a custom pattern were saved and a dry run was executed for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)."
{%- endif %} {%- endif %}
## `organization_default_label` category actions ## `organization_default_label` category actions
@@ -903,7 +905,7 @@ Before you'll see `git` category actions, you must enable Git events in the audi
|--------|------------- |--------|-------------
| `pre_receive_hook.create` | A pre-receive hook was created. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance#creating-pre-receive-hooks)." | `pre_receive_hook.create` | A pre-receive hook was created. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance#creating-pre-receive-hooks)."
| `pre_receive_hook.destroy` | A pre-receive hook was deleted. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance#deleting-pre-receive-hooks)." | `pre_receive_hook.destroy` | A pre-receive hook was deleted. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance#deleting-pre-receive-hooks)."
| `pre_receive_hook.enforcement` | A pre-receive hook enforcement setting allowing repository and organization administrators to override the hook configuration was enabled or disabled. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance)." | `pre_receive_hook.enforcement` | A pre-receive hook enforcement setting allowing repository administrators and organization owners to override the hook configuration was enabled or disabled. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance)."
| `pre_receive_hook.rejected_push` | A pre-receive hook rejected a push. | `pre_receive_hook.rejected_push` | A pre-receive hook rejected a push.
| `pre_receive_hook.update` | A pre-receive hook was created. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance#editing-pre-receive-hooks)." | `pre_receive_hook.update` | A pre-receive hook was created. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance#editing-pre-receive-hooks)."
| `pre_receive_hook.warned_push` | A pre-receive hook warned about a push. | `pre_receive_hook.warned_push` | A pre-receive hook warned about a push.
@@ -1160,7 +1162,7 @@ Before you'll see `git` category actions, you must enable Git events in the audi
| Action | Description | Action | Description
|--------|------------- |--------|-------------
| `repository_projects_change.clear` | The repository projects policy was removed for an organization, or all organizations in the enterprise. Organization admins can now control their repository projects settings. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-projects-in-your-enterprise)." | `repository_projects_change.clear` | The repository projects policy was removed for an organization, or all organizations in the enterprise. Organization owners can now control their repository projects settings. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-projects-in-your-enterprise)."
| `repository_projects_change.disable` | Repository projects were disabled for a repository, all repositories in an organization, or all organizations in an enterprise. | `repository_projects_change.disable` | Repository projects were disabled for a repository, all repositories in an organization, or all organizations in an enterprise.
| `repository_projects_change.enable` | Repository projects were enabled for a repository, all repositories in an organization, or all organizations in an enterprise. | `repository_projects_change.enable` | Repository projects were enabled for a repository, all repositories in an organization, or all organizations in an enterprise.
@@ -1179,9 +1181,10 @@ Before you'll see `git` category actions, you must enable Git events in the audi
| Action | Description | Action | Description
|------------------|------------------- |------------------|-------------------
| `repository_secret_scanning_custom_pattern.create` | A custom pattern is published for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-a-repository)." | `repository_secret_scanning_custom_pattern.create` | A custom pattern was created for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-a-repository)."
| `repository_secret_scanning_custom_pattern.delete` | A custom pattern is removed from {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)." | `repository_secret_scanning_custom_pattern.delete` | A custom pattern was removed from {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)."
| `repository_secret_scanning_custom_pattern.update` | Changes to a custom pattern are saved for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)."{%- endif %} | `repository_secret_scanning_custom_pattern.publish` | A custom pattern was published for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-a-repository)."
| `repository_secret_scanning_custom_pattern.update` | Changes to a custom pattern were saved and a dry run was executed for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)."{%- endif %}
{%- ifversion secret-scanning-custom-pattern-push-protection-audit %} {%- ifversion secret-scanning-custom-pattern-push-protection-audit %}
@@ -1198,8 +1201,8 @@ Before you'll see `git` category actions, you must enable Git events in the audi
| Action | Description | Action | Description
|------------------|------------------- |------------------|-------------------
| `repository_secret_scanning_push_protection.disable` | A repository owner or administrator disabled {% data variables.product.prodname_secret_scanning %} for a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." | `repository_secret_scanning_push_protection.disable` | A repository owner or administrator disabled {% data variables.product.prodname_secret_scanning %} for a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
| `repository_secret_scanning_push_protection.enable` | A repository owner or administrator enabled {% data variables.product.prodname_secret_scanning %} for a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." | `repository_secret_scanning_push_protection.enable` | A repository owner or administrator enabled {% data variables.product.prodname_secret_scanning %} for a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
{%- endif %} {%- endif %}
## `repository_visibility_change` category actions ## `repository_visibility_change` category actions

View File

@@ -24,7 +24,7 @@ If you set up a subscription for {% data variables.product.prodname_copilot_for_
{% data variables.product.prodname_copilot_for_business %} subscriptions are billed monthly, based on the number of {% data variables.product.prodname_copilot %} seats assigned to users within your enterprise. For more information, see "[AUTOTITLE](/enterprise-cloud@latest/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#github-copilot-pricing-for-github-enterprise-cloud)." {% data variables.product.prodname_copilot_for_business %} subscriptions are billed monthly, based on the number of {% data variables.product.prodname_copilot %} seats assigned to users within your enterprise. For more information, see "[AUTOTITLE](/enterprise-cloud@latest/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#github-copilot-pricing-for-github-enterprise-cloud)."
{% data variables.product.prodname_copilot %} includes a filter which detects code suggestions that match public code on {% data variables.product.prodname_dotcom %}. {% data variables.product.prodname_copilot_for_business %} lets you choose whether to enable or disable the filter at the enterprise-level, or allow organization admins to decide at the organization-level. When the filter is enabled, {% data variables.product.prodname_copilot %} checks code suggestions with their surrounding code of about 150 characters against public code on {% data variables.product.prodname_dotcom %}. If there is a match or near match, the suggestion will not be shown. {% data variables.product.prodname_copilot %} includes a filter which detects code suggestions that match public code on {% data variables.product.prodname_dotcom %}. {% data variables.product.prodname_copilot_for_business %} lets you choose whether to enable or disable the filter at the enterprise-level, or allow organization owners to decide at the organization-level. When the filter is enabled, {% data variables.product.prodname_copilot %} checks code suggestions with their surrounding code of about 150 characters against public code on {% data variables.product.prodname_dotcom %}. If there is a match or near match, the suggestion will not be shown.
## Enforcing a policy to manage the use of {% data variables.product.prodname_copilot_for_business %} in your enterprise ## Enforcing a policy to manage the use of {% data variables.product.prodname_copilot_for_business %} in your enterprise

View File

@@ -45,7 +45,7 @@ shortTitle: Manage pre-receive hooks
## Configure pre-receive hooks for an organization ## Configure pre-receive hooks for an organization
An organization administrator can only configure hook permissions for an organization if the site administrator selected the **Administrators can enable or disable this hook** option when they created the pre-receive hook. To configure pre-receive hooks for a repository, you must be an organization administrator or owner. An organization owner can only configure hook permissions for an organization if the site administrator selected the **Administrators can enable or disable this hook** option when they created the pre-receive hook. To configure pre-receive hooks for a repository, you must be an organization owner.
{% data reusables.profile.access_org %} {% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %} {% data reusables.profile.org_settings %}

View File

@@ -15,7 +15,7 @@ topics:
- Security - Security
shortTitle: Require 2FA shortTitle: Require 2FA
--- ---
When using LDAP or built-in authentication, two-factor authentication is supported on {% data variables.location.product_location %}. Organization administrators can require members to have two-factor authentication enabled. When using LDAP or built-in authentication, two-factor authentication is supported on {% data variables.location.product_location %}. Organization owners can require members to have two-factor authentication enabled.
{% data reusables.enterprise_user_management.external_auth_disables_2fa %} {% data reusables.enterprise_user_management.external_auth_disables_2fa %}

View File

@@ -23,8 +23,8 @@ Members can also be added or removed from an organization at the organization le
{% note %} {% note %}
**Note:** **Note:**
- Users will be added as organization members. If the user is already an organization member or organization admin, the privileges will not be modified. - Users will be added as organization members. If the user is already an organization member or organization owner, the privileges will not be modified.
- Organization admins cannot be removed from the organization via the bulk method. - Organization owners cannot be removed from the organization via the bulk method.
{% endnote %} {% endnote %}

View File

@@ -0,0 +1,77 @@
---
title: About creating GitHub Apps
shortTitle: About creating 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
- /apps/creating-github-apps/setting-up-a-github-app/about-creating-github-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 %}
Like OAuth Apps, {% data variables.product.prodname_github_app %}s use OAuth 2.0 and can act on behalf of a user. Unlike OAuth Apps, {% data variables.product.prodname_github_app %}s can also act independently of a 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.
{% data reusables.apps.app_manager_role %}
## Building a {% data variables.product.prodname_github_app %}
In order to build a {% data variables.product.prodname_github_app %}, you first need to register a {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/registering-a-github-app)."
Then, you need to write code to add functionality to your {% data variables.product.prodname_github_app %}. You can use the credentials from your {% data variables.product.prodname_github_app %} registration to make authenticated requests to {% data variables.product.company_short %}'s APIs. For more information about writing code for your {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/writing-code-for-a-github-app/about-writing-code-for-a-github-app)." For more information about making authenticated requests, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app)."
Once you have written the code for your {% data variables.product.prodname_github_app %}, your app needs to run somewhere. If your app is a website or web app, you might host your app on a server like [Azure App Service](https://azure.microsoft.com/products/app-service/). If your app is a client-side app, it might run on a user's device.
In order to use your {% data variables.product.prodname_github_app %}, you must install the app on your organization or personal account. If your {% data variables.product.prodname_github_app %} is private, your can only install the {% data variables.product.prodname_github_app %} on the account that owns the app. If your {% data variables.product.prodname_github_app %} is public, other users and organizations can install your app. For more information, see "[AUTOTITLE](/apps/using-github-apps/installing-your-own-github-app)" and "[AUTOTITLE](/apps/sharing-github-apps/sharing-your-github-app)."
## 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.
### {% data variables.product.prodname_github_app %}s that respond to webhooks
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)."
### {% data variables.product.prodname_github_app %}s that can take certain actions
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. For more information, see "[AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/choosing-permissions-for-a-github-app)."

View File

@@ -1,7 +1,7 @@
--- ---
title: Best practices for creating a GitHub App title: Best practices for creating a GitHub App
shortTitle: Best practices shortTitle: Best practices
intro: "Follow these best practices to improve the security and performance of your {% data variables.product.prodname_github_app %}." intro: 'Follow these best practices to improve the security and performance of your {% data variables.product.prodname_github_app %}.'
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -9,13 +9,15 @@ versions:
ghec: '*' ghec: '*'
topics: topics:
- GitHub Apps - GitHub Apps
redirect_from:
- /apps/creating-github-apps/setting-up-a-github-app/best-practices-for-creating-a-github-app
--- ---
## Select the minimum permissions required ## Select the minimum permissions required
Select the minimum permissions that your {% data variables.product.prodname_github_app %} needs. If any keys or tokens for your app become compromised, this will limit the amount of damage that can occur. For more information about how to choose permissions, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-a-github-app)." When you register a {% data variables.product.prodname_github_app %}, select the minimum permissions that your {% data variables.product.prodname_github_app %} needs. If any keys or tokens for your app become compromised, this will limit the amount of damage that can occur. For more information about how to choose permissions, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-a-github-app)."
When your app creates an installation access token or user access token, you can further limit the repositories that the app can access and the permissions that the token has. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app)" and "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)." When your {% data variables.product.prodname_github_app %} creates an installation access token or user access token, you can further limit the repositories that the app can access and the permissions that the token has. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app)" and "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)."
## Stay under the rate limit ## Stay under the rate limit
@@ -29,7 +31,7 @@ If you do hit a rate limit and need to retry an API request, use the `x-ratelimi
## Secure your app's credentials ## Secure your app's credentials
You can generate a private key and client secret for your app. With these credentials, your app can generate installation access tokens, user access tokens, and refresh tokens. These tokens can be used to make API requests on behalf of an app installation or user. You can generate a private key and client secret for your {% data variables.product.prodname_github_app %}. With these credentials, your app can generate installation access tokens, user access tokens, and refresh tokens. These tokens can be used to make API requests on behalf of an app installation or user.
You must store these credentials securely. The storage mechanism depends on your integrations architecture and the platform that it runs on. In general, you should use a storage mechanism that is intended to store sensitive data on the platform that you are using. You must store these credentials securely. The storage mechanism depends on your integrations architecture and the platform that it runs on. In general, you should use a storage mechanism that is intended to store sensitive data on the platform that you are using.

View File

@@ -1,55 +1,17 @@
--- ---
title: About creating GitHub Apps title: Deciding when to build a GitHub App
shortTitle: About creating apps shortTitle: GitHub App versus other options
intro: "{% data variables.product.prodname_github_app %}s let you build integrations to automate processes and extend {% data variables.product.company_short %}'s functionality." intro: '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 %}.'
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
ghae: '*' ghae: '*'
ghec: '*' 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: topics:
- GitHub Apps - GitHub Apps
--- ---
## About {% data variables.product.prodname_github_apps %} ## Using a {% data variables.product.prodname_github_app %} instead of an {% data variables.product.prodname_oauth_app %}
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.
{% data reusables.apps.maximum-github-apps-allowed %}
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 %}
In general, {% data variables.product.prodname_github_app %}s are preferred over {% data variables.product.prodname_oauth_app %}s. In general, {% data variables.product.prodname_github_app %}s are preferred over {% data variables.product.prodname_oauth_app %}s.
@@ -61,7 +23,7 @@ For more information, see "[AUTOTITLE](/apps/oauth-apps/building-oauth-apps/diff
For information on how to migrate an existing {% 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)." For information on how to migrate an existing {% 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)."
#### {% data variables.product.prodname_github_app %}s offer enhanced security ### {% data variables.product.prodname_github_app %}s offer enhanced security
{% data variables.product.prodname_github_app %}s provide more control over what the app can do. Instead of the broad scopes that {% data variables.product.prodname_oauth_app %}s use, {% data variables.product.prodname_github_app %}s use fine-grained permissions. For example, if your app needs to read the contents of a repository, an {% data variables.product.prodname_oauth_app %} would require the `repo` scope, which would also let the app edit the repository contents and settings. A {% data variables.product.prodname_github_app %} can request read-only access to repository contents, which will not let the app take more privileged actions like editing the repository contents or settings. {% data variables.product.prodname_github_app %}s provide more control over what the app can do. Instead of the broad scopes that {% data variables.product.prodname_oauth_app %}s use, {% data variables.product.prodname_github_app %}s use fine-grained permissions. For example, if your app needs to read the contents of a repository, an {% data variables.product.prodname_oauth_app %} would require the `repo` scope, which would also let the app edit the repository contents and settings. A {% data variables.product.prodname_github_app %} can request read-only access to repository contents, which will not let the app take more privileged actions like editing the repository contents or settings.
@@ -71,7 +33,7 @@ For information on how to migrate an existing {% data variables.product.prodname
These security features help harden your {% data variables.product.prodname_github_app %}'s security by limiting the damage that could be done if your app's credentials were leaked. Additionally, this lets organizations with stricter security policies use your app. These security features help harden your {% data variables.product.prodname_github_app %}'s security by limiting the damage that could be done if your app's credentials were leaked. Additionally, this lets organizations with stricter security policies use your app.
#### {% data variables.product.prodname_github_app %}s can act independently of or on behalf of a user ### {% data variables.product.prodname_github_app %}s can act independently of or on behalf of a user
{% data variables.product.prodname_github_app %}s can act independently of a user. This is beneficial for automations that do not require user input. {% data variables.product.prodname_github_app %}s can act independently of a user. This is beneficial for automations that do not require user input.
@@ -79,15 +41,15 @@ Similar to {% data variables.product.prodname_oauth_app %}s, {% data variables.p
{% data variables.product.prodname_github_app %}s are not tied to a user account and do not consume a seat on {% data variables.product.product_name %}. {% data variables.product.prodname_github_app %}s remain installed even when the person who initially installed the app leaves the organization. This lets your integrations continue to work even if people leave your team. {% data variables.product.prodname_github_app %}s are not tied to a user account and do not consume a seat on {% data variables.product.product_name %}. {% data variables.product.prodname_github_app %}s remain installed even when the person who initially installed the app leaves the organization. This lets your integrations continue to work even if people leave your team.
#### {% data variables.product.prodname_github_app %}s have scalable rate limits ### {% data variables.product.prodname_github_app %}s have scalable rate limits
The rate limit for {% data variables.product.prodname_github_app %}s using an installation access token scales with the number of repositories and number of organization users. Conversely, {% data variables.product.prodname_oauth_apps %} have lower rate limits and do not scale. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/rate-limits-for-github-apps)." The rate limit for {% data variables.product.prodname_github_app %}s using an installation access token scales with the number of repositories and number of organization users. Conversely, {% data variables.product.prodname_oauth_apps %} have lower rate limits and do not scale. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/rate-limits-for-github-apps)."
#### {% data variables.product.prodname_github_app %}s have built in webhooks ### {% data variables.product.prodname_github_app %}s have built in webhooks
{% data variables.product.prodname_github_app %}s have built-in, centralized webhooks. {% data variables.product.prodname_github_app %}s can receive webhook events for all repositories and organizations the app can access. Conversely, {% data variables.product.prodname_oauth_app %}s must configure webhooks individually for each repository and organization. {% data variables.product.prodname_github_app %}s have built-in, centralized webhooks. {% data variables.product.prodname_github_app %}s can receive webhook events for all repositories and organizations the app can access. Conversely, {% data variables.product.prodname_oauth_app %}s must configure webhooks individually for each repository and organization.
#### API access differs slightly ### API access differs slightly
In general, {% data variables.product.prodname_github_app %}s and {% data variables.product.prodname_oauth_app %}s can make the same API requests. However, there are some differences: In general, {% data variables.product.prodname_github_app %}s and {% data variables.product.prodname_oauth_app %}s can make the same API requests. However, there are some differences:
@@ -97,7 +59,7 @@ In general, {% data variables.product.prodname_github_app %}s and {% data variab
For more information about the REST API endpoints that are available to {% data variables.product.prodname_github_app %}s, see "[AUTOTITLE](/rest/overview/endpoints-available-for-github-apps)." For more information about the REST API endpoints that are available to {% data variables.product.prodname_github_app %}s, see "[AUTOTITLE](/rest/overview/endpoints-available-for-github-apps)."
### Choosing between a {% data variables.product.prodname_github_app %} or a {% data variables.product.pat_generic %} ## 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 %}. 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 %}.
@@ -105,7 +67,7 @@ For more information about the REST API endpoints that are available to {% data
{% 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)." {% 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 %} ## 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_github_apps %} and {% data variables.product.prodname_actions %} both provide ways to build automation and workflow tools.
@@ -118,29 +80,3 @@ For more information about comparing {% data variables.product.prodname_actions
You can use a {% data variables.product.prodname_github_app %} to authenticate in a {% data variables.product.prodname_actions %} 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 more information, see "[AUTOTITLE](/apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow)." workflow if the built in `GITHUB_TOKEN` does not have sufficient permissions. For more information, see "[AUTOTITLE](/apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow)."
## 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)

View File

@@ -0,0 +1,18 @@
---
title: About creating GitHub Apps
shortTitle: About creating GitHub Apps
intro: todo
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- GitHub Apps
children:
- /about-creating-github-apps
- /deciding-when-to-build-a-github-app
- /best-practices-for-creating-a-github-app
- /migrating-oauth-apps-to-github-apps
---

View File

@@ -6,6 +6,7 @@ redirect_from:
- /developers/apps/migrating-oauth-apps-to-github-apps - /developers/apps/migrating-oauth-apps-to-github-apps
- /developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps - /developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps
- /apps/creating-github-apps/guides/migrating-oauth-apps-to-github-apps - /apps/creating-github-apps/guides/migrating-oauth-apps-to-github-apps
- /apps/creating-github-apps/setting-up-a-github-app/migrating-oauth-apps-to-github-apps
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -57,7 +58,7 @@ Once you have registered a {% data variables.product.prodname_github_app %}, ada
You will need to update your app's code to handle API authentication for your {% data variables.product.prodname_github_app %}. A {% data variables.product.prodname_github_app %} can authenticate in three ways: You will need to update your app's code to handle API authentication for your {% data variables.product.prodname_github_app %}. A {% data variables.product.prodname_github_app %} can authenticate in three ways:
- As the app itself, in order to get or modify details about the app or to create an installation access token. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app)." - As the app itself, in order to get or modify details about the {% data variables.product.prodname_github_app %} registration or to create an installation access token. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app)."
- As an app installation, in order to take actions on behalf of itself. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation)." - As an app installation, in order to take actions on behalf of itself. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation)."
- On behalf of a user, in order to attribute actions to a user. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)." - On behalf of a user, in order to attribute actions to a user. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)."

View File

@@ -1,6 +1,6 @@
--- ---
title: 'Authenticating with a {% data variables.product.prodname_github_app %}' title: 'Authenticating with a {% data variables.product.prodname_github_app %}'
shortTitle: Authentication shortTitle: 'Authenticate with a {% data variables.product.prodname_github_app %}'
intro: 'Learn how to authenticate with {% data variables.product.prodname_github_apps %}.' intro: 'Learn how to authenticate with {% data variables.product.prodname_github_apps %}.'
versions: versions:
fpt: '*' fpt: '*'
@@ -19,5 +19,6 @@ children:
- /generating-an-installation-access-token-for-a-github-app - /generating-an-installation-access-token-for-a-github-app
- /generating-a-user-access-token-for-a-github-app - /generating-a-user-access-token-for-a-github-app
- /refreshing-user-access-tokens - /refreshing-user-access-tokens
- /making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
--- ---

View File

@@ -1,7 +1,7 @@
--- ---
title: Making authenticated API requests with a GitHub App in a GitHub Actions workflow title: Making authenticated API requests with a GitHub App in a GitHub Actions workflow
shortTitle: Use with Actions shortTitle: Authenticate in Actions workflow
intro: "You can use an installation access token from a {% data variables.product.prodname_github_app %} to make authenticated API requests in a {% data variables.product.prodname_actions %} workflow. You can also pass the token to a custom action to enable the action to make authenticated API requests." intro: 'You can use an installation access token from a {% data variables.product.prodname_github_app %} to make authenticated API requests in a {% data variables.product.prodname_actions %} workflow. You can also pass the token to a custom action to enable the action to make authenticated API requests.'
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -10,6 +10,9 @@ versions:
topics: topics:
- GitHub Apps - GitHub Apps
- Actions - Actions
redirect_from:
- /apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
- /apps/creating-github-apps/writing-code-for-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
--- ---
## About {% data variables.product.prodname_actions %} authentication ## About {% data variables.product.prodname_actions %} authentication
@@ -18,9 +21,9 @@ If you need to make authenticated API requests in a {% data variables.product.pr
## Authenticating with a {% data variables.product.prodname_github_app %} ## Authenticating with a {% data variables.product.prodname_github_app %}
In order to use a {% data variables.product.prodname_github_app %} to make authenticated API requests, you must create a {% data variables.product.prodname_github_app %}, store your app's credentials, and install your app. Once this is done, you can use your app to create an installation access token, which can be used to make authenticated API requests in a {% data variables.product.prodname_actions %} workflow. You can also pass the installation access token to a custom action that requires a token. In order to use a {% data variables.product.prodname_github_app %} to make authenticated API requests, you must register a {% data variables.product.prodname_github_app %}, store your app's credentials, and install your app. Once this is done, you can use your app to create an installation access token, which can be used to make authenticated API requests in a {% data variables.product.prodname_actions %} workflow. You can also pass the installation access token to a custom action that requires a token.
1. Create a {% data variables.product.prodname_github_app %}. Give your {% data variables.product.prodname_github_app %} the necessary permissions to access the desired resources. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)" and "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-a-github-app)." 1. Register a {% data variables.product.prodname_github_app %}. Give your {% data variables.product.prodname_github_app %} registration the necessary permissions to access the desired resources. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)" and "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-a-github-app)."
1. Store the app ID of your {% data variables.product.prodname_github_app %} as a {% data variables.product.prodname_actions %} secret. You can find the app ID on the settings page for your app. The app ID is different from the client ID. For more information about storing secrets, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets)." 1. Store the app ID of your {% data variables.product.prodname_github_app %} as a {% data variables.product.prodname_actions %} secret. You can find the app ID on the settings page for your app. The app ID is different from the client ID. For more information about storing secrets, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets)."
1. Generate a private key for your app. Store the contents of the resulting file as a secret. (Store the entire contents of the file, including `-----BEGIN RSA PRIVATE KEY-----` and `-----END RSA PRIVATE KEY-----`.) For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps)." 1. Generate a private key for your app. Store the contents of the resulting file as a secret. (Store the entire contents of the file, including `-----BEGIN RSA PRIVATE KEY-----` and `-----END RSA PRIVATE KEY-----`.) For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps)."
1. Install the {% data variables.product.prodname_github_app %} on your user account or organization and grant it access to any repositories that you want your workflow to access. For more information, see "[AUTOTITLE](/apps/maintaining-github-apps/installing-github-apps#installing-your-private-github-app-on-your-repository)." 1. Install the {% data variables.product.prodname_github_app %} on your user account or organization and grant it access to any repositories that you want your workflow to access. For more information, see "[AUTOTITLE](/apps/maintaining-github-apps/installing-github-apps#installing-your-private-github-app-on-your-repository)."

View File

@@ -1,5 +1,5 @@
--- ---
title: 'Creating GitHub Apps' title: Creating GitHub Apps
intro: You can build GitHub Apps for yourself or others to use. intro: You can build GitHub Apps for yourself or others to use.
versions: versions:
fpt: '*' fpt: '*'
@@ -9,10 +9,12 @@ versions:
topics: topics:
- GitHub Apps - GitHub Apps
children: children:
- /setting-up-a-github-app - /about-creating-github-apps
- /registering-a-github-app
- /authenticating-with-a-github-app - /authenticating-with-a-github-app
- /guides - /writing-code-for-a-github-app
redirect_from: redirect_from:
- /apps/building-integrations/setting-up-and-registering-github-apps - /apps/building-integrations/setting-up-and-registering-github-apps
- /developers/apps/building-github-apps - /developers/apps/building-github-apps
--- ---

View File

@@ -9,9 +9,11 @@ versions:
topics: topics:
- GitHub Apps - GitHub Apps
shortTitle: Setup URL shortTitle: Setup URL
redirect_from:
- /apps/creating-github-apps/setting-up-a-github-app/about-the-setup-url
--- ---
When you create a {% data variables.product.prodname_github_app %}, you can specify a setup URL. When users install your {% data variables.product.prodname_github_app %}, they are redirected to the setup URL. If additional setup is required after installation, you can use this URL to tell users what steps to take next. When you register a {% data variables.product.prodname_github_app %}, you can specify a setup URL. When users install your {% data variables.product.prodname_github_app %}, they are redirected to the setup URL. If additional setup is required after installation, you can use this URL to tell users what steps to take next.
If you specify a setup URL, you can also select **Redirect on update** to specify that users should be redirected to the setup URL after they update an installation. An update includes adding or removing access to a repository for an installation. If you specify a setup URL, you can also select **Redirect on update** to specify that users should be redirected to the setup URL after they update an installation. An update includes adding or removing access to a repository for an installation.
@@ -22,9 +24,9 @@ If you specify a setup URL, you can also select **Redirect on update** to specif
{% endwarning %} {% endwarning %}
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}
Although the setup URL is optional in the {% data variables.product.prodname_github_app %} settings, it is required if you want to allow users to purchase your app in {% data variables.product.prodname_marketplace %}. For more information, see "[AUTOTITLE](/apps/publishing-apps-to-github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials)." Although the setup URL is optional during {% data variables.product.prodname_github_app %} registration, it is required if you want to allow users to purchase your app in {% data variables.product.prodname_marketplace %}. For more information, see "[AUTOTITLE](/apps/publishing-apps-to-github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials)."
{% endif %} {% endif %}
The setup URL is different from the callback URL. Users are redirected to the setup URL after they install a {% data variables.product.prodname_github_app %}. Users are redirected to the callback URL when they authorize a {% data variables.product.company_short %} via the web application flow. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-the-user-authorization-callback-url)." The setup URL is different from the callback URL. Users are redirected to the setup URL after they install a {% data variables.product.prodname_github_app %}. Users are redirected to the callback URL when they authorize a {% data variables.product.company_short %} via the web application flow. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-the-user-authorization-callback-url)."
For more information about creating or modifying a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)" and "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)." For more information about registering a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." For more information about modifying a {% data variables.product.prodname_github_app %} registration, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."

View File

@@ -0,0 +1,24 @@
---
title: About the user authorization callback URL
intro: 'You can specify a URL that users will be redirected to after they authorize a {% data variables.product.prodname_github_app %}.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- GitHub Apps
shortTitle: Callback URL
redirect_from:
- /apps/creating-github-apps/creating-github-apps/about-the-user-authorization-callback-url
- /apps/creating-github-apps/setting-up-a-github-app/about-the-user-authorization-callback-url
---
When you register a {% data variables.product.prodname_github_app %}, you can specify a callback URL. When you use the web application flow to generate a user access token in order to act on behalf of a user, users will be redirected to the callback URL after they authorize the {% data variables.product.prodname_github_app %}.
You can specify up to 10 callback URLs. If you specify multiple callback URLs, you can use the `redirect_uri` parameter when you prompt the user to authorize your {% data variables.product.prodname_github_app %}, to indicate which callback URL the user should be redirected to. If you do not specify `redirect_uri`, the first callback URL will be used. For more information about using the `redirect_uri` parameter, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)".
The callback URL is different from the setup URL. Users are redirected to the setup URL after they install a {% data variables.product.prodname_github_app %}. Users are redirected to the callback URL when they authorize a {% data variables.product.prodname_github_app %} via the web application flow. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-the-setup-url)."
For more information about generating user access tokens, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)". For more information about registering a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." For more information about modifying a {% data variables.product.prodname_github_app %} registration, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."

View File

@@ -1,7 +1,7 @@
--- ---
title: Choosing permissions for a GitHub App title: Choosing permissions for a GitHub App
shortTitle: Permissions shortTitle: Permissions
intro: "The permissions of a GitHub App determine what the app can do with {% data variables.product.company_short %}'s APIs and what webhooks the app can receive." intro: 'The permissions of a GitHub App determine what the app can do with {% data variables.product.company_short %}''s APIs and what webhooks the app can receive.'
redirect_from: redirect_from:
- /apps/building-integrations/setting-up-and-registering-github-apps/about-permissions-for-github-apps - /apps/building-integrations/setting-up-and-registering-github-apps/about-permissions-for-github-apps
- /apps/building-github-apps/permissions-for-github-apps - /apps/building-github-apps/permissions-for-github-apps
@@ -10,6 +10,7 @@ redirect_from:
- /developers/apps/building-github-apps/setting-permissions-for-github-apps - /developers/apps/building-github-apps/setting-permissions-for-github-apps
- /apps/creating-github-apps/creating-github-apps/setting-permissions-for-github-apps - /apps/creating-github-apps/creating-github-apps/setting-permissions-for-github-apps
- /apps/creating-github-apps/creating-github-apps/choosing-permissions-for-a-github-app - /apps/creating-github-apps/creating-github-apps/choosing-permissions-for-a-github-app
- /apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-a-github-app
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -21,7 +22,7 @@ topics:
## About {% data variables.product.prodname_github_app %} permissions ## About {% data variables.product.prodname_github_app %} permissions
{% data variables.product.prodname_github_app %}s don't have any permissions by default. When you create an app, you can select permissions for the app. The permissions that you select determine what the app can do with {% data variables.product.company_short %}'s APIs and what webhooks the app can subscribe to. You should select the minimum permissions required for the app. {% data variables.product.prodname_github_app %}s don't have any permissions by default. When you register a {% data variables.product.prodname_github_app %}, you can select permissions for the app. The permissions that you select determine what the app can do with {% data variables.product.company_short %}'s APIs and what webhooks the app can subscribe to. You should select the minimum permissions required for the app.
Although {% data variables.product.prodname_github_app %}s don't have any permissions by default, they do have implicit permissions to read public resources when acting on behalf of a user. When a user authorizes the app to act on their behalf, the {% data variables.product.prodname_github_app %} can use the resulting user access token to make requests to the REST API{% ifversion graphQL-for-fgpats-and-apps %} and the GraphQL API{% endif %} to read public resources. To learn more about acting on behalf of a user, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)." Although {% data variables.product.prodname_github_app %}s don't have any permissions by default, they do have implicit permissions to read public resources when acting on behalf of a user. When a user authorizes the app to act on their behalf, the {% data variables.product.prodname_github_app %} can use the resulting user access token to make requests to the REST API{% ifversion graphQL-for-fgpats-and-apps %} and the GraphQL API{% endif %} to read public resources. To learn more about acting on behalf of a user, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)."
@@ -35,7 +36,7 @@ You can modify the permissions for your app at any time. When you modify the per
Some webhooks and API access requires "Administration" permissions. If your app requires "Administration" permissions, consider explaining this requirement on your app's homepage. This will help users understand why your app needs a high level permission. Some webhooks and API access requires "Administration" permissions. If your app requires "Administration" permissions, consider explaining this requirement on your app's homepage. This will help users understand why your app needs a high level permission.
For more information about specifying permissions during app creation, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." For more information about modifying permissions, see "[AUTOTITLE](/apps/maintaining-github-apps/editing-a-github-apps-permissions)." For more information about specifying permissions during {% data variables.product.prodname_github_app %} registration, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." For more information about modifying permissions, see "[AUTOTITLE](/apps/maintaining-github-apps/editing-a-github-apps-permissions)."
## Choosing permissions for webhook access ## Choosing permissions for webhook access
@@ -43,7 +44,7 @@ The webhook documentation indicates whether each webhook is available to {% data
For example, if you want your app to subscribe to `team` events, your app must have the "Members" organization permission. For example, if you want your app to subscribe to `team` events, your app must have the "Members" organization permission.
On your app settings page, the available webhook events will change as you change your app's permissions. If you did not select sufficient permissions for your app to subscribe to an event, the event will not appear as an option on your app settings page. On your {% data variables.product.prodname_github_app %} registration page, the available webhook events will change as you change your app's permissions. If you did not select sufficient permissions for your {% data variables.product.prodname_github_app %} to subscribe to an event, the event will not appear as an option on your app registration page.
## Choosing permissions for REST API access ## Choosing permissions for REST API access

View File

@@ -6,6 +6,7 @@ redirect_from:
- /developers/apps/creating-a-custom-badge-for-your-github-app - /developers/apps/creating-a-custom-badge-for-your-github-app
- /developers/apps/building-github-apps/creating-a-custom-badge-for-your-github-app - /developers/apps/building-github-apps/creating-a-custom-badge-for-your-github-app
- /apps/creating-github-apps/creating-github-apps/creating-a-custom-badge-for-your-github-app - /apps/creating-github-apps/creating-github-apps/creating-a-custom-badge-for-your-github-app
- /apps/creating-github-apps/setting-up-a-github-app/creating-a-custom-badge-for-your-github-app
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -20,7 +21,7 @@ An identicon badge looks something like this:
![An identicon, which consists of white pixels in a random pattern on a circular yellow background.](/assets/images/help/apps/identicon.png) ![An identicon, which consists of white pixels in a random pattern on a circular yellow background.](/assets/images/help/apps/identicon.png)
After you create a GitHub App, you can customize your app's badge by uploading a logo and selecting a background color. A badge is a square logo image inside of a circular badge. You can choose a background color for the badge, which can visually distinguish your app. After you register a GitHub App, you can customize your app's badge by uploading a logo and selecting a background color. A badge is a square logo image inside of a circular badge. You can choose a background color for the badge, which can visually distinguish your app.
Your logo should be a PNG, JPG, or GIF file under 1 MB in size. For the best quality rendering, we recommend an image size of at least 200px x 200px. {% ifversion fpt or ghec %}See "[AUTOTITLE](/apps/publishing-apps-to-github-marketplace/listing-an-app-on-github-marketplace/writing-a-listing-description-for-your-app#guidelines-for-logos)" for more guidance on customizing badges.{% endif %} Your logo should be a PNG, JPG, or GIF file under 1 MB in size. For the best quality rendering, we recommend an image size of at least 200px x 200px. {% ifversion fpt or ghec %}See "[AUTOTITLE](/apps/publishing-apps-to-github-marketplace/listing-an-app-on-github-marketplace/writing-a-listing-description-for-your-app#guidelines-for-logos)" for more guidance on customizing badges.{% endif %}
@@ -51,6 +52,6 @@ To create a custom badge:
## Next steps ## Next steps
For more information about creating a Marketplace listing for this app, see "[AUTOTITLE](/apps/publishing-apps-to-github-marketplace/listing-an-app-on-github-marketplace)". For more information about listing your {% data variables.product.prodname_github_app %} in {% data variables.product.prodname_marketplace %}, see "[AUTOTITLE](/apps/publishing-apps-to-github-marketplace/listing-an-app-on-github-marketplace)".
{% endif %} {% endif %}

View File

@@ -1,5 +1,5 @@
--- ---
title: 'Setting up a {% data variables.product.prodname_github_app %}' title: 'Registering a {% data variables.product.prodname_github_app %}'
intro: 'Learn about building {% data variables.product.prodname_github_apps %}.' intro: 'Learn about building {% data variables.product.prodname_github_apps %}.'
versions: versions:
fpt: '*' fpt: '*'
@@ -9,11 +9,11 @@ versions:
redirect_from: redirect_from:
- /apps/building-github-apps - /apps/building-github-apps
- /apps/creating-github-apps/creating-github-apps - /apps/creating-github-apps/creating-github-apps
- /apps/creating-github-apps/setting-up-a-github-app
topics: topics:
- GitHub Apps - GitHub Apps
children: children:
- /about-creating-github-apps - /registering-a-github-app
- /creating-a-github-app
- /about-the-user-authorization-callback-url - /about-the-user-authorization-callback-url
- /about-the-setup-url - /about-the-setup-url
- /choosing-permissions-for-a-github-app - /choosing-permissions-for-a-github-app
@@ -21,7 +21,5 @@ children:
- /making-a-github-app-public-or-private - /making-a-github-app-public-or-private
- /rate-limits-for-github-apps - /rate-limits-for-github-apps
- /creating-a-custom-badge-for-your-github-app - /creating-a-custom-badge-for-your-github-app
- /migrating-oauth-apps-to-github-apps
- /best-practices-for-creating-a-github-app
--- ---

View File

@@ -1,6 +1,6 @@
--- ---
title: Making a GitHub App public or private title: Making a GitHub App public or private
intro: 'When setting up a {% data variables.product.prodname_github_app %}, you can make it public so that other GitHub users or organizations can install the app, or private so that you can only install it on the account that owns the app.' intro: 'When registering a {% data variables.product.prodname_github_app %}, you can make it public so that other GitHub users or organizations can install the app, or private so that you can only install it on the account that owns the app.'
redirect_from: redirect_from:
- /apps/building-integrations/setting-up-and-registering-github-apps/about-installation-options-for-github-apps - /apps/building-integrations/setting-up-and-registering-github-apps/about-installation-options-for-github-apps
- /apps/building-github-apps/installation-options-for-github-apps - /apps/building-github-apps/installation-options-for-github-apps
@@ -10,6 +10,7 @@ redirect_from:
- /developers/apps/making-a-github-app-public-or-private - /developers/apps/making-a-github-app-public-or-private
- /developers/apps/managing-github-apps/making-a-github-app-public-or-private - /developers/apps/managing-github-apps/making-a-github-app-public-or-private
- /apps/creating-github-apps/creating-github-apps/making-a-github-app-public-or-private - /apps/creating-github-apps/creating-github-apps/making-a-github-app-public-or-private
- /apps/creating-github-apps/setting-up-a-github-app/making-a-github-app-public-or-private
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -22,19 +23,19 @@ shortTitle: Visibility
## About visibility for {% data variables.product.prodname_github_app %}s ## About visibility for {% data variables.product.prodname_github_app %}s
You can make your {% data variables.product.prodname_github_app %} public or private. {% ifversion fpt %}If you set your {% data variables.product.prodname_github_app %} to public, any user on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.product.prodname_ghe_cloud %} can install it. If you set your {% data variables.product.prodname_github_app %} to private, it can only be installed on the account that owns the app. You can make your {% data variables.product.prodname_github_app %} registration public or private. {% ifversion fpt %}If you set your {% data variables.product.prodname_github_app %} registration to public, any user on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.product.prodname_ghe_cloud %} can install it. If you set your {% data variables.product.prodname_github_app %} registration to private, it can only be installed on the account that owns the app.
{% elsif ghes %}If you set your {% data variables.product.prodname_github_app %} to public, anyone on your {% data variables.product.prodname_ghe_server %} instance can install it, but the app is not available outside of your instance. If you set your {% data variables.product.prodname_github_app %} to private, it can only be installed on the account that owns the app. {% elsif ghes %}If you set your {% data variables.product.prodname_github_app %} registration to public, anyone on your {% data variables.product.prodname_ghe_server %} instance can install it, but the app is not available outside of your instance. If you set your {% data variables.product.prodname_github_app %} registration to private, it can only be installed on the account that owns the app.
{% elsif ghec %}If you set your {% data variables.product.prodname_github_app %} to public, and the {% data variables.product.prodname_github_app %} is owned by an {% data variables.product.prodname_emu %} account, accounts owned by your enterprise can install it, but the app cannot be installed on accounts outside of your enterprise. If a {% data variables.product.prodname_github_app %} is owned by an account that is not an {% data variables.product.prodname_emu %}, and the app is set to public, any user on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.product.prodname_ghe_cloud %} can install the app. If you set your {% data variables.product.prodname_github_app %} to private, it can only be installed on the account that owns the app.{% endif %} {% elsif ghec %}If you set your {% data variables.product.prodname_github_app %} registration to public, and the {% data variables.product.prodname_github_app %} registration is owned by an {% data variables.product.prodname_emu %} account, accounts owned by your enterprise can install it, but the app cannot be installed on accounts outside of your enterprise. If a {% data variables.product.prodname_github_app %} registration is owned by an account that is not an {% data variables.product.prodname_emu %}, and the app is set to public, any user on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.product.prodname_ghe_cloud %} can install the app. If you set your {% data variables.product.prodname_github_app %} registration to private, it can only be installed on the account that owns the app.{% endif %}
{% ifversion fpt or ghec %}You can create a {% data variables.product.prodname_github_app %} from your individual user account and make it available for organization accounts to install. You do not need an enterprise plan or an organization account to create a {% data variables.product.prodname_github_app %} for organizations even if the organization is owned by an enterprise on {% data variables.product.prodname_ghe_cloud %}.{% endif %} {% ifversion fpt or ghec %}You can register a {% data variables.product.prodname_github_app %} under your personal account or organization and make it available for other organizations to install. You do not need an enterprise plan or an organization account to make your {% data variables.product.prodname_github_app %} available to an organization even if the organization is owned by an enterprise on {% data variables.product.prodname_ghe_cloud %}.{% endif %}
If you want to make your app available to {% ifversion ghes %}other {% endif %}{% data variables.product.prodname_ghe_server %} instances, then you need to use an app manifest. The {% data variables.product.prodname_ghe_server %} instance will create the app from the manifest and provide you with the required information. For more information, see "[AUTOTITLE](/developers/apps/building-github-apps/creating-a-github-app-from-a-manifest)." If you want to make your app available to {% ifversion ghes %}other {% endif %}{% data variables.product.prodname_ghe_server %} instances, then you need to take additional steps. For more information, see "[AUTOTITLE](/apps/sharing-github-apps/making-your-github-app-available-for-github-enterprise-server)."
If it is important for {% ifversion ghes %}other {% endif %}{% data variables.product.prodname_ghe_server %} users to be able to use your tool, consider using {% data variables.product.prodname_actions %} instead of a {% data variables.product.prodname_github_app %}. Public actions are available on {% data variables.product.prodname_ghe_server %} instances with GitHub Connect. For more information, see "[AUTOTITLE](/github-ae@latest/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)" and "[AUTOTITLE](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)." If it is important for {% ifversion ghes %}other {% endif %}{% data variables.product.prodname_ghe_server %} users to be able to use your tool, consider using {% data variables.product.prodname_actions %} instead of a {% data variables.product.prodname_github_app %}. Public actions are available on {% data variables.product.prodname_ghe_server %} instances with GitHub Connect. For more information, see "[AUTOTITLE](/github-ae@latest/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)" and "[AUTOTITLE](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."
For information about changing the visibility of a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)." For information about changing the visibility of a {% data variables.product.prodname_github_app %} registration, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."
### Public installation flow ### Public installation flow

View File

@@ -9,6 +9,7 @@ redirect_from:
- /developers/apps/rate-limits-for-github-apps - /developers/apps/rate-limits-for-github-apps
- /developers/apps/building-github-apps/rate-limits-for-github-apps - /developers/apps/building-github-apps/rate-limits-for-github-apps
- /apps/creating-github-apps/creating-github-apps/rate-limits-for-github-apps - /apps/creating-github-apps/creating-github-apps/rate-limits-for-github-apps
- /apps/creating-github-apps/setting-up-a-github-app/rate-limits-for-github-apps
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'

View File

@@ -1,7 +1,7 @@
--- ---
title: Creating a GitHub App title: Registering a GitHub App
shortTitle: Create a {% data variables.product.prodname_github_app %} shortTitle: 'Register a {% data variables.product.prodname_github_app %}'
intro: 'You can create a {% data variables.product.prodname_github_app %} under your personal account or under any organization you own.' intro: 'You can register a {% data variables.product.prodname_github_app %} under your personal account or under any organization you own.'
redirect_from: redirect_from:
- /early-access/integrations/creating-an-integration - /early-access/integrations/creating-an-integration
- /apps/building-integrations/setting-up-and-registering-github-apps/registering-github-apps - /apps/building-integrations/setting-up-and-registering-github-apps/registering-github-apps
@@ -9,6 +9,8 @@ redirect_from:
- /developers/apps/creating-a-github-app - /developers/apps/creating-a-github-app
- /developers/apps/building-github-apps/creating-a-github-app - /developers/apps/building-github-apps/creating-a-github-app
- /apps/creating-github-apps/creating-github-apps/creating-a-github-app - /apps/creating-github-apps/creating-github-apps/creating-a-github-app
- /apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app
- /apps/creating-github-apps/setting-up-a-github-app/registering-a-github-app
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -18,13 +20,13 @@ topics:
- GitHub Apps - GitHub Apps
--- ---
## About creating {% data variables.product.prodname_github_apps %} ## About registering {% data variables.product.prodname_github_apps %}
You can create a {% data variables.product.prodname_github_app %} owned by your personal account, by an organization that you own, or by an organization that has granted you permission to manage all apps owned by the organization. For more information, see "[AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/adding-github-app-managers-in-your-organization)." You can register a {% data variables.product.prodname_github_app %} under your personal account, under an organization that you own, or under an organization that has granted you permission to manage all apps owned by the organization. For more information, see "[AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/adding-github-app-managers-in-your-organization)."
{% data reusables.apps.maximum-github-apps-allowed %} {% data reusables.apps.maximum-github-apps-allowed %}
## Creating a {% data variables.product.prodname_github_app %} ## Registering a {% data variables.product.prodname_github_app %}
{% data reusables.apps.settings-step %} {% data reusables.apps.settings-step %}
{% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.developer_settings %}
@@ -61,11 +63,13 @@ You can create a {% data variables.product.prodname_github_app %} owned by your
## Next steps ## Next steps
After creating a {% data variables.product.prodname_github_app %}, you will want to write code to make your {% data variables.product.prodname_github_app %} do something. For examples of how to write code, see: After registering a {% data variables.product.prodname_github_app %}, you will want to write code to make your {% data variables.product.prodname_github_app %} do something. For examples of how to write code, see:
- "[AUTOTITLE](/apps/creating-github-apps/writing-code-for-a-github-app/quickstart)"
- "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-github-app-that-responds-to-webhook-events)" - "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-github-app-that-responds-to-webhook-events)"
- "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-login-with-github-button-with-a-github-app)" - "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-login-with-github-button-with-a-github-app)"
- "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-cli-with-a-github-app)" - "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-cli-with-a-github-app)"
- "[AUTOTITLE](/apps/creating-github-apps/writing-code-for-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow)"
You should aim to follow best practices. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/best-practices-for-creating-a-github-app)." You should aim to follow best practices. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/best-practices-for-creating-a-github-app)."

View File

@@ -11,6 +11,7 @@ topics:
- GitHub Apps - GitHub Apps
redirect_from: redirect_from:
- /apps/creating-github-apps/creating-github-apps/using-webhooks-with-github-apps - /apps/creating-github-apps/creating-github-apps/using-webhooks-with-github-apps
- /apps/creating-github-apps/setting-up-a-github-app/using-webhooks-with-github-apps
--- ---
## About webhooks and {% data variables.product.prodname_github_apps %} ## About webhooks and {% data variables.product.prodname_github_apps %}
@@ -19,15 +20,15 @@ Webhooks enable your {% data variables.product.prodname_github_app %} to receive
You can configure your {% data variables.product.prodname_github_app %} to receive webhooks for specific events on {% data variables.product.prodname_dotcom %} and automatically take action on them. For more information about the types of webhooks you can receive, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads)." You can configure your {% data variables.product.prodname_github_app %} to receive webhooks for specific events on {% data variables.product.prodname_dotcom %} and automatically take action on them. For more information about the types of webhooks you can receive, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads)."
To receive webhook events in your {% data variables.product.prodname_github_app %}, you must activate webhooks in the app settings and specify a webhook URL where {% data variables.product.prodname_dotcom %} will send the webhook payloads. For more information about creating and configuring a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." To receive webhook events in your {% data variables.product.prodname_github_app %}, you must enable webhooks for your {% data variables.product.prodname_github_app %} registration and specify a webhook URL where {% data variables.product.prodname_dotcom %} will send the webhook payloads.
If your app does not need to respond to webhooks or will only be used for authentication, you can turn off the webhook function in your app settings. You do not need to specify a webhook URL. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." If your {% data variables.product.prodname_github_app %} does not need to respond to webhooks or will only be used for authentication, you can turn off the webhook function for your {% data variables.product.prodname_github_app %} registration. You do not need to specify a webhook URL.
For information about changing the webhooks that a {% data variables.product.prodname_github_app %} subscribes to, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)." For more information about registering a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." For more information about changing the webhooks that a {% data variables.product.prodname_github_app %} registration subscribes to, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."
## Choosing a webhook URL ## Choosing a webhook URL
When you activate webhooks in the settings for your {% data variables.product.prodname_github_app %}, you will need to specify a webhook URL. The webhook URL is the address of a web server that will receive the webhook event payloads sent to your {% data variables.product.prodname_github_app %}. The server can then take action based on the content of the payload. You should choose a web server that's appropriate for the volume of webhook traffic that your {% data variables.product.prodname_github_app %} will encounter. When you activate webhooks for your {% data variables.product.prodname_github_app %} registration, you will need to specify a webhook URL. The webhook URL is the address of a web server that will receive the webhook event payloads sent to your {% data variables.product.prodname_github_app %}. The server can then take action based on the content of the payload. You should choose a web server that's appropriate for the volume of webhook traffic that your {% data variables.product.prodname_github_app %} will encounter.
### Choosing a webhook URL for development and testing ### Choosing a webhook URL for development and testing
@@ -39,7 +40,7 @@ You can use Smee to create a unique domain where {% data variables.product.prodn
1. To use Smee to create a unique domain, go to https://smee.io and click **Start a new channel**. 1. To use Smee to create a unique domain, go to https://smee.io and click **Start a new channel**.
1. On the Smee channel page, follow the instructions under "Use the CLI" to install and run the Smee client. 1. On the Smee channel page, follow the instructions under "Use the CLI" to install and run the Smee client.
1. To connect your Smee webhook URL to your {% data variables.product.prodname_github_app %}, enter your unique Smee domain in the "Webhook URL" field of your app settings. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." 1. To connect your Smee webhook URL to your {% data variables.product.prodname_github_app %}, enter your unique Smee domain in the "Webhook URL" field on your {% data variables.product.prodname_github_app %} registration page. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)" and "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."
### Choosing a webhook URL for production ### Choosing a webhook URL for production
@@ -51,7 +52,7 @@ To handle a higher volume of webhook traffic for a large app in production, cons
Once you've configured your server to receive payloads, it will listen for any payload sent to the server. For security reasons, you should limit incoming requests to only those originating from {% data variables.product.prodname_dotcom %}. You can do that by creating a webhook secret for your app. Once you've configured your server to receive payloads, it will listen for any payload sent to the server. For security reasons, you should limit incoming requests to only those originating from {% data variables.product.prodname_dotcom %}. You can do that by creating a webhook secret for your app.
To create a webhook secret for your GitHub App, type a secret token in your app settings under "Webhook secret." You should choose a random string of text with high entropy. For more information about how to create a webhook secret in your app settings, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." To create a webhook secret for your GitHub App, type a secret token under "Webhook secret" on your {% data variables.product.prodname_github_app %} registration page. You should choose a random string of text with high entropy. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)" and "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."
After creating a webhook secret for your app, you will need to configure your server to securely store and validate the webhook secret token. For more information, see "[AUTOTITLE](/webhooks-and-events/webhooks/securing-your-webhooks)." After creating a webhook secret for your app, you will need to configure your server to securely store and validate the webhook secret token. For more information, see "[AUTOTITLE](/webhooks-and-events/webhooks/securing-your-webhooks)."

View File

@@ -1,22 +0,0 @@
---
title: About the user authorization callback URL
intro: 'You can specify a URL that users will be redirected to after they authorize a {% data variables.product.prodname_github_app %}.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- GitHub Apps
shortTitle: Callback URL
redirect_from:
- /apps/creating-github-apps/creating-github-apps/about-the-user-authorization-callback-url
---
When you create a {% data variables.product.prodname_github_app %}, you can specify a callback URL. When you use the web application flow to generate a user access token in order to act on behalf of a user, users will be redirected to the callback URL after they authorize the app.
You can specify up to 10 callback URLs. If you specify multiple callback URLs, you can use the `redirect_uri` parameter when you prompt the user to authorize your app, to indicate which callback URL the user should be redirected to. If you do not specify `redirect_uri`, the first callback URL will be used. For more information about using the `redirect_uri` parameter, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)".
The callback URL is different from the setup URL. Users are redirected to the setup URL after they install an app. Users are redirected to the callback URL when they authorize an app via the web application flow. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-the-setup-url)."
For more information about generating user access tokens, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)". For more information about creating or modifying a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)" and "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."

View File

@@ -0,0 +1,58 @@
---
title: About writing code for a GitHub App
shortTitle: About writing GitHub App code
intro: 'You need to write code to add functionality to your {% data variables.product.prodname_github_app %}.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- GitHub Apps
---
## Prerequisites
Before you write code for a {% data variables.product.prodname_github_app %}, you should register a {% data variables.product.prodname_github_app %}. When you register a {% data variables.product.prodname_github_app %}, you select permissions for the app. These permissions dictate what the {% data variables.product.prodname_github_app %} can do. When you register an app, you also specify other settings, including which webhook events your {% data variables.product.prodname_github_app %} should receive. You can always change the settings for your {% data variables.product.prodname_github_app %} registration. For more information, see "[AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/registering-a-github-app)" and "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."
If you want your {% data variables.product.prodname_github_app %} to access repository and/or organization data, you need to install your {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/apps/using-github-apps/installing-your-own-github-app)."
## Writing code for a {% data variables.product.prodname_github_app %}
In order for your {% data variables.product.prodname_github_app %} to do something, you need to write code to add functionality to your {% data variables.product.prodname_github_app %}.
For tutorials about how to write code for a {% data variables.product.prodname_github_app %}, see:
- "[AUTOTITLE](/apps/creating-github-apps/writing-code-for-a-github-app/quickstart)"
- "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-github-app-that-responds-to-webhook-events)"
- "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-login-with-github-button-with-a-github-app)"
- "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-cli-with-a-github-app)"
You can use the credentials from your {% data variables.product.prodname_github_app %} registration to make authenticated requests to {% data variables.product.company_short %}'s APIs. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app)."
During development, you will likely use your personal computer or codespace to run your {% data variables.product.prodname_github_app %}. You may need to make some modifications to your {% data variables.product.prodname_github_app %} registration during development:
- If your app receives webhooks, you may want to use a webhook proxy URL to forward webhooks from GitHub to your computer or codespace. You will need to update the "Webhook URL" setting in your {% data variables.product.prodname_github_app %} registration to use your webhook proxy URL. For an example, see "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-github-app-that-responds-to-webhook-events)."
- If your app uses the web application flow to authorize a user, you may want to update the "Callback URL" setting in your {% data variables.product.prodname_github_app %} registration to use a local callback URL. For an example, see "[AUTOTITLE](/apps/creating-github-apps/guides/building-a-login-with-github-button-with-a-github-app)."
## Next steps
Once you write the code for your {% data variables.product.prodname_github_app %}, you should ensure that it follows best practices. If necessary, remember to update your {% data variables.product.prodname_github_app %} registration. If your {% data variables.product.prodname_github_app %} needs to run on a server instead of a user's device, deploy your app to your server. Finally, you can share your {% data variables.product.prodname_github_app %} with other users and organizations.
### Follow best practices
Before deploying your {% data variables.product.prodname_github_app %}, make sure you follow best practices. For example, make sure that your {% data variables.product.prodname_github_app %}'s credentials are secure. For more information, see "[AUTOTITLE](/apps/creating-github-apps/about-creating-github-apps/best-practices-for-creating-a-github-app)."
### Update your {% data variables.product.prodname_github_app %} registration
If you changed the {% data variables.product.prodname_github_app %} registration for development, make sure you update the registration to use production-ready values. For example, if you used a webhook proxy URL for development, you should update the "Webhook URL" field to use the URL where you want your {% data variables.product.prodname_github_app %} to receive webhooks during production.
### Deploy your {% data variables.product.prodname_github_app %}
Once you have written the code for your {% data variables.product.prodname_github_app %}, your code needs to run somewhere. If your app is a website or web app, you might host your app on a server like [Azure App Service](https://azure.microsoft.com/products/app-service/). If your app is a client-side app, it might run on a user's device.
### Share your {% data variables.product.prodname_github_app %}
If you want to share your {% data variables.product.prodname_github_app %} with other users and organizations, you should make your {% data variables.product.prodname_github_app %} public. {% ifversion fpt or ghec %}To make your {% data variables.product.prodname_github_app %} more discoverable, you can list it on {% data variables.product.prodname_marketplace %}. {% endif %}For more information, see "[AUTOTITLE](/apps/sharing-github-apps/sharing-your-github-app)."

View File

@@ -1,7 +1,7 @@
--- ---
title: Building a CLI with a GitHub App title: Building a CLI with a GitHub App
shortTitle: Build a CLI shortTitle: Build a CLI
intro: "Follow this tutorial to write a CLI in Ruby that generates a user access token for a {% data variables.product.prodname_github_app %} via the device flow." intro: 'Follow this tutorial to write a CLI in Ruby that generates a user access token for a {% data variables.product.prodname_github_app %} via the device flow.'
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -9,6 +9,8 @@ versions:
ghec: '*' ghec: '*'
topics: topics:
- GitHub Apps - GitHub Apps
redirect_from:
- /apps/creating-github-apps/guides/building-a-cli-with-a-github-app
--- ---
## Introduction ## Introduction
@@ -33,7 +35,7 @@ There are two ways to generate a user access token for a {% data variables.produ
## Prerequisites ## Prerequisites
This tutorial assumes that you have already created a {% data variables.product.prodname_github_app %}. For more information about creating an app, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." This tutorial assumes that you have already registered a {% data variables.product.prodname_github_app %}. For more information about registering a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)."
Before following this tutorial, you must enable device flow for your app. For more information about enabling device flow for your app, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)." Before following this tutorial, you must enable device flow for your app. For more information about enabling device flow for your app, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."

View File

@@ -9,6 +9,8 @@ versions:
ghec: '*' ghec: '*'
topics: topics:
- GitHub Apps - GitHub Apps
redirect_from:
- /apps/creating-github-apps/guides/building-a-github-app-that-responds-to-webhook-events
--- ---
## Introduction ## Introduction
@@ -20,9 +22,9 @@ This tutorial uses JavaScript, but you can use any programming language that you
### About webhooks ### About webhooks
When you create a {% data variables.product.prodname_github_app %}, you can specify a webhook URL and subscribe to webhook events. When activity on {% data variables.product.company_short %} triggers an event that your app is subscribed to, {% data variables.product.company_short %} will send a webhook event to your app's webhook URL. When you register a {% data variables.product.prodname_github_app %}, you can specify a webhook URL and subscribe to webhook events. When activity on {% data variables.product.company_short %} triggers an event that your app is subscribed to, {% data variables.product.company_short %} will send a webhook event to your app's webhook URL.
For example, you can subscribe your app to the pull request webhook event. When a pull request is opened in a repository that the app was granted access to, {% data variables.product.company_short %} will send a pull request webhook event to your app's webhook URL. If multiple actions can trigger the event, the event payload will include an `action` field to indicate what type of action triggered the event. In this example, the value of `action` would be `opened` since the event was triggered because a pull request was opened. For example, you can subscribe your {% data variables.product.prodname_github_app %} to the pull request webhook event. When a pull request is opened in a repository that the app was granted access to, {% data variables.product.company_short %} will send a pull request webhook event to your app's webhook URL. If multiple actions can trigger the event, the event payload will include an `action` field to indicate what type of action triggered the event. In this example, the value of `action` would be `opened` since the event was triggered because a pull request was opened.
If your app is running on a server that is listening for these webhook events, then your app can take an action when it receives a webhook event. For example, your app can use the {% data variables.product.company_short %} API to post a comment to the pull request when it receives a pull request webhook event. If your app is running on a server that is listening for these webhook events, then your app can take an action when it receives a webhook event. For example, your app can use the {% data variables.product.company_short %} API to post a comment to the pull request when it receives a pull request webhook event.
@@ -40,7 +42,7 @@ The following sections will lead you through setting up the following components
- a repository to store the code for your app - a repository to store the code for your app
- a way to receive webhooks locally - a way to receive webhooks locally
- a {% data variables.product.prodname_github_app %} that is subscribed to "pull request" webhook events, has permission to add comments to pull requests, and uses a webhook URL that you can receive locally - a {% data variables.product.prodname_github_app %} registration that is subscribed to "pull request" webhook events, has permission to add comments to pull requests, and uses a webhook URL that you can receive locally
### Create a repository to store code for your app ### Create a repository to store code for your app
@@ -59,16 +61,16 @@ In order to develop your app locally, you can use a webhook proxy URL to forward
1. Click **Start a new channel**. 1. Click **Start a new channel**.
1. Copy the full URL under "Webhook Proxy URL". You will use this URL in a later step. 1. Copy the full URL under "Webhook Proxy URL". You will use this URL in a later step.
### Create a {% data variables.product.prodname_github_app %} ### Register a {% data variables.product.prodname_github_app %}
For this tutorial, you must have a {% data variables.product.prodname_github_app %} that: For this tutorial, you must have a {% data variables.product.prodname_github_app %} registration that:
- Has webhooks active - Has webhooks active
- Uses a webhook URL that you can receive locally - Uses a webhook URL that you can receive locally
- Has the "Pull request" repository permission - Has the "Pull request" repository permission
- Subscribes to the "Pull request" webhook event - Subscribes to the "Pull request" webhook event
The following steps will guide you through configuring a {% data variables.product.prodname_github_app %} with these settings. For more information about {% data variables.product.prodname_github_app %} settings, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/creating-a-github-app)." The following steps will guide you through registering a {% data variables.product.prodname_github_app %} with these settings. For more information about {% data variables.product.prodname_github_app %} settings, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/creating-a-github-app)."
{% data reusables.apps.settings-step %} {% data reusables.apps.settings-step %}
{% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.developer_settings %}

View File

@@ -11,6 +11,7 @@ topics:
- GitHub Apps - GitHub Apps
redirect_from: redirect_from:
- /apps/creating-github-apps/guides/using-the-web-application-flow-to-generate-a-user-access-token-for-a-github-app - /apps/creating-github-apps/guides/using-the-web-application-flow-to-generate-a-user-access-token-for-a-github-app
- /apps/creating-github-apps/guides/building-a-login-with-github-button-with-a-github-app
--- ---
## Introduction ## Introduction
@@ -27,7 +28,7 @@ There are two ways to generate a user access token for a {% data variables.produ
## Prerequisites ## Prerequisites
This tutorial assumes that you have already created a {% data variables.product.prodname_github_app %}. For more information about creating an app, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)." This tutorial assumes that you have already registered a {% data variables.product.prodname_github_app %}. For more information about registering a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)."
Before following this tutorial, you must set a callback URL for your app. This tutorial uses a local Sinatra server with the default URL of `http://localhost:4567`. For example, to work with the default URL for a local Sinatra application, your callback URL can be `http://localhost:4567/github/callback`. Once you are ready to deploy your app, you can change the callback URL to use your live server address. For more information about updating the callback URL for your app, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)" and "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-the-user-authorization-callback-url)." Before following this tutorial, you must set a callback URL for your app. This tutorial uses a local Sinatra server with the default URL of `http://localhost:4567`. For example, to work with the default URL for a local Sinatra application, your callback URL can be `http://localhost:4567/github/callback`. Once you are ready to deploy your app, you can change the callback URL to use your live server address. For more information about updating the callback URL for your app, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)" and "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-the-user-authorization-callback-url)."

View File

@@ -5,6 +5,7 @@ redirect_from:
- /apps/quickstart-guides/creating-ci-tests-with-the-checks-api - /apps/quickstart-guides/creating-ci-tests-with-the-checks-api
- /developers/apps/creating-ci-tests-with-the-checks-api - /developers/apps/creating-ci-tests-with-the-checks-api
- /developers/apps/guides/creating-ci-tests-with-the-checks-api - /developers/apps/guides/creating-ci-tests-with-the-checks-api
- /apps/creating-github-apps/guides/creating-ci-tests-with-the-checks-api
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'

View File

@@ -1,9 +1,10 @@
--- ---
title: Guides title: Writing code for a GitHub App
intro: 'Learn about using the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API with your app, continuous integration, and how to build with apps.' intro: 'Learn about using the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API with your app, continuous integration, and how to build with apps.'
redirect_from: redirect_from:
- /apps/quickstart-guides - /apps/quickstart-guides
- /developers/apps/guides - /developers/apps/guides
- /apps/creating-github-apps/guides
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -12,11 +13,11 @@ versions:
topics: topics:
- GitHub Apps - GitHub Apps
children: children:
- /about-writing-code-for-a-github-app
- /quickstart - /quickstart
- /building-a-github-app-that-responds-to-webhook-events - /building-a-github-app-that-responds-to-webhook-events
- /building-a-login-with-github-button-with-a-github-app - /building-a-login-with-github-button-with-a-github-app
- /building-a-cli-with-a-github-app - /building-a-cli-with-a-github-app
- /making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
- /setting-up-your-development-environment-to-create-a-github-app - /setting-up-your-development-environment-to-create-a-github-app
- /using-the-github-api-in-your-app - /using-the-github-api-in-your-app
- /creating-ci-tests-with-the-checks-api - /creating-ci-tests-with-the-checks-api

View File

@@ -10,6 +10,8 @@ versions:
ghec: '*' ghec: '*'
topics: topics:
- GitHub Apps - GitHub Apps
redirect_from:
- /apps/creating-github-apps/guides/quickstart
--- ---
## Introduction ## Introduction
@@ -40,7 +42,7 @@ In order to develop your app locally, you can use a webhook proxy URL to forward
1. Click **Start a new channel**. 1. Click **Start a new channel**.
1. Copy the full URL under "Webhook Proxy URL". You will use this URL in a later step. 1. Copy the full URL under "Webhook Proxy URL". You will use this URL in a later step.
## Step 3: Create a {% data variables.product.prodname_github_app %} ## Step 3: Register a {% data variables.product.prodname_github_app %}
The following steps will guide you through configuring the app settings that are required for this quickstart. For more information about the settings, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/creating-a-github-app)." The following steps will guide you through configuring the app settings that are required for this quickstart. For more information about the settings, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/creating-a-github-app)."

View File

@@ -5,6 +5,7 @@ redirect_from:
- /apps/quickstart-guides/setting-up-your-development-environment - /apps/quickstart-guides/setting-up-your-development-environment
- /developers/apps/setting-up-your-development-environment-to-create-a-github-app - /developers/apps/setting-up-your-development-environment-to-create-a-github-app
- /developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app - /developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app
- /apps/creating-github-apps/guides/setting-up-your-development-environment-to-create-a-github-app
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'

View File

@@ -6,6 +6,7 @@ redirect_from:
- /apps/quickstart-guides/using-the-github-api-in-your-app - /apps/quickstart-guides/using-the-github-api-in-your-app
- /developers/apps/using-the-github-api-in-your-app - /developers/apps/using-the-github-api-in-your-app
- /developers/apps/guides/using-the-github-api-in-your-app - /developers/apps/guides/using-the-github-api-in-your-app
- /apps/creating-github-apps/guides/using-the-github-api-in-your-app
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'

View File

@@ -1,6 +1,6 @@
--- ---
title: About GitHub App managers title: About GitHub App managers
intro: 'Organization owners can grant or revoke access for a user to manage some or all of the {% data variables.product.prodname_github_apps %} owned by the organization.' intro: 'Organization owners can grant or revoke access for a user to manage some or all of the {% data variables.product.prodname_github_app %} registrations owned by the organization.'
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'

View File

@@ -24,9 +24,9 @@ topics:
## About deleting {% data variables.product.prodname_github_app %}s ## About deleting {% data variables.product.prodname_github_app %}s
If you own a {% data variables.product.prodname_github_app %} or are an app manager for a {% data variables.product.prodname_github_app %}, you can delete the {% data variables.product.prodname_github_app %}. For more information about {% data variables.product.prodname_github_app %} managers, see "[AUTOTITLE](/apps/maintaining-github-apps/about-github-app-managers)." If you own a {% data variables.product.prodname_github_app %} or are an app manager for a {% data variables.product.prodname_github_app %}, you can delete the {% data variables.product.prodname_github_app %} registration. For more information about {% data variables.product.prodname_github_app %} managers, see "[AUTOTITLE](/apps/maintaining-github-apps/about-github-app-managers)."
When you delete a {% data variables.product.prodname_github_app %}, the app will be uninstalled from all accounts that the app is installed on. When you delete a {% data variables.product.prodname_github_app %} registration, the app will be uninstalled from all accounts that the app is installed on.
{% note %} {% note %}
@@ -44,3 +44,5 @@ When you delete a {% data variables.product.prodname_github_app %}, the app will
6. Click **Delete GitHub App**. 6. Click **Delete GitHub App**.
7. In the confirmation box, type the name of the GitHub App to confirm you want to delete it. 7. In the confirmation box, type the name of the GitHub App to confirm you want to delete it.
8. Click **I understand the consequences, delete this GitHub App**. 8. Click **I understand the consequences, delete this GitHub App**.
These steps only delete your {% data variables.product.prodname_github_app %} registration, and all of the organization and account installations it may have. They do not delete any code that you wrote for your app. However, any code that relies on your {% data variables.product.prodname_github_app %}'s credentials will no longer function.

View File

@@ -13,7 +13,7 @@ versions:
topics: topics:
- GitHub Apps - GitHub Apps
children: children:
- /modifying-a-github-app - /modifying-a-github-app-registration
- /activating-optional-features-for-github-apps - /activating-optional-features-for-github-apps
- /about-github-app-managers - /about-github-app-managers
- /managing-allowed-ip-addresses-for-a-github-app - /managing-allowed-ip-addresses-for-a-github-app

View File

@@ -1,6 +1,6 @@
--- ---
title: Managing allowed IP addresses for a GitHub App title: Managing allowed IP addresses for a GitHub App
intro: 'You can add an IP allow list to your {% data variables.product.prodname_github_app %} to prevent your app from being blocked by an organization''s own allow list.' intro: 'You can add an IP allow list to your {% data variables.product.prodname_github_app %} registration to prevent your app from being blocked by an organization''s own allow list.'
versions: versions:
fpt: '*' fpt: '*'
ghae: '*' ghae: '*'
@@ -23,7 +23,7 @@ When an organization has an allow list, third-party applications that connect vi
{% data reusables.apps.ip-allow-list-only-apps %} {% data reusables.apps.ip-allow-list-only-apps %}
## Adding an IP address allow list to a {% data variables.product.prodname_github_app %} ## Adding an IP address allow list to a {% data variables.product.prodname_github_app %} registration
{% data reusables.identity-and-permissions.ipv6-allow-lists %} {% data reusables.identity-and-permissions.ipv6-allow-lists %}

View File

@@ -1,5 +1,5 @@
--- ---
title: Modifying a GitHub App title: Modifying a GitHub App registration
shortTitle: Modify app settings shortTitle: Modify app settings
intro: '{% data reusables.shortdesc.modifying_github_apps %}' intro: '{% data reusables.shortdesc.modifying_github_apps %}'
redirect_from: redirect_from:
@@ -12,6 +12,7 @@ redirect_from:
- /developers/apps/editing-a-github-apps-permissions - /developers/apps/editing-a-github-apps-permissions
- /developers/apps/managing-github-apps/editing-a-github-apps-permissions - /developers/apps/managing-github-apps/editing-a-github-apps-permissions
- /apps/maintaining-github-apps/editing-a-github-apps-permissions - /apps/maintaining-github-apps/editing-a-github-apps-permissions
- /apps/maintaining-github-apps/modifying-a-github-app
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -23,7 +24,7 @@ topics:
## About {% data variables.product.prodname_github_app %} modifications ## About {% data variables.product.prodname_github_app %} modifications
You can modify your {% data variables.product.prodname_github_app %} to change any of the settings that were selected when the app was created. For more information about the settings you can select while creating a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/creating-a-github-app)." You can modify your {% data variables.product.prodname_github_app %} registration to change any of the settings that were selected when the app was initially registered. For more information about the settings you can select while registering a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/creating-a-github-app)."
For example, you can change the name and description of your app, the permissions granted to your app, the webhooks your app subscribes to, or the visibility of your app. For example, you can change the name and description of your app, the permissions granted to your app, the webhooks your app subscribes to, or the visibility of your app.

View File

@@ -18,11 +18,11 @@ shortTitle: Transfer ownership
## About transferring {% data variables.product.prodname_github_app %}s ## About transferring {% data variables.product.prodname_github_app %}s
The owner of a {% data variables.product.prodname_github_app %} can transfer ownership of the {% data variables.product.prodname_github_app %} to another user or organization. If an organization has designated any app managers for an app owned by the organization, the app managers can also transfer ownership of the {% data variables.product.prodname_github_app %}. For more information about app managers, see "[AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/adding-and-removing-github-app-managers-in-your-organization)." The owner of a {% data variables.product.prodname_github_app %} registration can transfer ownership of the {% data variables.product.prodname_github_app %} registration to another user or organization. If an organization has designated any app managers for an app owned by the organization, the app managers can also transfer ownership of the {% data variables.product.prodname_github_app %} registration. For more information about app managers, see "[AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/adding-and-removing-github-app-managers-in-your-organization)."
You can only transfer ownership to a user or organization. You cannot transfer ownership to a team. You can only transfer ownership to a user or organization. You cannot transfer ownership to a team.
## Transferring a {% data variables.product.prodname_github_app %} ## Transferring a {% data variables.product.prodname_github_app %} registration
{% data reusables.apps.settings-step %} {% data reusables.apps.settings-step %}
{% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.developer_settings %}

View File

@@ -11,7 +11,7 @@ topics:
children: children:
- /sharing-your-github-app - /sharing-your-github-app
- /making-your-github-app-available-for-github-enterprise-server - /making-your-github-app-available-for-github-enterprise-server
- /creating-a-github-app-from-a-manifest - /registering-a-github-app-from-a-manifest
- /creating-a-github-app-using-url-parameters - /registering-a-github-app-using-url-parameters
--- ---

View File

@@ -23,20 +23,20 @@ These steps are not required if your {% data variables.product.prodname_github_a
If {% data variables.product.prodname_ghe_server %} access is important, consider whether a custom action for {% data variables.product.prodname_actions %} will suit your needs instead. Public actions are available on {% data variables.product.prodname_ghe_server %} instances with {% data variables.product.prodname_github_connect %}. For more information, see {% ifversion ghes %}"[AUTOTITLE](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)."{% else %}"[AUTOTITLE](/enterprise-server@latest/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)" in the {% data variables.product.prodname_ghe_server %} documentation.{% endif %} If {% data variables.product.prodname_ghe_server %} access is important, consider whether a custom action for {% data variables.product.prodname_actions %} will suit your needs instead. Public actions are available on {% data variables.product.prodname_ghe_server %} instances with {% data variables.product.prodname_github_connect %}. For more information, see {% ifversion ghes %}"[AUTOTITLE](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)."{% else %}"[AUTOTITLE](/enterprise-server@latest/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)" in the {% data variables.product.prodname_ghe_server %} documentation.{% endif %}
## Each {% data variables.product.prodname_ghe_server %} instance must create their own {% data variables.product.prodname_github_app %} ## Each {% data variables.product.prodname_ghe_server %} instance must register their own {% data variables.product.prodname_github_app %}
Organizations owned by a {% data variables.product.prodname_ghe_server %} instance cannot install {% data variables.product.prodname_github_app %}s registered on {% data variables.product.prodname_dotcom_the_website %} or on another {% data variables.product.prodname_ghe_server %} instance. Instead, they must create and install their own {% data variables.product.prodname_github_app %} for use on that instance. Organizations owned by a {% data variables.product.prodname_ghe_server %} instance cannot install {% data variables.product.prodname_github_app %}s registered on {% data variables.product.prodname_dotcom_the_website %} or on another {% data variables.product.prodname_ghe_server %} instance. Instead, they must register and install their own {% data variables.product.prodname_github_app %} for use on that instance.
1. The app developer creates a manifest or URL parameters. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest)" and "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-using-url-parameters)." 1. The app developer creates a manifest or URL parameters. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest)" and "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-using-url-parameters)."
1. The app developer shares the manifest or URL parameters with the {% data variables.product.prodname_ghe_server %} instance that wants to use the app. The same manifest or URL parameters can be shared with multiple {% data variables.product.prodname_ghe_server %} instances. 1. The app developer shares the manifest or URL parameters with the {% data variables.product.prodname_ghe_server %} instance that wants to use the app. The same manifest or URL parameters can be shared with multiple {% data variables.product.prodname_ghe_server %} instances.
1. An organization owned by the instance creates a {% data variables.product.prodname_github_app %} from the manifest or URL parameters. 1. An organization owned by the instance uses the manifest or URL parameters to register a {% data variables.product.prodname_github_app %}.
1. The organization installs the {% data variables.product.prodname_github_app %} that they created. 1. The organization installs the {% data variables.product.prodname_github_app %} that they registered.
Optionally, if the organization made the {% data variables.product.prodname_github_app %} public, other organizations within the instance can install the {% data variables.product.prodname_github_app %} as well. There is not a way to install a {% data variables.product.prodname_github_app %} on an entire instance, only on organizations within an instance. Optionally, if the organization made the {% data variables.product.prodname_github_app %} public, other organizations within the instance can install the {% data variables.product.prodname_github_app %} as well. There is not a way to install a {% data variables.product.prodname_github_app %} on an entire instance, only on organizations within an instance.
## The app code must be able to access the {% data variables.product.prodname_github_app %} credentials for the instance ## The app code must be able to access the {% data variables.product.prodname_github_app %} credentials for the instance
You app's code will need the credentials of the {% data variables.product.prodname_github_app %} that the {% data variables.product.prodname_ghe_server %} instance created. It will also need the hostname of the instance. You have two options: get the credentials and hostname from the instance, or share the app code with the instance. You app's code will need the credentials of the {% data variables.product.prodname_github_app %} that the {% data variables.product.prodname_ghe_server %} instance registered. It will also need the hostname of the instance. You have two options: get the credentials and hostname from the instance, or share the app code with the instance.
### Get the credentials from the {% data variables.product.prodname_ghe_server %} instance ### Get the credentials from the {% data variables.product.prodname_ghe_server %} instance

View File

@@ -1,12 +1,13 @@
--- ---
title: Creating a GitHub App from a manifest title: Registering a GitHub App from a manifest
intro: 'A GitHub App Manifest is a preconfigured GitHub App you can share with anyone who wants to use your app in their personal repositories. The manifest flow allows someone to quickly create, install, and start extending a GitHub App without needing to register the app or connect the registration to the hosted app code.' intro: 'A {% data variables.product.prodname_github_app %} manifest is a way to share a preconfigured {% data variables.product.prodname_github_app %} registration with other users. The manifest flow allows someone to quickly register a {% data variables.product.prodname_github_app %}.'
redirect_from: redirect_from:
- /apps/building-github-apps/creating-github-apps-from-a-manifest - /apps/building-github-apps/creating-github-apps-from-a-manifest
- /developers/apps/creating-a-github-app-from-a-manifest - /developers/apps/creating-a-github-app-from-a-manifest
- /developers/apps/building-github-apps/creating-a-github-app-from-a-manifest - /developers/apps/building-github-apps/creating-a-github-app-from-a-manifest
- /apps/creating-github-apps/creating-github-apps/creating-a-github-app-from-a-manifest - /apps/creating-github-apps/creating-github-apps/creating-a-github-app-from-a-manifest
- /apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest - /apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest
- /apps/sharing-github-apps/creating-a-github-app-from-a-manifest
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -14,15 +15,15 @@ versions:
ghec: '*' ghec: '*'
topics: topics:
- GitHub Apps - GitHub Apps
shortTitle: App creation manifest flow shortTitle: App manifest
--- ---
## About GitHub App Manifests ## About GitHub App Manifests
When someone creates a GitHub App from a manifest, they only need to follow a URL and name the app. The manifest includes the permissions, events, and webhook URL needed to automatically register the app. The manifest flow creates the GitHub App registration and retrieves the app's webhook secret, private key (PEM file), and GitHub App ID. The person who creates the app from the manifest will own the app and can choose to [edit the app's configuration settings](/apps/maintaining-github-apps/modifying-a-github-app), delete it, or transfer it to another person on GitHub. When someone registers a GitHub App from a manifest, they only need to follow a URL and name the app. The manifest includes the permissions, events, and webhook URL needed to automatically register the app. The manifest flow creates the GitHub App registration and generates the app's webhook secret, private key (PEM file), client secret, and GitHub App ID. The person who creates the {% data variables.product.prodname_github_app %} registration from the manifest will own the {% data variables.product.prodname_github_app %} registration and can choose to edit the registration's settings, delete it, or transfer it to another person on GitHub.
You can use [Probot](https://probot.github.io/) to get started with GitHub App Manifests or see an example implementation. See "[Using Probot to implement the GitHub App Manifest flow](#using-probot-to-implement-the-github-app-manifest-flow)" to learn more. You can use [Probot](https://probot.github.io/) to get started with GitHub App Manifests or see an example implementation. See "[Using Probot to implement the GitHub App Manifest flow](#using-probot-to-implement-the-github-app-manifest-flow)" to learn more.
Here are some scenarios where you might use GitHub App Manifests to create preconfigured apps: Here are some scenarios where you might use GitHub App Manifests to register pre-configured apps:
* Help new team members come up-to-speed quickly when developing GitHub Apps. * Help new team members come up-to-speed quickly when developing GitHub Apps.
* Allow others to extend a GitHub App using the GitHub APIs without requiring them to configure an app. * Allow others to extend a GitHub App using the GitHub APIs without requiring them to configure an app.
@@ -42,17 +43,17 @@ The GitHub App Manifest flow uses a handshaking process similar to the [OAuth fl
Follow these steps to implement the GitHub App Manifest flow: Follow these steps to implement the GitHub App Manifest flow:
1. You redirect people to GitHub to create a new GitHub App. 1. You redirect people to GitHub to register a new GitHub App.
1. GitHub redirects people back to your site. 1. GitHub redirects people back to your site.
1. You exchange the temporary code to retrieve the app configuration. 1. You exchange the temporary code to retrieve the app configuration.
### 1. You redirect people to GitHub to create a new GitHub App ### 1. You redirect people to GitHub to register a new GitHub App
To redirect people to create a new GitHub App, [provide a link](#examples) for them to click that sends a `POST` request to `https://github.com/settings/apps/new` for a personal account or `https://github.com/organizations/ORGANIZATION/settings/apps/new` for an organization account, replacing `ORGANIZATION` with the name of the organization account where the app will be created. To redirect people to register a new GitHub App, [provide a link](#examples) for them to click that sends a `POST` request to `https://github.com/settings/apps/new` for a personal account or `https://github.com/organizations/ORGANIZATION/settings/apps/new` for an organization account, replacing `ORGANIZATION` with the name of the organization account where the app will be registered.
You must include the [GitHub App Manifest parameters](#github-app-manifest-parameters) as a JSON-encoded string in a parameter called `manifest`. You can also include a `state` [parameter](#parameters) for additional security. You must include the [GitHub App Manifest parameters](#github-app-manifest-parameters) as a JSON-encoded string in a parameter called `manifest`. You can also include a `state` [parameter](#parameters) for additional security.
The person creating the app will be redirected to a GitHub page with an input field where they can edit the name of the app you included in the `manifest` parameter. If you do not include a `name` in the `manifest`, they can set their own name for the app in this field. The person registering the app will be redirected to a GitHub page with an input field where they can edit the name of the app you included in the `manifest` parameter. If you do not include a `name` in the `manifest`, they can set their own name for the app in this field.
#### GitHub App Manifest parameters #### GitHub App Manifest parameters
@@ -61,7 +62,7 @@ The person creating the app will be redirected to a GitHub page with an input fi
`name` | `string` | The name of the {% data variables.product.prodname_github_app %}. `name` | `string` | The name of the {% data variables.product.prodname_github_app %}.
`url` | `string` | **Required.** The homepage of your {% data variables.product.prodname_github_app %}. `url` | `string` | **Required.** The homepage of your {% data variables.product.prodname_github_app %}.
`hook_attributes` | `object` | The configuration of the {% data variables.product.prodname_github_app %}'s webhook. `hook_attributes` | `object` | The configuration of the {% data variables.product.prodname_github_app %}'s webhook.
`redirect_url` | `string` | The full URL to redirect to after a user initiates the creation of a {% data variables.product.prodname_github_app %} from a manifest. `redirect_url` | `string` | The full URL to redirect to after a user initiates the registration of a {% data variables.product.prodname_github_app %} from a manifest.
`callback_urls` | `array of strings` | A full URL to redirect to after someone authorizes an installation. You can provide up to 10 callback URLs. `callback_urls` | `array of strings` | A full URL to redirect to after someone authorizes an installation. You can provide up to 10 callback URLs.
`setup_url` | `string` | A full URL to redirect users to after they install your {% data variables.product.prodname_github_app %} if additional setup is required. `setup_url` | `string` | A full URL to redirect users to after they install your {% data variables.product.prodname_github_app %} if additional setup is required.
`description` | `string` | A description of the {% data variables.product.prodname_github_app %}. `description` | `string` | A description of the {% data variables.product.prodname_github_app %}.
@@ -90,7 +91,7 @@ This example uses a form on a web page with a button that triggers the `POST` re
```html ```html
<form action="https://github.com/settings/apps/new?state=abc123" method="post"> <form action="https://github.com/settings/apps/new?state=abc123" method="post">
Create a GitHub App Manifest: <input type="text" name="manifest" id="manifest"><br> Register a GitHub App Manifest: <input type="text" name="manifest" id="manifest"><br>
<input type="submit" value="Submit"> <input type="submit" value="Submit">
</form> </form>
@@ -121,11 +122,11 @@ This example uses a form on a web page with a button that triggers the `POST` re
</script> </script>
``` ```
This example uses a form on a web page with a button that triggers the `POST` request for an organization account. Replace `ORGANIZATION` with the name of the organization account where you want to create the app. This example uses a form on a web page with a button that triggers the `POST` request for an organization account. Replace `ORGANIZATION` with the name of the organization account where you want to register the app.
```html ```html
<form action="https://github.com/organizations/ORGANIZATION/settings/apps/new?state=abc123" method="post"> <form action="https://github.com/organizations/ORGANIZATION/settings/apps/new?state=abc123" method="post">
Create a GitHub App Manifest: <input type="text" name="manifest" id="manifest"><br> register a GitHub App Manifest: <input type="text" name="manifest" id="manifest"><br>
<input type="submit" value="Submit"> <input type="submit" value="Submit">
</form> </form>
@@ -182,7 +183,7 @@ You must complete this step of the GitHub App Manifest flow within one hour.
For more information about the endpoint's response, see [Create a GitHub App from a manifest](/rest/apps#create-a-github-app-from-a-manifest). For more information about the endpoint's response, see [Create a GitHub App from a manifest](/rest/apps#create-a-github-app-from-a-manifest).
When the final step in the manifest flow is completed, the person creating the app from the flow will be an owner of a registered GitHub App that they can install on any of their personal repositories. They can choose to extend the app using the GitHub APIs, transfer ownership to someone else, or delete it at any time. When the final step in the manifest flow is completed, the person registering the app from the flow will be an owner of a registered GitHub App that they can install on any of their personal repositories. They can choose to extend the app using the GitHub APIs, transfer ownership to someone else, or delete it at any time.
## Using Probot to implement the GitHub App Manifest flow ## Using Probot to implement the GitHub App Manifest flow
@@ -193,7 +194,7 @@ To create a Probot App that you can share, follow these steps:
1. [Generate a new GitHub App](https://probot.github.io/docs/development/#generating-a-new-app). 1. [Generate a new GitHub App](https://probot.github.io/docs/development/#generating-a-new-app).
1. Open the project you created, and customize the settings in the `app.yml` file. Probot uses the settings in `app.yml` as the [GitHub App Manifest parameters](#github-app-manifest-parameters). 1. Open the project you created, and customize the settings in the `app.yml` file. Probot uses the settings in `app.yml` as the [GitHub App Manifest parameters](#github-app-manifest-parameters).
1. Add your application's custom code. 1. Add your application's custom code.
1. [Run the GitHub App locally](https://probot.github.io/docs/development/#running-the-app-locally) or [host it anywhere you'd like](#hosting-your-app-with-glitch). When you navigate to the hosted app's URL, you'll find a web page with a **Register GitHub App** button that people can click to create a preconfigured app. 1. [Run the GitHub App locally](https://probot.github.io/docs/development/#running-the-app-locally) or [host it anywhere you'd like](#hosting-your-app-with-glitch). When you navigate to the hosted app's URL, you'll find a web page with a **Register GitHub App** button that people can click to register a preconfigured app.
Using [dotenv](https://github.com/bkeepers/dotenv), Probot creates a `.env` file and sets the `APP_ID`, `PRIVATE_KEY`, and `WEBHOOK_SECRET` environment variables with the values [retrieved from the app configuration](#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration). Using [dotenv](https://github.com/bkeepers/dotenv), Probot creates a `.env` file and sets the `APP_ID`, `PRIVATE_KEY`, and `WEBHOOK_SECRET` environment variables with the values [retrieved from the app configuration](#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration).

View File

@@ -1,5 +1,5 @@
--- ---
title: Creating a GitHub App using URL parameters title: Registering a GitHub App using URL parameters
intro: 'You can use URL query parameters to help other people quickly set up a new {% data variables.product.prodname_github_app %} with a specific configuration you have preselected.' intro: 'You can use URL query parameters to help other people quickly set up a new {% data variables.product.prodname_github_app %} with a specific configuration you have preselected.'
redirect_from: redirect_from:
- /apps/building-github-apps/creating-github-apps-using-url-parameters - /apps/building-github-apps/creating-github-apps-using-url-parameters
@@ -7,6 +7,7 @@ redirect_from:
- /developers/apps/building-github-apps/creating-a-github-app-using-url-parameters - /developers/apps/building-github-apps/creating-a-github-app-using-url-parameters
- /apps/creating-github-apps/creating-github-apps/creating-a-github-app-using-url-parameters - /apps/creating-github-apps/creating-github-apps/creating-a-github-app-using-url-parameters
- /apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-using-url-parameters - /apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-using-url-parameters
- /apps/sharing-github-apps/creating-a-github-app-using-url-parameters
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -14,11 +15,11 @@ versions:
ghec: '*' ghec: '*'
topics: topics:
- GitHub Apps - GitHub Apps
shortTitle: App creation query parameters shortTitle: App query parameters
--- ---
## About URL parameters for creating {% data variables.product.prodname_github_app %}s ## About URL parameters for registering {% data variables.product.prodname_github_app %}s
You can use URL parameters to preselect the configuration settings of a new {% data variables.product.prodname_github_app %} and share a custom link with other people. The link will take people to an app registration page, where the app settings will be pre-filled according to the URL parameters you included in the URL. You can use URL parameters to preselect the configuration settings of a new {% data variables.product.prodname_github_app %} registration and share a custom link with other people. The link will take people to a {% data variables.product.prodname_github_app %} registration page, where the app settings will be pre-filled according to the URL parameters you included in the URL.
This approach is useful for integrators who want customers to set up an app on their personal account or organization with certain specifications, or for customers using {% data variables.product.prodname_ghe_server %} who aren't able to install apps from the {% data variables.product.prodname_marketplace %}. This approach is useful for integrators who want customers to set up an app on their personal account or organization with certain specifications, or for customers using {% data variables.product.prodname_ghe_server %} who aren't able to install apps from the {% data variables.product.prodname_marketplace %}.
@@ -28,12 +29,12 @@ Alternatively, you can create a {% data variables.product.prodname_github_app %}
To create a custom configuration URL for a {% data variables.product.prodname_github_app %} on a personal or organization account, add query parameters after the following base URLs. To create a custom configuration URL for a {% data variables.product.prodname_github_app %} on a personal or organization account, add query parameters after the following base URLs.
* To create an app on a personal account, add URL parameters to: `{% data variables.product.oauth_host_code %}/settings/apps/new` * To register an app on a personal account, add URL parameters to: `{% data variables.product.oauth_host_code %}/settings/apps/new`
* To create an app on an organization account, add URL parameters to: `{% data variables.product.oauth_host_code %}/organizations/ORGANIZATION/settings/apps/new`. Replace `ORGANIZATION` with the name of the organization where you'd like the customer to create the app. * To register an app on an organization account, add URL parameters to: `{% data variables.product.oauth_host_code %}/organizations/ORGANIZATION/settings/apps/new`. Replace `ORGANIZATION` with the name of the organization where you'd like the customer to register the app.
On the app registration page, the person creating the app can edit the preselected values before submitting the app. If you do not include parameters for required values (like `name`) in the URL query string, the person creating the app will need to input a value before they can submit the app. On the app registration page, the person registering the app can edit the preselected values before submitting the app. If you do not include parameters for required values (like `name`) in the URL query string, the person registering the app will need to input a value before they can register the app.
For example, the following URL creates a new public app named `octocat-github-app` on a personal account. Using query parameters, the URL preconfigures a description and a callback URL. It also selects read and write permissions for `checks`, activates webhooks using the `webhook_active` parameter, subscribes to the `check_run` and `check_suite` webhook events, and selects the option to request user authorization (OAuth) during installation: For example, the following URL registers a new public app named `octocat-github-app` on a personal account. Using query parameters, the URL preconfigures a description and a callback URL. It also selects read and write permissions for `checks`, activates webhooks using the `webhook_active` parameter, subscribes to the `check_run` and `check_suite` webhook events, and selects the option to request user authorization (OAuth) during installation:
```text ```text
{% data variables.product.oauth_host_code %}/settings/apps/new?name=octocat-github-app&description=An%20Octocat%20App&callback_urls[]=https://example.com&request_oauth_on_install=true&public=true&checks=write&webhook_active=true&events[]=check_run&events[]=check_suite {% data variables.product.oauth_host_code %}/settings/apps/new?name=octocat-github-app&description=An%20Octocat%20App&callback_urls[]=https://example.com&request_oauth_on_install=true&public=true&checks=write&webhook_active=true&events[]=check_run&events[]=check_suite
@@ -41,7 +42,7 @@ For example, the following URL creates a new public app named `octocat-github-ap
## {% data variables.product.prodname_github_app %} configuration parameters ## {% data variables.product.prodname_github_app %} configuration parameters
You can use the following query parameters to select a specific configuration for the {% data variables.product.prodname_github_app %}. For example, to name the app "octocat-github-app", your query string would include `name=octocat-github-app`. You can use the following query parameters to select a specific configuration for the {% data variables.product.prodname_github_app %} registration. For example, to name the app "octocat-github-app", your query string would include `name=octocat-github-app`.
Parameter name | Type | Description Parameter name | Type | Description
-----|------|------------- -----|------|-------------
@@ -62,7 +63,7 @@ Parameter name | Type | Description
## {% data variables.product.prodname_github_app %} permissions ## {% data variables.product.prodname_github_app %} permissions
You can use query parameters to select the permissions for the {% data variables.product.prodname_github_app %}. For more information about the possible permissions you can select for the app, and the endpoints that the app can access with each permission, see "[AUTOTITLE](/rest/overview/permissions-required-for-github-apps)." For the URL query parameter, use the permission name as the query parameter name, and set the query value to one of the possible values for that permission set. You can use query parameters to select the permissions for the {% data variables.product.prodname_github_app %} registration. For more information about the possible permissions you can select for the app, and the endpoints that the app can access with each permission, see "[AUTOTITLE](/rest/overview/permissions-required-for-github-apps)." For the URL query parameter, use the permission name as the query parameter name, and set the query value to one of the possible values for that permission set.
For example, to select "Read & write" permissions in the user interface for `contents`, your query string would include `contents=write`. To select "Read-only" permissions in the user interface for `blocking`, your query string would include `blocking=read`. To select "No access" in the user interface for `checks`, your query string would not include the `checks` permission. For example, to select "Read & write" permissions in the user interface for `contents`, your query string would include `contents=write`. To select "Read-only" permissions in the user interface for `blocking`, your query string would include `blocking=read`. To select "No access" in the user interface for `checks`, your query string would not include the `checks` permission.
@@ -76,6 +77,6 @@ To enable the {% data variables.product.prodname_github_app %} webhook, use `web
For example, to subscribe a {% data variables.product.prodname_github_app %} to receive webhook payloads for activity relating to commit comments, the query string would include `&webhook_active=true&webhook_url=https://example.com&events[]=commit_comment`. Note that the `commit_comment` webhook event requires the {% data variables.product.prodname_github_app %} to have at least read-level access for the "Contents" repository permission. So your query string should also include a parameter to set the `contents` permission to `read` or `write`. For more information, see "[{% data variables.product.prodname_dotcom %} app permissions](#github-app-permissions)." For example, to subscribe a {% data variables.product.prodname_github_app %} to receive webhook payloads for activity relating to commit comments, the query string would include `&webhook_active=true&webhook_url=https://example.com&events[]=commit_comment`. Note that the `commit_comment` webhook event requires the {% data variables.product.prodname_github_app %} to have at least read-level access for the "Contents" repository permission. So your query string should also include a parameter to set the `contents` permission to `read` or `write`. For more information, see "[{% data variables.product.prodname_dotcom %} app permissions](#github-app-permissions)."
You cannot use query parameters to set the value of a webhook secret. If an app requires a secret to secure its webhook, the value of the secret must be set in the {% data variables.product.company_short %} UI by the person creating the app. You cannot use query parameters to set the value of a webhook secret. If an app requires a secret to secure its webhook, the value of the secret must be set in the {% data variables.product.company_short %} UI by the person registering the app.
For more information about webhooks and {% data variables.product.prodname_github_apps %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/using-webhooks-with-github-apps)." For more information about webhooks and {% data variables.product.prodname_github_apps %}, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/using-webhooks-with-github-apps)."

View File

@@ -101,7 +101,7 @@ When you're prompted to "Enter a file in which to save the key", you can press *
## Adding your SSH key to the ssh-agent ## Adding your SSH key to the ssh-agent
Before adding a new SSH key to the ssh-agent to manage your keys, you should have checked for existing SSH keys and generated a new SSH key. <span class="platform-mac">When adding your SSH key to the agent, use the default macOS `ssh-add` command, and not an application installed by [macports](https://www.macports.org/), [homebrew](http://brew.sh/), or some other external source.</span> Before adding a new SSH key to the ssh-agent to manage your keys, you should have checked for existing SSH keys and generated a new SSH key. <span class="platform-mac">When adding your SSH key to the agent, use the default macOS `ssh-add` command, and not an application installed by [macports](https://www.macports.org/), [homebrew](https://brew.sh/), or some other external source.</span>
{% mac %} {% mac %}

View File

@@ -39,13 +39,13 @@ If you have multiple GPG keys, you need to tell Git which one to use.
{% data reusables.gpg.set-auto-sign %} {% data reusables.gpg.set-auto-sign %}
1. If you aren't using the GPG suite, run the following command in the `zsh` shell to add the GPG key to your `.zshrc` file, if it exists, or your `.zprofile` file: 1. If you aren't using the GPG suite, run the following command in the `zsh` shell to add the GPG key to your `.zshrc` file, if it exists, or your `.zprofile` file:
```shell ```shell
$ if [ -r ~/.zshrc ]; then echo 'export GPG_TTY=$(tty)' >> ~/.zshrc; \ $ if [ -r ~/.zshrc ]; then echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.zshrc; \
else echo 'export GPG_TTY=$(tty)' >> ~/.zprofile; fi else echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.zprofile; fi
``` ```
Alternatively, if you use the `bash` shell, run this command: Alternatively, if you use the `bash` shell, run this command:
```shell ```shell
$ if [ -r ~/.bash_profile ]; then echo 'export GPG_TTY=$(tty)' >> ~/.bash_profile; \ $ if [ -r ~/.bash_profile ]; then echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.bash_profile; \
else echo 'export GPG_TTY=$(tty)' >> ~/.profile; fi else echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.profile; fi
``` ```
1. Optionally, to prompt you to enter a PIN or passphrase when required, install `pinentry-mac`. For example, using [Homebrew](https://brew.sh/): 1. Optionally, to prompt you to enter a PIN or passphrase when required, install `pinentry-mac`. For example, using [Homebrew](https://brew.sh/):
```shell ```shell
@@ -97,7 +97,7 @@ If you have multiple GPG keys, you need to tell Git which one to use.
{% data reusables.gpg.set-auto-sign %} {% data reusables.gpg.set-auto-sign %}
1. To add your GPG key to your `.bashrc` startup file, run the following command: 1. To add your GPG key to your `.bashrc` startup file, run the following command:
```bash ```bash
$ [ -f ~/.bashrc ] && echo 'export GPG_TTY=$(tty)' >> ~/.bashrc $ [ -f ~/.bashrc ] && echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.bashrc
``` ```
{% endlinux %} {% endlinux %}
{% ifversion ssh-commit-verification %} {% ifversion ssh-commit-verification %}

View File

@@ -16,7 +16,9 @@ shortTitle: Export dependencies as SBOM
{% data reusables.dependabot.about-the-dependency-graph %} {% data reusables.dependabot.about-the-dependency-graph %}
You can export the current state of the dependency graph for your repository as a Software Bill of Materials (SBOM) using the industry standard [SPDX](https://spdx.github.io/spdx-spec/v2.3/) format. You can export the current state of the dependency graph for your repository as a Software Bill of Materials (SBOM) using the industry standard [SPDX](https://spdx.github.io/spdx-spec/v2.3/) format:
- Via the {% data variables.product.prodname_dotcom %} UI
- Using the REST API
{% data reusables.dependency-graph.sbom-intro %} {% data reusables.dependency-graph.sbom-intro %}
@@ -28,3 +30,7 @@ If your company provides software to the US federal government per [Executive Or
{% data reusables.repositories.accessing-repository-graphs %} {% data reusables.repositories.accessing-repository-graphs %}
1. In the left sidebar, click **Dependency graph**. 1. In the left sidebar, click **Dependency graph**.
1. On the top right side of the **Dependencies** tab, click **Export SBOM** to generate an SBOM file for download from your browser. 1. On the top right side of the **Dependencies** tab, click **Export SBOM** to generate an SBOM file for download from your browser.
## Exporting a software bill of material for your repository using the REST API
If you want to use the REST API to export an SBOM for your repository, see [AUTOTITLE](/rest/dependency-graph/sboms#export-a-software-bill-of-materials-sbom-for-a-repository) in the REST API documentation for more information.

View File

@@ -98,6 +98,7 @@ Alternatively, you can write your own action to submit dependencies for your pro
{% ifversion dependency-graph-sbom-export %} {% ifversion dependency-graph-sbom-export %}
To generate an SBOM, you can use: To generate an SBOM, you can use:
- the {% data variables.product.prodname_dotcom %} user interface. For more information about how to export an SBOM for a repository using information from the dependency graph, see "[AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exporting-a-software-bill-of-materials-for-your-repository)." - the {% data variables.product.prodname_dotcom %} user interface. For more information about how to export an SBOM for a repository using information from the dependency graph, see "[AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exporting-a-software-bill-of-materials-for-your-repository)."
- the REST API. For more information, see "[AUTOTITLE](/rest/dependency-graph/sboms)."
- {% data variables.product.prodname_actions %}. The following actions will generate an SBOM for your repository and attach it as a workflow artifact which you can download and use in other applications. For more information about downloading workflow artifacts, see "[AUTOTITLE](/actions/managing-workflow-runs/downloading-workflow-artifacts)." - {% data variables.product.prodname_actions %}. The following actions will generate an SBOM for your repository and attach it as a workflow artifact which you can download and use in other applications. For more information about downloading workflow artifacts, see "[AUTOTITLE](/actions/managing-workflow-runs/downloading-workflow-artifacts)."
{% else %} {% else %}
You can use {% data variables.product.prodname_actions %} to generate an SBOM. The following actions will generate an SBOM for your repository and attach it as a workflow artifact which you can download and use in other applications. For more information about downloading workflow artifacts, see "[AUTOTITLE](/actions/managing-workflow-runs/downloading-workflow-artifacts)." You can use {% data variables.product.prodname_actions %} to generate an SBOM. The following actions will generate an SBOM for your repository and attach it as a workflow artifact which you can download and use in other applications. For more information about downloading workflow artifacts, see "[AUTOTITLE](/actions/managing-workflow-runs/downloading-workflow-artifacts)."

View File

@@ -1,6 +1,6 @@
--- ---
title: About two-factor authentication and SAML single sign-on title: About two-factor authentication and SAML single sign-on
intro: Organizations administrators can enable both SAML single sign-on and two-factor authentication to add additional authentication measures for their organization members. intro: Organization owners can enable both SAML single sign-on and two-factor authentication to add additional authentication measures for their organization members.
redirect_from: redirect_from:
- /articles/about-two-factor-authentication-and-saml-single-sign-on - /articles/about-two-factor-authentication-and-saml-single-sign-on
- /github/setting-up-and-managing-organizations-and-teams/about-two-factor-authentication-and-saml-single-sign-on - /github/setting-up-and-managing-organizations-and-teams/about-two-factor-authentication-and-saml-single-sign-on
@@ -12,9 +12,9 @@ topics:
shortTitle: 2FA & SAML single sign-on shortTitle: 2FA & SAML single sign-on
--- ---
Two-factor authentication (2FA) provides basic authentication for organization members. By enabling 2FA, organization administrators limit the likelihood that a member's account on {% data variables.location.product_location %} could be compromised. For more information on 2FA, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication)." Two-factor authentication (2FA) provides basic authentication for organization members. By enabling 2FA, organization owners limit the likelihood that a member's account on {% data variables.location.product_location %} could be compromised. For more information on 2FA, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication)."
To add additional authentication measures, organization administrators can also [enable SAML single sign-on (SSO)](/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization) so that organization members must use single sign-on to access an organization. For more information on SAML SSO, see "[AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)." To add additional authentication measures, organization owners can also [enable SAML single sign-on (SSO)](/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization) so that organization members must use single sign-on to access an organization. For more information on SAML SSO, see "[AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)."
If both 2FA and SAML SSO are enabled, organization members must do the following: If both 2FA and SAML SSO are enabled, organization members must do the following:
- Use 2FA to log in to their account on {% data variables.location.product_location %} - Use 2FA to log in to their account on {% data variables.location.product_location %}

View File

@@ -1,6 +1,6 @@
--- ---
title: Granting access to your organization with SAML single sign-on title: Granting access to your organization with SAML single sign-on
intro: 'Organization administrators can grant access to their organization with SAML single sign-on. This access can be granted to organization members, bots, and service accounts.' intro: 'Organization owners can grant access to their organization with SAML single sign-on. This access can be granted to organization members, bots, and service accounts.'
redirect_from: redirect_from:
- /articles/granting-access-to-your-organization-with-saml-single-sign-on - /articles/granting-access-to-your-organization-with-saml-single-sign-on
- /github/setting-up-and-managing-organizations-and-teams/granting-access-to-your-organization-with-saml-single-sign-on - /github/setting-up-and-managing-organizations-and-teams/granting-access-to-your-organization-with-saml-single-sign-on
@@ -15,4 +15,3 @@ children:
- /about-two-factor-authentication-and-saml-single-sign-on - /about-two-factor-authentication-and-saml-single-sign-on
shortTitle: Grant access with SAML shortTitle: Grant access with SAML
--- ---

View File

@@ -384,9 +384,10 @@ For more information, see "[AUTOTITLE](/organizations/managing-organization-sett
| Action | Description | Action | Description
|------------------|------------------- |------------------|-------------------
| `create` | Triggered when a custom pattern is published for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-organization)." | `create` | Triggered when a custom pattern is created for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-organization)."
| `update` | Triggered when changes to a custom pattern are saved for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)."
| `delete` | Triggered when a custom pattern is removed from {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)." | `delete` | Triggered when a custom pattern is removed from {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)."
| `publish` | Triggered when changes to a custom pattern are published for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-an-organization)."
| `update` | Triggered when changes to a custom pattern are saved and a dry run is executed for {% data variables.product.prodname_secret_scanning %} in an organization. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)."
{% endif %} {% endif %}
@@ -601,9 +602,10 @@ For more information, see "[AUTOTITLE](/organizations/managing-organization-sett
| Action | Description | Action | Description
|------------------|------------------- |------------------|-------------------
| `create` | Triggered when a custom pattern is published for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-a-repository)." | `create` | Triggered when a custom pattern is created for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-a-repository)."
| `update` | Triggered when changes to a custom pattern are saved for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)."
| `delete` | Triggered when a custom pattern is removed from {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)." | `delete` | Triggered when a custom pattern is removed from {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#removing-a-custom-pattern)."
| `publish` | Triggered when a custom pattern is published for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#defining-a-custom-pattern-for-a-repository)."
| `update` | Triggered when changes to a custom pattern are saved and a dry run is executed for {% data variables.product.prodname_secret_scanning %} in a repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#editing-a-custom-pattern)."
{% endif %}{% ifversion secret-scanning-custom-pattern-push-protection-audit %} {% endif %}{% ifversion secret-scanning-custom-pattern-push-protection-audit %}

View File

@@ -1,6 +1,6 @@
--- ---
title: Managing organization settings title: Managing organization settings
intro: 'Organization administrators can change several settings, including the names of repositories that belong to the organization and Owners team membership. In addition, organization admins can delete the organization and all of its repositories.' intro: 'Organization owners can change several settings, including the names of repositories that belong to the organization and Owners team membership. In addition, organization owners can delete the organization and all of its repositories.'
redirect_from: redirect_from:
- /articles/managing-organization-settings - /articles/managing-organization-settings
- /github/setting-up-and-managing-organizations-and-teams/managing-organization-settings - /github/setting-up-and-managing-organizations-and-teams/managing-organization-settings

View File

@@ -70,7 +70,7 @@ To verify a domain, you must have access to modify domain records with your doma
{% data reusables.organizations.add-dns-txt-record %} {% data reusables.organizations.add-dns-txt-record %}
1. Wait for your DNS configuration to change, which may take up to 72 hours. You can confirm your DNS configuration has changed by running the `dig` command on the command line, replacing `ORGANIZATION` with the name of your organization and `example.com` with the domain you'd like to verify. You should see your new TXT record listed in the command output. 1. Wait for your DNS configuration to change, which may take up to 72 hours. You can confirm your DNS configuration has changed by running the `dig` command on the command line, replacing `ORGANIZATION` with the name of your organization and `example.com` with the domain you'd like to verify. You should see your new TXT record listed in the command output.
```shell ```shell
$ dig _github-challenge-ORGANIZATION.example.com +nostats +nocomments +nocmd TXT $ dig _github-challenge-ORGANIZATION-org.example.com +nostats +nocomments +nocmd TXT
``` ```
1. After confirming your TXT record is added to your DNS, follow steps one through three above to navigate to your organization's approved and verified domains. 1. After confirming your TXT record is added to your DNS, follow steps one through three above to navigate to your organization's approved and verified domains.
{% data reusables.organizations.continue-verifying-domain %} {% data reusables.organizations.continue-verifying-domain %}

View File

@@ -58,9 +58,9 @@ Billing managers are users who can manage the billing settings for your organiza
If your organization has a security team, you can use the security manager role to give members of the team the least access they need to the organization. For more information, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." If your organization has a security team, you can use the security manager role to give members of the team the least access they need to the organization. For more information, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
{% endif %} {% endif %}
### {% data variables.product.prodname_github_app %} managers ### {% data variables.product.prodname_github_app %} managers
By default, only organization owners can manage the settings of {% data variables.product.prodname_github_apps %} owned by an organization. To allow additional users to manage {% data variables.product.prodname_github_apps %} owned by an organization, an owner can grant them {% data variables.product.prodname_github_app %} manager permissions. By default, only organization owners can manage the settings of {% data variables.product.prodname_github_app %} registrations owned by an organization. To allow additional users to manage {% data variables.product.prodname_github_app %} registrations owned by an organization, an owner can grant them {% data variables.product.prodname_github_app %} manager permissions.
When you designate a user as a {% data variables.product.prodname_github_app %} manager in your organization, you can grant them access to manage the settings of some or all {% data variables.product.prodname_github_apps %} owned by the organization. The {% data variables.product.prodname_github_app %} manager role does not grant users access to install and uninstall {% data variables.product.prodname_github_apps %} on an organization. For more information, see "[AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/adding-and-removing-github-app-managers-in-your-organization)." When you designate a user as a {% data variables.product.prodname_github_app %} manager in your organization, you can grant them access to manage the settings of some or all {% data variables.product.prodname_github_app %} registrations owned by the organization. The {% data variables.product.prodname_github_app %} manager role does not grant users access to install and uninstall {% data variables.product.prodname_github_apps %} on an organization. For more information, see "[AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/adding-and-removing-github-app-managers-in-your-organization)."
### Outside collaborators ### Outside collaborators
To keep your organization's data secure while allowing access to repositories, you can add *outside collaborators*. {% data reusables.organizations.outside_collaborators_description %} To keep your organization's data secure while allowing access to repositories, you can add *outside collaborators*. {% data reusables.organizations.outside_collaborators_description %}

View File

@@ -22,7 +22,7 @@ When organization members create a {% data variables.product.pat_v2 %} to access
{% ifversion pat-v2-org-admin-api %} {% ifversion pat-v2-org-admin-api %}
Organization admins can also use the REST API to review and manage {% data variables.product.pat_v2 %} requests. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see "[AUTOTITLE](/rest/orgs/orgs#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens)." Organization owners can also use the REST API to review and manage {% data variables.product.pat_v2 %} requests. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see "[AUTOTITLE](/rest/orgs/orgs#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens)."
{% endif %} {% endif %}

View File

@@ -20,7 +20,7 @@ Organization owners can only view and revoke {% data variables.product.pat_v2 %}
{% ifversion pat-v2-org-admin-api %} {% ifversion pat-v2-org-admin-api %}
Organization admins can also use the REST API to review and revoke {% data variables.product.pat_v2 %}s. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see "[AUTOTITLE](/rest/orgs/orgs#list-fine-grained-personal-access-tokens-with-access-to-organization-resources)." Organization owners can also use the REST API to review and revoke {% data variables.product.pat_v2 %}s. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see "[AUTOTITLE](/rest/orgs/orgs#list-fine-grained-personal-access-tokens-with-access-to-organization-resources)."
{% endif %} {% endif %}

View File

@@ -1,6 +1,6 @@
--- ---
title: Accessing your organization if your identity provider is unavailable title: Accessing your organization if your identity provider is unavailable
intro: 'Organization administrators can sign into {% data variables.product.product_name %} even if their identity provider is unavailable by bypassing single sign-on and using their recovery codes.' intro: 'Organization owners can sign into {% data variables.product.product_name %} even if their identity provider is unavailable by bypassing single sign-on and using their recovery codes.'
redirect_from: redirect_from:
- /articles/accessing-your-organization-if-your-identity-provider-is-unavailable - /articles/accessing-your-organization-if-your-identity-provider-is-unavailable
- /github/setting-up-and-managing-organizations-and-teams/accessing-your-organization-if-your-identity-provider-is-unavailable - /github/setting-up-and-managing-organizations-and-teams/accessing-your-organization-if-your-identity-provider-is-unavailable
@@ -12,7 +12,7 @@ topics:
shortTitle: Unavailable identity provider shortTitle: Unavailable identity provider
--- ---
Organization administrators can use [one of their downloaded or saved recovery codes](/organizations/managing-saml-single-sign-on-for-your-organization/downloading-your-organizations-saml-single-sign-on-recovery-codes) to bypass single sign-on. You may have saved these to a password manager, such as [LastPass](https://lastpass.com/) or [1Password](https://1password.com/). Organization owners can use one of their downloaded or saved recovery codes to bypass single sign-on. You may have saved these to a password manager, such as [LastPass](https://lastpass.com/) or [1Password](https://1password.com/). For more information, see "[AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/downloading-your-organizations-saml-single-sign-on-recovery-codes)."
{% data reusables.saml.recovery-code-caveats %} {% data reusables.saml.recovery-code-caveats %}

View File

@@ -1,6 +1,6 @@
--- ---
title: Downloading your organization's SAML single sign-on recovery codes title: Downloading your organization's SAML single sign-on recovery codes
intro: 'Organization administrators should download their organization''s SAML single sign-on recovery codes to ensure that they can access {% data variables.product.product_name %} even if the identity provider for the organization is unavailable.' intro: 'Organization owners should download their organization''s SAML single sign-on recovery codes to ensure that they can access {% data variables.product.product_name %} even if the identity provider for the organization is unavailable.'
redirect_from: redirect_from:
- /articles/downloading-your-organization-s-saml-single-sign-on-recovery-codes - /articles/downloading-your-organization-s-saml-single-sign-on-recovery-codes
- /articles/downloading-your-organizations-saml-single-sign-on-recovery-codes - /articles/downloading-your-organizations-saml-single-sign-on-recovery-codes

View File

@@ -34,4 +34,4 @@ shortTitle: Create custom 404 page
## Further reading ## Further reading
- [Front matter](http://jekyllrb.com/docs/frontmatter) in the Jekyll documentation - [Front matter](https://jekyllrb.com/docs/frontmatter) in the Jekyll documentation

View File

@@ -33,7 +33,7 @@ shortTitle: GitHub Pages & Jekyll
Jekyll is a static site generator with built-in support for {% data variables.product.prodname_pages %} and a simplified build process. Jekyll takes Markdown and HTML files and creates a complete static website based on your choice of layouts. Jekyll supports Markdown and Liquid, a templating language that loads dynamic content on your site. For more information, see [Jekyll](https://jekyllrb.com/). Jekyll is a static site generator with built-in support for {% data variables.product.prodname_pages %} and a simplified build process. Jekyll takes Markdown and HTML files and creates a complete static website based on your choice of layouts. Jekyll supports Markdown and Liquid, a templating language that loads dynamic content on your site. For more information, see [Jekyll](https://jekyllrb.com/).
Jekyll is not officially supported for Windows. For more information, see "[Jekyll on Windows](http://jekyllrb.com/docs/windows/#installation)" in the Jekyll documentation. Jekyll is not officially supported for Windows. For more information, see "[Jekyll on Windows](https://jekyllrb.com/docs/windows/#installation)" in the Jekyll documentation.
We recommend using Jekyll with {% data variables.product.prodname_pages %}. If you prefer, you can use other static site generators or customize your own build process locally or on another server. For more information, see "[AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages#static-site-generators)." We recommend using Jekyll with {% data variables.product.prodname_pages %}. If you prefer, you can use other static site generators or customize your own build process locally or on another server. For more information, see "[AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages#static-site-generators)."
@@ -112,7 +112,7 @@ For a list of supported plugins, see "[Dependency versions](https://pages.github
To make your site easier to read, code snippets are highlighted on {% data variables.product.prodname_pages %} sites the same way they're highlighted on {% data variables.product.product_name %}. For more information about syntax highlighting on {% data variables.product.product_name %}, see "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)." To make your site easier to read, code snippets are highlighted on {% data variables.product.prodname_pages %} sites the same way they're highlighted on {% data variables.product.product_name %}. For more information about syntax highlighting on {% data variables.product.product_name %}, see "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)."
By default, code blocks on your site will be highlighted by Jekyll. Jekyll uses the [Rouge](https://github.com/jneen/rouge) highlighter, which is compatible with [Pygments](http://pygments.org/). Pygments has been deprecated and not supported in Jekyll 4. If you specify Pygments in your *_config.yml* file, Rouge will be used as the fallback instead. Jekyll cannot use any other syntax highlighter, and you'll get a page build warning if you specify another syntax highlighter in your *_config.yml* file. For more information, see "[AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-jekyll-build-errors-for-github-pages-sites)." By default, code blocks on your site will be highlighted by Jekyll. Jekyll uses the [Rouge](https://github.com/jneen/rouge) highlighter, which is compatible with [Pygments](https://pygments.org/). Pygments has been deprecated and not supported in Jekyll 4. If you specify Pygments in your *_config.yml* file, Rouge will be used as the fallback instead. Jekyll cannot use any other syntax highlighter, and you'll get a page build warning if you specify another syntax highlighter in your *_config.yml* file. For more information, see "[AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-jekyll-build-errors-for-github-pages-sites)."
If you want to use another highlighter, such as `highlight.js`, you must disable Jekyll's syntax highlighting by updating your project's *_config.yml* file. If you want to use another highlighter, such as `highlight.js`, you must disable Jekyll's syntax highlighting by updating your project's *_config.yml* file.

View File

@@ -68,4 +68,4 @@ Jekyll is an active open source project that is updated frequently. If the `gith
## Further reading ## Further reading
- [{% data variables.product.prodname_pages %}](http://jekyllrb.com/docs/github-pages/) in the Jekyll documentation - [{% data variables.product.prodname_pages %}](https://jekyllrb.com/docs/github-pages/) in the Jekyll documentation

View File

@@ -97,9 +97,9 @@ encoding: UTF-8
## Invalid highlighter language ## Invalid highlighter language
This error means that you specified any syntax highlighter other than [Rouge](https://github.com/jneen/rouge) or [Pygments](http://pygments.org/) in your configuration file. This error means that you specified any syntax highlighter other than [Rouge](https://github.com/jneen/rouge) or [Pygments](https://pygments.org/) in your configuration file.
To troubleshoot, update your *_config.yml* file to specify [Rouge](https://github.com/jneen/rouge) or [Pygments](http://pygments.org/). For more information, see "[AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#syntax-highlighting)." To troubleshoot, update your *_config.yml* file to specify [Rouge](https://github.com/jneen/rouge) or [Pygments](https://pygments.org/). For more information, see "[AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#syntax-highlighting)."
## Invalid post date ## Invalid post date

View File

@@ -56,7 +56,7 @@ gh pr checkout PULL-REQUEST
## Modifying an inactive pull request locally ## Modifying an inactive pull request locally
If a pull request's author is unresponsive to requests or has deleted their fork, the pull request can still be merged. However, if you want to make changes to a pull request and the author is not responding, you'll need to perform some additional steps to update the pull request. If a pull requests author is unresponsive to requests or has deleted their fork, the changes proposed in that pull request can still be merged via a new pull request. However, if you want to make changes to a pull request and the author is not responding, you'll need to perform some additional steps to update the pull request.
Once a pull request is opened, {% data variables.product.product_name %} stores all of the changes remotely. In other words, commits in a pull request are available in a repository even before the pull request is merged. You can fetch an open pull request and recreate it as your own. Once a pull request is opened, {% data variables.product.product_name %} stores all of the changes remotely. In other words, commits in a pull request are available in a repository even before the pull request is merged. You can fetch an open pull request and recreate it as your own.

View File

@@ -1,6 +1,7 @@
--- ---
title: About code owners title: About code owners
intro: You can use a CODEOWNERS file to define individuals or teams that are responsible for code in a repository. intro: You can use a CODEOWNERS file to define individuals or teams that are responsible for code in a repository.
permissions: 'People with write permissions for the repository can create or edit the CODEOWNERS file and be listed as code owners. People with admin or owner permissions can require that pull requests have to be approved by code owners before they can be merged.'
redirect_from: redirect_from:
- /articles/about-codeowners - /articles/about-codeowners
- /articles/about-code-owners - /articles/about-code-owners
@@ -15,8 +16,6 @@ versions:
topics: topics:
- Repositories - Repositories
--- ---
People with admin or owner permissions can set up a CODEOWNERS file in a repository.
The people you choose as code owners must have write permissions for the repository. When the code owner is a team, that team must be visible and it must have write permissions, even if all the individual members of the team already have write permissions directly, through organization membership, or through another team membership. The people you choose as code owners must have write permissions for the repository. When the code owner is a team, that team must be visible and it must have write permissions, even if all the individual members of the team already have write permissions directly, through organization membership, or through another team membership.
## About code owners ## About code owners

View File

@@ -16,7 +16,7 @@ shortTitle: Install Git LFS
{% mac %} {% mac %}
1. Navigate to [git-lfs.github.com](https://git-lfs.github.com) and click **Download**. Alternatively, you can install {% data variables.large_files.product_name_short %} using a package manager: 1. Navigate to [git-lfs.github.com](https://git-lfs.github.com) and click **Download**. Alternatively, you can install {% data variables.large_files.product_name_short %} using a package manager:
- To use [Homebrew](http://brew.sh/), run `brew install git-lfs`. - To use [Homebrew](https://brew.sh/), run `brew install git-lfs`.
- To use [MacPorts](https://www.macports.org/), run `port install git-lfs`. - To use [MacPorts](https://www.macports.org/), run `port install git-lfs`.
If you install {% data variables.large_files.product_name_short %} with Homebrew or MacPorts, skip to step six. If you install {% data variables.large_files.product_name_short %} with Homebrew or MacPorts, skip to step six.

View File

@@ -17,7 +17,7 @@ children:
autogenerated: rest autogenerated: rest
--- ---
You can create apps that perform continuous integration, code linting, or code scanning services and provide detailed feedback on commits. For more information, see "[AUTOTITLE](/rest/guides/using-the-rest-api-to-interact-with-checks)" and "[AUTOTITLE](/apps/creating-github-apps/guides/creating-ci-tests-with-the-checks-api)." You can create apps that perform continuous integration, code linting, or code scanning services and provide detailed feedback on commits. For more information, see "[AUTOTITLE](/rest/guides/using-the-rest-api-to-interact-with-checks)" and "[AUTOTITLE](/apps/creating-github-apps/writing-code-for-a-github-app/creating-ci-tests-with-the-checks-api)."
<!-- Content after this section is automatically generated --> <!-- Content after this section is automatically generated -->

View File

@@ -10,5 +10,8 @@ topics:
autogenerated: rest autogenerated: rest
allowTitleToDifferFromFilename: true allowTitleToDifferFromFilename: true
--- ---
{% data reusables.dependency-graph.sbom-export %}
This article gives details about the REST API endpoint.
<!-- Content after this section is automatically generated --> <!-- Content after this section is automatically generated -->

View File

@@ -21,7 +21,9 @@ The REST API for searching items has a custom rate limit that is separate from t
* The `core` object provides your rate limit status for all non-search-related resources in the REST API. * The `core` object provides your rate limit status for all non-search-related resources in the REST API.
* The `search` object provides your rate limit status for the REST API for searching. * The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[AUTOTITLE](/rest/search)."
* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[AUTOTITLE](/rest/search#search-code)."
* The `graphql` object provides your rate limit status for the GraphQL API. * The `graphql` object provides your rate limit status for the GraphQL API.

View File

@@ -112,4 +112,30 @@ def verify_signature(payload_body, secret_token, signature_header):
raise HTTPException(status_code=403, detail="Request signatures didn't match!") raise HTTPException(status_code=403, detail="Request signatures didn't match!")
``` ```
### Typescript example
For example, you can define the following `verify_signature` function and call it when you receive a webhook payload:
```javascript{:copy}
import * as crypto from "crypto";
const WEBHOOK_SECRET: string = process.env.WEBHOOK_SECRET;
const verify_signature = (req: Request) => {
const signature = crypto
.createHmac("sha256", WEBHOOK_SECRET)
.update(JSON.stringify(req.body))
.digest("hex");
return `sha256=${signature}` === req.headers.get("x-hub-signature-256");
};
const handleWebhook = (req: Request, res: Response) => {
if (!verify_signature(req)) {
res.status(401).send("Unauthorized");
return;
}
// The rest of your logic here
};
```
[secure_compare]: https://rubydoc.info/github/rack/rack/main/Rack/Utils:secure_compare [secure_compare]: https://rubydoc.info/github/rack/rack/main/Rack/Utils:secure_compare

View File

@@ -157,10 +157,9 @@ If you must use footnotes:
## Headers ## Headers
Headers must adequately describe the content under it. Follow the same guidelines we use for writing titles. Each header on a page must be unique. Headers must adequately describe the content under them. Follow the same guidelines we use for writing titles. Each header on a page must be unique.
Use H2 for headers, and H3 for subheaders. If the article has headers, the headers must start with an H2 level header and cannot skip header levels. There must be content between a header and subheader, such as an introduction. When referring to headers, surround the header name with quotation marks. Use H2 for headers, and H3 for subheaders. If the article has headers, the headers must start with an H2 level header and cannot skip header levels. There must be content between a header and subheader, such as an introduction. When referring to headers, surround the header name with quotation marks.
- **Use:** Under "User licenses," view your total licenses.
For more information, see the [content model](/contributing/content-model.md#titles). For more information, see the [content model](/contributing/content-model.md#titles).
@@ -180,7 +179,7 @@ Every image must include alt text providing a textual equivalent of the visual i
- Don't start with "Image..." or "Graphic...". Screen readers say this automatically. - Don't start with "Image..." or "Graphic...". Screen readers say this automatically.
- Do begin with the _type_ of graphic: "Screenshot of..." or "Diagram that shows..." - Do begin with the _type_ of graphic: "Screenshot of..." or "Diagram that shows..."
- Follow standard language used to describe UI elements in article text. - Follow standard language used to describe UI elements in article text.
- Put multi-word titles, e.g. names of menu items, in double quotation marks (""). - Put multi-word titles, e.g. names of menu items, in double quotation marks (""). When using punctuation after multi-word titles, place it outside of the quotation marks so that the string in quotation marks exactly matches the title as it appears in context.
- If an area of the image is visually highlighted, describe how. This enables screen-reader users to understand and describe to a sighted friend/colleague what to look for from a visual language standpoint. - If an area of the image is visually highlighted, describe how. This enables screen-reader users to understand and describe to a sighted friend/colleague what to look for from a visual language standpoint.
#### Alt text for screenshots #### Alt text for screenshots
@@ -198,15 +197,15 @@ Alt text provides a short description of a screenshot's content to benefit peopl
- Use a variable for the word `GitHub` as we do in running copy: `{% data variables.product.prodname_dotcom %}` - Use a variable for the word `GitHub` as we do in running copy: `{% data variables.product.prodname_dotcom %}`
- Describe UI elements consistently with written documentation. - Describe UI elements consistently with written documentation.
- Be flexible with word order when needed for clarity. - Be flexible with word order when needed for clarity.
- For example, write "Screenshot of the Debug menu in Visual Studio Code..." rather than "Screenshot of the Visual Studio Code Debug menu...," to avoid multiple nouns in a row. - For example, write "Screenshot of the Debug menu in Visual Studio Code..." rather than "Screenshot of the Visual Studio Code Debug menu..." to avoid multiple nouns in a row.
##### Examples ##### Examples
> Screenshot of the {% data variables.product.prodname_dotcom %} committers by repository table. The horizontal kebab icon and "Download CSV report" button are outlined in dark orange. > Screenshot of the {% data variables.product.prodname_dotcom %} committers by repository table. The horizontal kebab icon and "Download CSV report" button are outlined in dark orange.
> Screenshot of file options in a {% data variables.product.prodname_dotcom %} repository. A button with an arrow indicating a dropdown menu, labeled "Code," is outlined in dark orange. > Screenshot of file options in a {% data variables.product.prodname_dotcom %} repository. A button with an arrow indicating a dropdown menu, labeled "Code", is outlined in dark orange.
![Screenshot of file options in a GitHub repository. A button with an arrow indicating a dropdown menu, labeled "Code," is outlined in dark orange.](./images/repository-code-button.png) ![Screenshot of file options in a GitHub repository. A button with an arrow indicating a dropdown menu, labeled "Code", is outlined in dark orange.](./images/repository-code-button.png)
#### Alt text for diagrams and graphs #### Alt text for diagrams and graphs
@@ -609,7 +608,10 @@ For more information about GitHub's personal access tokens, see "[Creating a per
## Punctuation ## Punctuation
Follow standard American English punctuation rules. For more guidance, see “[Punctuation](https://docs.microsoft.com/style-guide/punctuation)” in the Microsoft Style Guide. When referencing a UI element in quotation marks, place any subsequent punctuation outside of the quotation marks so that the label in quotation marks exactly matches the UI.
- **Use:** Under "User licenses", view your total licenses.
Otherwise, follow standard American English punctuation rules. For more guidance, see “[Punctuation](https://docs.microsoft.com/style-guide/punctuation)” in the Microsoft Style Guide.
## Release notes ## Release notes
@@ -624,6 +626,7 @@ Each release note in a set describes one of the following changes.
- [Bug fixes](#bug-fixes): fixes to flaws or unexpected behavior - [Bug fixes](#bug-fixes): fixes to flaws or unexpected behavior
- [Changes](#changes): notable changes to past behavior - [Changes](#changes): notable changes to past behavior
- [Deprecations](#deprecations): removal of a feature or behavior - [Deprecations](#deprecations): removal of a feature or behavior
- [Errata](#errata): correction to inaccurate release note or documentation
You can also review guidelines for updating release notes in [Adding or updating a release note](#adding-or-updating-a-release-note). You can also review guidelines for updating release notes in [Adding or updating a release note](#adding-or-updating-a-release-note).
@@ -785,9 +788,30 @@ A release note for a deprecation answers the following questions.
- > Commit comments, which are comments that users add directly to a commit outside of a pull request, no longer appear in the pull request timeline. Users could not reply to or resolve these comments. The Timeline events REST API and the GraphQL API's `PullRequest` object also no longer return commit comments. - > Commit comments, which are comments that users add directly to a commit outside of a pull request, no longer appear in the pull request timeline. Users could not reply to or resolve these comments. The Timeline events REST API and the GraphQL API's `PullRequest` object also no longer return commit comments.
### Errata
Errata corrects inaccurate information previously published in the release notes or documentation for a release.
#### Writing errata
Errata answers the following questions.
1. If applicable, which section of the release notes or content on GitHub Docs was affected?
1. Did the incorrect information apply to me, with my role or access?
1. What did the release note or documentation describe that was incorrect?
1. When was the errata published?
> _CONTENT_ (**1**) incorrectly indicated that _AUDIENCE_ (**2**) can _SUMMARY OF INACCURATE INFORMATION_ (**3**). [Updated: _PUBLICATION DATE_ **4**]
- Format the publication date according to the guidance in [Adding or updating a release note](#adding-or-updating-a-release-note).
#### Example of errata
- > "[Features]()" incorrectly indicated that users of the GitHub Advisory Database can see advisories for Elixir, Erlang's Hex package manager, and more. This feature is unavailable in GitHub Enterprise Server 3.7, and will be available in a future release. [Updated 2023-06-01]
### Adding or updating a release note ### Adding or updating a release note
If you add or update an individual release note after initial publication, to signal to readers that the note has changed, append a datestamp in the format "[Updated: YYYY-MM-DD]". To signal to readers that you've added or changed a note, or to indicate the publication date of errata, append a datestamp in the format "[Updated: YYYY-MM-DD]".
## Reusables and variables ## Reusables and variables
Use reusable strings for individual nouns (e.g. product names) or for complete sentences or paragraphs. Sentence fragments and phrases should not be contained in reusable strings as they can cause problems when content is localized. For more information, see the [data directory](../data) in the github/docs repository and the “[Product names](#product-names)” section of this document. Use reusable strings for individual nouns (e.g. product names) or for complete sentences or paragraphs. Sentence fragments and phrases should not be contained in reusable strings as they can cause problems when content is localized. For more information, see the [data directory](../data) in the github/docs repository and the “[Product names](#product-names)” section of this document.

View File

@@ -0,0 +1,6 @@
# Issue 9102 and a Hubber-contirbution PR /docs-internal/pull/36758
# Documentation for single-use registration tokens and just-in-time runners
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.10'

View File

@@ -313,3 +313,6 @@ sections:
backups: backups:
- '{% data variables.product.prodname_ghe_server %} 3.4 requires at least [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).' - '{% data variables.product.prodname_ghe_server %} 3.4 requires at least [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).'
errata:
- '{% data reusables.release-notes.github-actions-secrets-encryption-docs %}'

View File

@@ -406,7 +406,6 @@ sections:
- | - |
MinIO has announced the removal of the MinIO Gateways starting June 1st, 2022. While MinIO Gateway for NAS continues to be one of the supported storage providers for Github Actions and Github Packages, we recommend moving to MinIO LTS support to avail support and bug fixes from MinIO. For more information about rate limits, see "[Scheduled removal of MinIO Gateway for GCS, Azure, HDFS in the minio/minio repository](https://github.com/minio/minio/issues/14331)." MinIO has announced the removal of the MinIO Gateways starting June 1st, 2022. While MinIO Gateway for NAS continues to be one of the supported storage providers for Github Actions and Github Packages, we recommend moving to MinIO LTS support to avail support and bug fixes from MinIO. For more information about rate limits, see "[Scheduled removal of MinIO Gateway for GCS, Azure, HDFS in the minio/minio repository](https://github.com/minio/minio/issues/14331)."
deprecations: deprecations:
- heading: Change to the format of authentication tokens affects GitHub Connect - heading: Change to the format of authentication tokens affects GitHub Connect
notes: notes:
@@ -446,3 +445,6 @@ sections:
- | - |
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
- '{% data reusables.release-notes.babeld-max-threads-performance-issue %}' - '{% data reusables.release-notes.babeld-max-threads-performance-issue %}'
errata:
- '{% data reusables.release-notes.github-actions-secrets-encryption-docs %}'

View File

@@ -322,3 +322,6 @@ sections:
{% data reusables.ssh.rsa-sha-1-connection-failure-criteria %} {% data reusables.ssh.rsa-sha-1-connection-failure-criteria %}
You can adjust the cutoff date. For more information, see "[Configuring SSH connections to your instance](/admin/configuration/configuring-your-enterprise/configuring-ssh-connections-to-your-instance)." [Updated: 2023-01-31] You can adjust the cutoff date. For more information, see "[Configuring SSH connections to your instance](/admin/configuration/configuring-your-enterprise/configuring-ssh-connections-to-your-instance)." [Updated: 2023-01-31]
errata:
- '{% data reusables.release-notes.github-actions-secrets-encryption-docs %}'

View File

@@ -372,6 +372,8 @@ sections:
Package registries on the new GitHub Packages architecture, including Container registry and npm packages, no longer expose data through the GraphQL API. In a coming release, other GitHub Packages registries will migrate to the new architecture, which will deprecate the GraphQL API for those registries as well. Package registries on the new GitHub Packages architecture, including Container registry and npm packages, no longer expose data through the GraphQL API. In a coming release, other GitHub Packages registries will migrate to the new architecture, which will deprecate the GraphQL API for those registries as well.
errata: errata:
- '{% data reusables.release-notes.github-actions-secrets-encryption-docs %}'
# https://github.com/github/releases/issues/2042 # https://github.com/github/releases/issues/2042
- | - |
"[Features](#3.7.0-features)" incorrectly indicated that users of the GitHub Advisory Database can see advisories for Elixir, Erlang's Hex package manager, and more. This feature is unavailable in GitHub Enterprise Server 3.7, and will be available in a future release. [Updated 2023-06-01] "[Features](#3.7.0-features)" incorrectly indicated that users of the GitHub Advisory Database can see advisories for Elixir, Erlang's Hex package manager, and more. This feature is unavailable in GitHub Enterprise Server 3.7, and will be available in a future release. [Updated 2023-06-01]

View File

@@ -476,3 +476,6 @@ sections:
# https://github.com/github/releases/issues/2621 # https://github.com/github/releases/issues/2621
- | - |
For integrators who wish to receive webhooks for Dependabot alerts activity, the `dependabot_alert` webhook replaces the `repository_vulnerability_alert` webhook. For more information, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot_alert)." For integrators who wish to receive webhooks for Dependabot alerts activity, the `dependabot_alert` webhook replaces the `repository_vulnerability_alert` webhook. For more information, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot_alert)."
errata:
- '{% data reusables.release-notes.github-actions-secrets-encryption-docs %}'

View File

@@ -0,0 +1 @@
Just-in-time (JIT) runners can only run a single job. If JIT runners never run a job, they will automatically be removed. To remove a JIT runner before automatic removal, you can remove it you must remove the JIT runner on {% data variables.location.product_location %}.

View File

@@ -1,6 +1,6 @@
{%- ifversion fpt or ghec or ghes > 3.6 %} {% ifversion fpt or ghec or ghes > 3.6 %}
A self-hosted runner is automatically removed from {% data variables.product.product_name %} if it has not connected to {% data variables.product.prodname_actions %} for more than 14 days. A self-hosted runner is automatically removed from {% data variables.product.product_name %} if it has not connected to {% data variables.product.prodname_actions %} for more than 14 days. An ephemeral self-hosted runner is automatically removed from {% data variables.product.product_name %} if it has not connected to {% data variables.product.prodname_actions %} for more than 1 day.
An ephemeral self-hosted runner is automatically removed from {% data variables.product.product_name %} if it has not connected to {% data variables.product.prodname_actions %} for more than 1 day.
{%- elsif ghae or ghes < 3.7 %} {% elsif ghae or ghes < 3.7 %}
A self-hosted runner is automatically removed from {% data variables.product.product_name %} if it has not connected to {% data variables.product.prodname_actions %} for more than 30 days. A self-hosted runner is automatically removed from {% data variables.product.product_name %} if it has not connected to {% data variables.product.prodname_actions %} for more than 30 days.
{%- endif %} {% endif %}

View File

@@ -1,3 +1,3 @@
Organization owners can designate other users in their organization as {% data variables.product.prodname_github_app %} managers. {% data variables.product.prodname_github_app %} managers can manage the settings of some or all of the {% data variables.product.prodname_github_apps %} that are owned by the organization. The {% data variables.product.prodname_github_app %} manager role does not grant users access to install and uninstall {% data variables.product.prodname_github_apps %} on an organization. For more information about the specific app settings that a {% data variables.product.prodname_github_app %} manager can control, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)." Organization owners can designate other users in their organization as {% data variables.product.prodname_github_app %} managers. {% data variables.product.prodname_github_app %} managers can manage the settings of some or all of the {% data variables.product.prodname_github_app %} registrations that are owned by the organization. The {% data variables.product.prodname_github_app %} manager role does not grant users access to install and uninstall {% data variables.product.prodname_github_apps %} on an organization. For more information about the specific app settings that a {% data variables.product.prodname_github_app %} manager can control, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app)."
For more information about {% data variables.product.prodname_github_app %} manager permissions, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#github-app-managers)." For more information about {% data variables.product.prodname_github_app %} manager permissions, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#github-app-managers)."

View File

@@ -1 +1 @@
{% ifversion fpt or ghec %}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.{% endif %} {% ifversion fpt or ghec %}A user or organization can register up to 100 {% data variables.product.prodname_github_apps %}, but there is no limit to how many {% data variables.product.prodname_github_app %}s can be installed on an account.{% endif %}

View File

@@ -1 +1 @@
The specific webhook events that you can select in your app settings are determined by the type of permissions you selected for your app. You will first need to select the permissions you would like your app to have, and then you can subscribe your app to webhook events that are related to that set of permissions. The specific webhook events that you can select for your {% data variables.product.prodname_github_app %} registration are determined by the type of permissions you selected for your app. You will first need to select the permissions you would like your app to have, and then you can subscribe your app to webhook events that are related to that set of permissions.

Some files were not shown because too many files have changed in this diff Show More