diff --git a/.github/workflows/azure-preview-env-deploy-public.yml b/.github/workflows/azure-preview-env-deploy-public.yml index 76434c4f7516..cb571374edd2 100644 --- a/.github/workflows/azure-preview-env-deploy-public.yml +++ b/.github/workflows/azure-preview-env-deploy-public.yml @@ -123,6 +123,7 @@ jobs: uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: . + file: Dockerfile.azure push: true target: preview tags: ${{ env.DOCKER_IMAGE }} diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index 2b9c192d8d90..63e42e4c0a27 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -174,6 +174,7 @@ jobs: uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: . + file: Dockerfile.azure push: true target: ${{ steps.with-translations.outputs.result == 'true' && 'production' || 'preview' }} tags: ${{ env.DOCKER_IMAGE }} diff --git a/.github/workflows/azure-prod-build-deploy.yml b/.github/workflows/azure-prod-build-deploy.yml index 5e92839d62a7..7e5e27bea77e 100644 --- a/.github/workflows/azure-prod-build-deploy.yml +++ b/.github/workflows/azure-prod-build-deploy.yml @@ -104,6 +104,7 @@ jobs: uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: . + file: Dockerfile.azure push: true target: production tags: ${{ env.DOCKER_IMAGE }}, ${{ env.DOCKER_IMAGE_CACHE_REF }} diff --git a/.github/workflows/azure-staging-build-deploy.yml b/.github/workflows/azure-staging-build-deploy.yml index a44648095a4f..24cf895746c9 100644 --- a/.github/workflows/azure-staging-build-deploy.yml +++ b/.github/workflows/azure-staging-build-deploy.yml @@ -94,6 +94,7 @@ jobs: uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: . + file: Dockerfile.azure push: true target: production tags: ${{ env.DOCKER_IMAGE }} diff --git a/.github/workflows/main-preview-docker-cache.yml b/.github/workflows/main-preview-docker-cache.yml index db137ac78113..35c386a16d1b 100644 --- a/.github/workflows/main-preview-docker-cache.yml +++ b/.github/workflows/main-preview-docker-cache.yml @@ -71,6 +71,7 @@ jobs: uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: . + file: Dockerfile.azure push: true target: preview tags: ${{ env.DOCKER_IMAGE_CACHE_REF }} diff --git a/.github/workflows/moda-ci.yaml b/.github/workflows/moda-ci.yaml index 0545be426c12..728104707fe5 100644 --- a/.github/workflows/moda-ci.yaml +++ b/.github/workflows/moda-ci.yaml @@ -12,9 +12,33 @@ on: types: [checks_requested] jobs: + ########################## + # Generate Vault keys + ########################## + set-vault-keys: + runs-on: ubuntu-latest + outputs: + modified_vault_keys: ${{ steps.modify_vault_keys.outputs.modified }} + steps: + - name: Set vault-keys output + id: modify_vault_keys + run: | + if [ -z "${{ vars.VAULT_KEYS }}" ]; then + # We want to add the DOCS_BOT_PAT_READPUBLICKEY to the list of keys + # so that builds fetch the secret from the docs-internal vault + # where --environment is "ci" + echo "modified=DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT + else + echo "modified=${{ vars.VAULT_KEYS }},DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT + fi + + ############# + # Moda jobs + ############# moda-config-bundle: if: ${{ github.repository == 'github/docs-internal' }} name: ${{ matrix.ci_job.job }} + needs: set-vault-keys strategy: fail-fast: false matrix: @@ -22,14 +46,18 @@ jobs: uses: github/internal-actions/.github/workflows/moda.yml@main with: ci-formatted-job-name: ${{ matrix.ci_job.job }} - vault-keys: ${{ vars.VAULT_KEYS }} + vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }} secrets: dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }} datadog-api-key: ${{ secrets.DATADOG_API_KEY }} + ############# + # Docker Image jobs + ############# docker-image: if: ${{ github.repository == 'github/docs-internal' }} name: ${{ matrix.ci_job.job }} + needs: set-vault-keys strategy: fail-fast: false matrix: @@ -37,14 +65,20 @@ jobs: uses: github/internal-actions/.github/workflows/kube.yml@main with: ci-formatted-job-name: ${{ matrix.ci_job.job }} - vault-keys: ${{ vars.VAULT_KEYS }} + vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }} + # Passes 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to docker as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src= + docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY' secrets: dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }} datadog-api-key: ${{ secrets.DATADOG_API_KEY }} + ############# + # Docker Security jobs + ############# docker-security: if: ${{ github.repository == 'github/docs-internal' }} name: ${{ matrix.ci_job.job }} + needs: set-vault-keys strategy: fail-fast: false matrix: @@ -52,7 +86,9 @@ jobs: uses: github/internal-actions/.github/workflows/docker_security.yml@main with: ci-formatted-job-name: ${{ matrix.ci_job.job }} - vault-keys: ${{ vars.VAULT_KEYS }} + vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }} + # Passes 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to docker as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src= + docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY' secrets: dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }} datadog-api-key: ${{ secrets.DATADOG_API_KEY }} diff --git a/Dockerfile b/Dockerfile index dd9033bb3752..8f9101ffe6a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -# This Dockerfile is used for docker-based deployments to Azure for both preview environments and production +# This Dockerfile is used solely for production deployments to Moda +# For staging deployments, see src/deployments/staging/Dockerfile +# For building this file locally, see src/deployments/production/README.md # -------------------------------------------------------------------------------- # BASE IMAGE @@ -9,104 +11,150 @@ FROM node:22-alpine@sha256:c13b26e7e602ef2f1074aef304ce6e9b7dd284c419b35d89fcf3c # This directory is owned by the node user ARG APP_HOME=/home/node/app - -# Make sure we don't run anything as the root user -USER node - +RUN mkdir -p $APP_HOME && chown -R node:node $APP_HOME WORKDIR $APP_HOME +# Switch to root to ensure we have permissions to copy, chmod, and install +USER root -# --------------- -# ALL DEPS -# --------------- -FROM base AS all_deps +# Install git for cloning docs-early-access & translations repos +# Install curl for determining the early access branch +RUN apk add --no-cache git curl -COPY --chown=node:node package.json package-lock.json ./ +# Copy in build scripts +COPY src/deployments/production/build-scripts/*.sh ./build-scripts/ -RUN npm ci --no-optional --registry https://registry.npmjs.org/ +# Make scripts executable +RUN chmod +x build-scripts/*.sh -# For Next.js v12+ -# This the appropriate necessary extra for node:VERSION-alpine -# Other options are https://www.npmjs.com/search?q=%40next%2Fswc -RUN npm i @next/swc-linux-x64-musl --no-save || npm i @next/swc-linux-arm64-musl --no-save +# We need to copy over content that will be merged with early-access +COPY content ./content +COPY assets ./assets +COPY data ./data +# Use the mounted --secret to: +# - 1. Fetch the docs-internal repo +# - 2. Fetch the docs-early-access repo & override docs-internal with early access content +# - 3. Fetch each translations repo to the repo/translations directory +# We use --mount-type=secret to avoid the secret being copied into the image layers for security +# The secret passed via --secret can only be used in this RUN command +RUN --mount=type=secret,id=DOCS_BOT_PAT_READPUBLICKEY \ + # We don't cache because Docker can't know if we need to fetch new content from remote repos + echo "Don't cache this step by printing date: $(date)" && \ + . ./build-scripts/fetch-repos.sh + +# Give node user access to the copied content since we cloned as root +RUN chown -R node:node $APP_HOME/content +RUN chown -R node:node $APP_HOME/assets +RUN chown -R node:node $APP_HOME/data +# Give node user access to translations repos +RUN chown -R node:node $APP_HOME/translations + +# Change back to node to make sure we don't run anything as the root user +USER node # --------------- -# PROD DEPS +# ALL DEPS Image # --------------- -FROM all_deps AS prod_deps +FROM base AS all_deps -RUN npm prune --production +ARG APP_HOME=/home/node/app +USER node +WORKDIR $APP_HOME + +# Copy what is needed to run npm ci +COPY --chown=node:node package.json package-lock.json ./ +RUN npm ci --no-optional --registry https://registry.npmjs.org/ # --------------- -# BUILDER +# BUILDER Image # --------------- FROM all_deps AS builder -COPY src ./src -# The star is because it's an optional directory -COPY .remotejson-cache* ./.remotejson-cache -# The star is because it's an optional file -COPY .pageinfo-cache.json.br* ./.pageinfo-cache.json.br -# Certain content is necessary for being able to build -COPY content/index.md ./content/index.md -COPY content/rest ./content/rest -COPY data ./data +ARG APP_HOME=/home/node/app +USER node +WORKDIR $APP_HOME -COPY next.config.js ./next.config.js -COPY tsconfig.json ./tsconfig.json +# Copy what is needed to: +# 1. Build the app +# 2. run warmup-remotejson script +# 3. run precompute-pageinfo script +# Dependencies +COPY --chown=node:node --from=all_deps $APP_HOME/node_modules $APP_HOME/node_modules +# Content with merged early-access content +COPY --chown=node:node --from=base $APP_HOME/data ./data +COPY --chown=node:node --from=base $APP_HOME/assets ./assets +COPY --chown=node:node --from=base $APP_HOME/content ./content +# Source code +COPY --chown=node:node --from=all_deps $APP_HOME/package.json ./ +COPY src ./src +COPY next.config.js ./ +COPY tsconfig.json ./ +# 1. Build RUN npm run build +# 2. Warm up the remotejson cache +RUN npm run warmup-remotejson + +# 3. Precompute the pageinfo cache +RUN npm run precompute-pageinfo -- --max-versions 2 + +# Prune deps for prod image +RUN npm prune --production + # -------------------------------------------------------------------------------- -# PREVIEW IMAGE - no translations +# PRODUCTION IMAGE # -------------------------------------------------------------------------------- +FROM base AS production -FROM base AS preview +ARG APP_HOME=/home/node/app +USER node +WORKDIR $APP_HOME -# Copy just prod dependencies -COPY --chown=node:node --from=prod_deps $APP_HOME/node_modules $APP_HOME/node_modules +# Copy the content with merged early-access content +COPY --chown=node:node --from=base $APP_HOME/data ./data +COPY --chown=node:node --from=base $APP_HOME/assets ./assets +COPY --chown=node:node --from=base $APP_HOME/content ./content -# Copy our front-end code -COPY --chown=node:node --from=builder $APP_HOME/.next $APP_HOME/.next +# Include cloned translations +COPY --chown=node:node --from=base $APP_HOME/translations ./translations -# We should always be running in production mode -ENV NODE_ENV=production +# Copy prod dependencies +COPY --chown=node:node --from=builder $APP_HOME/package.json ./ +COPY --chown=node:node --from=builder $APP_HOME/node_modules $APP_HOME/node_modules -# Preferred port for server.js -ENV PORT=4000 +# Copy built artifacts needed at runtime for the server +COPY --chown=node:node --from=builder $APP_HOME/.next $APP_HOME/.next -ENV ENABLED_LANGUAGES="en" +# Copy cache files generated during build scripts +COPY --chown=node:node --from=builder $APP_HOME/.remotejson-cache ./.remotejson-cache +COPY --chown=node:node --from=builder $APP_HOME/.pageinfo-cache.json.br* ./.pageinfo-cache.json.br +# Copy only what's needed to run the server +COPY --chown=node:node --from=builder $APP_HOME/src ./src +COPY --chown=node:node --from=builder $APP_HOME/.remotejson-cache ./.remotejson-cache +COPY --chown=node:node --from=builder $APP_HOME/.pageinfo-cache.json.br* ./.pageinfo-cache.json.br +COPY --chown=node:node --from=builder $APP_HOME/next.config.js ./ +COPY --chown=node:node --from=builder $APP_HOME/tsconfig.json ./ + +# - - - +# Environment variables +# - - - # This makes it possible to set `--build-arg BUILD_SHA=abc123` # and it then becomes available as an environment variable in the docker run. ARG BUILD_SHA ENV BUILD_SHA=$BUILD_SHA - -# Copy only what's needed to run the server -COPY --chown=node:node package.json ./ -COPY --chown=node:node assets ./assets -COPY --chown=node:node content ./content -COPY --chown=node:node src ./src -COPY --chown=node:node .remotejson-cache* ./.remotejson-cache -COPY --chown=node:node .pageinfo-cache.json.br* ./.pageinfo-cache.json.br -COPY --chown=node:node data ./data -COPY --chown=node:node next.config.js ./ -COPY --chown=node:node tsconfig.json ./ +# We should always be running in production mode +ENV NODE_ENV=production +# Preferred port for server.js +ENV PORT=4000 +# Include all languages +ENV ENABLED_LANGUAGES="en,zh,es,pt,ru,ja,fr,de,ko" EXPOSE $PORT +# Entrypoint to start the server +# Note: Currently we have to use tsx because we have a mix of `.ts` and `.js` files with multiple import patterns CMD ["node_modules/.bin/tsx", "src/frame/server.ts"] - -# -------------------------------------------------------------------------------- -# PRODUCTION IMAGE - includes all translations -# -------------------------------------------------------------------------------- -FROM preview AS production - -# Override what was set for previews -# Make this match the default of `Object.keys(languages)` in src/languages/lib/languages.js -ENV ENABLED_LANGUAGES "en,zh,es,pt,ru,ja,fr,de,ko" - -# Copy in all translations -COPY --chown=node:node translations ./translations diff --git a/Dockerfile.azure b/Dockerfile.azure new file mode 100644 index 000000000000..dd9033bb3752 --- /dev/null +++ b/Dockerfile.azure @@ -0,0 +1,112 @@ +# This Dockerfile is used for docker-based deployments to Azure for both preview environments and production + +# -------------------------------------------------------------------------------- +# BASE IMAGE +# -------------------------------------------------------------------------------- +# To update the sha, run `docker pull node:$VERSION-alpine` +# look for something like: `Digest: sha256:0123456789abcdef` +FROM node:22-alpine@sha256:c13b26e7e602ef2f1074aef304ce6e9b7dd284c419b35d89fcf3cc8e44a8def9 AS base + +# This directory is owned by the node user +ARG APP_HOME=/home/node/app + +# Make sure we don't run anything as the root user +USER node + +WORKDIR $APP_HOME + + +# --------------- +# ALL DEPS +# --------------- +FROM base AS all_deps + +COPY --chown=node:node package.json package-lock.json ./ + +RUN npm ci --no-optional --registry https://registry.npmjs.org/ + +# For Next.js v12+ +# This the appropriate necessary extra for node:VERSION-alpine +# Other options are https://www.npmjs.com/search?q=%40next%2Fswc +RUN npm i @next/swc-linux-x64-musl --no-save || npm i @next/swc-linux-arm64-musl --no-save + + +# --------------- +# PROD DEPS +# --------------- +FROM all_deps AS prod_deps + +RUN npm prune --production + + +# --------------- +# BUILDER +# --------------- +FROM all_deps AS builder + +COPY src ./src +# The star is because it's an optional directory +COPY .remotejson-cache* ./.remotejson-cache +# The star is because it's an optional file +COPY .pageinfo-cache.json.br* ./.pageinfo-cache.json.br +# Certain content is necessary for being able to build +COPY content/index.md ./content/index.md +COPY content/rest ./content/rest +COPY data ./data + +COPY next.config.js ./next.config.js +COPY tsconfig.json ./tsconfig.json + +RUN npm run build + +# -------------------------------------------------------------------------------- +# PREVIEW IMAGE - no translations +# -------------------------------------------------------------------------------- + +FROM base AS preview + +# Copy just prod dependencies +COPY --chown=node:node --from=prod_deps $APP_HOME/node_modules $APP_HOME/node_modules + +# Copy our front-end code +COPY --chown=node:node --from=builder $APP_HOME/.next $APP_HOME/.next + +# We should always be running in production mode +ENV NODE_ENV=production + +# Preferred port for server.js +ENV PORT=4000 + +ENV ENABLED_LANGUAGES="en" + +# This makes it possible to set `--build-arg BUILD_SHA=abc123` +# and it then becomes available as an environment variable in the docker run. +ARG BUILD_SHA +ENV BUILD_SHA=$BUILD_SHA + +# Copy only what's needed to run the server +COPY --chown=node:node package.json ./ +COPY --chown=node:node assets ./assets +COPY --chown=node:node content ./content +COPY --chown=node:node src ./src +COPY --chown=node:node .remotejson-cache* ./.remotejson-cache +COPY --chown=node:node .pageinfo-cache.json.br* ./.pageinfo-cache.json.br +COPY --chown=node:node data ./data +COPY --chown=node:node next.config.js ./ +COPY --chown=node:node tsconfig.json ./ + +EXPOSE $PORT + +CMD ["node_modules/.bin/tsx", "src/frame/server.ts"] + +# -------------------------------------------------------------------------------- +# PRODUCTION IMAGE - includes all translations +# -------------------------------------------------------------------------------- +FROM preview AS production + +# Override what was set for previews +# Make this match the default of `Object.keys(languages)` in src/languages/lib/languages.js +ENV ENABLED_LANGUAGES "en,zh,es,pt,ru,ja,fr,de,ko" + +# Copy in all translations +COPY --chown=node:node translations ./translations diff --git a/content/rest/enterprise-admin/index.md b/content/rest/enterprise-admin/index.md index d23c654713e2..75b0432ca632 100644 --- a/content/rest/enterprise-admin/index.md +++ b/content/rest/enterprise-admin/index.md @@ -29,6 +29,7 @@ children: - /pre-receive-environments - /pre-receive-hooks - /repo-pre-receive-hooks + - /rules - /scim - /users autogenerated: rest diff --git a/content/rest/enterprise-admin/rules.md b/content/rest/enterprise-admin/rules.md new file mode 100644 index 000000000000..3bbde801dbc5 --- /dev/null +++ b/content/rest/enterprise-admin/rules.md @@ -0,0 +1,13 @@ +--- +title: REST API endpoints for rules +shortTitle: Rules +intro: Use the REST API to manage rulesets for an enterprise. Rulesets control how people can interact with repositories and code. +versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 + ghec: '*' +topics: + - API +autogenerated: rest +allowTitleToDifferFromFilename: true +--- + + diff --git a/src/deployments/README.md b/src/deployments/README.md new file mode 100644 index 000000000000..d3564bbcf966 --- /dev/null +++ b/src/deployments/README.md @@ -0,0 +1,6 @@ +# Deployments + +Documentation and build files for our deployments. + +- For production deploys: [src/deployments/production](./production/) +- For staging deploys (includes review servers): [src/deployments/staging](./staging/) diff --git a/src/deployments/production/README.md b/src/deployments/production/README.md new file mode 100644 index 000000000000..12892b0dde88 --- /dev/null +++ b/src/deployments/production/README.md @@ -0,0 +1,31 @@ +# Production deploys + +For internal Docs relating to our production deploys see [TODO Docs-Engineering URL] + +## Auto deploys + +Pushing to `main` on `docs-internal` will automatically kick off a deploy to production. + +The status of deployments are posted in the `#docs-ops` Slack channel. + +## Building & running the production image locally + +Build the production Docker image locally, + +```bash +docker build -t docs:latest . --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=<(echo "") +``` + +Where `` must be a PAT with `contents: read` access to: + +1. `docs-internal.` for every `` translation repo +2. `docs-early-access` + +Run the built image, + +```bash +docker run -p 4000:4000 docs:latest +``` + +> [!NOTE] +> We require `DOCKER_BUILDKIT=1` to support passing `--secret` to the Dockerfile which allows us to clone private repos at build time. This is done in Moda via the `docker-build-env-secrets` argument in the [.github/workflows/moda-ci.yaml](../../.github/workflows/moda-ci.yaml) workflow. \ No newline at end of file diff --git a/src/deployments/production/build-scripts/clone-or-use-cached-repo.sh b/src/deployments/production/build-scripts/clone-or-use-cached-repo.sh new file mode 100644 index 000000000000..b7742c3d5ea2 --- /dev/null +++ b/src/deployments/production/build-scripts/clone-or-use-cached-repo.sh @@ -0,0 +1,37 @@ +set -e + +# We use this function to use the cached version of the repo if it exists from +# a previous Dockerfile build. Otherwise, we clone the repo and check out the +# specified branch/SHA. +# Arguments: +# $1 - Repository name (for directory naming) +# $2 - Repository URL +# $3 - Branch to clone +clone_or_use_cached_repo() { + repo_name="$1" + repo_url="$2" + branch="$3" + + echo "Processing repository '$repo_name'..." + + if [ -d "$repo_name/.git" ]; then + echo "Repository '$repo_name' already exists. Fetching updates..." + cd "$repo_name" + + # Fetch latest changes + git fetch origin "$branch" + git checkout "$branch" + git pull origin "$branch" + + echo "Updated repository '$repo_name' with the latest changes from $branch." + + cd .. + else + echo "Cloning repository '$repo_name' from branch '$branch'..." + + # We only need the most recent change for production deploys, so we use --depth 1 + git clone --depth 1 --branch "$branch" "https://${GITHUB_TOKEN}@github.com/github/$repo_url.git" "$repo_name" + fi + + echo "Repository '$repo_name' is up to date." +} \ No newline at end of file diff --git a/src/deployments/production/build-scripts/fetch-repos.sh b/src/deployments/production/build-scripts/fetch-repos.sh new file mode 100644 index 000000000000..42cd81164c2b --- /dev/null +++ b/src/deployments/production/build-scripts/fetch-repos.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env sh + +# +# This script is intended to be called from the production Dockerfile +# Though it isn't working with all of the files from docs-internal (it only COPYs what is needed), +# it is useful to think of these scripts running from the root of the docs-internal repo. +# + +# Fetches and resolves docs-internal, early-access, and translations repos +echo "Fetching and resolving early-access, and translations repos" + +# Exit immediately if a command exits with a non-zero status +set -e + +# Import the clone_or_use_cached_repo function +. ./build-scripts/clone-or-use-cached-repo.sh + +# Set the GITHUB_TOKEN environment variable from the mounted --secret passed to Docker build +GITHUB_TOKEN=$(cat /run/secrets/DOCS_BOT_PAT_READPUBLICKEY) + +# - - - - - - - - - - +# Early access +# - - - - - - - - - - +echo "Fetching early access..." +clone_or_use_cached_repo "docs-early-access" "docs-early-access" "main" +echo "Merging early access..." +. ./build-scripts/merge-early-access.sh + +# - - - - - - - - - - +# Clone the translations repos +# - - - - - - - - - - +# Make sure to clone each translation repo into the `translations` directory inside the root of docs-internal (the Dockerfile's WORKDIR) +mkdir -p translations +cd translations + +# Iterate over each language +echo "Fetching translations..." +for lang in "zh-cn" "es-es" "pt-br" "ru-ru" "ja-jp" "fr-fr" "de-de" "ko-kr" +do + translations_repo="docs-internal.$lang" + clone_or_use_cached_repo "$lang" "$translations_repo" "main" +done +echo "Done fetching translations." + +# Go back to the root of the docs-internal repo +cd .. + +# - - - - - - - - - - +# Cleanup +# - - - - - - - - - - +# Delete GITHUB_TOKEN from the environment +unset GITHUB_TOKEN \ No newline at end of file diff --git a/src/deployments/production/build-scripts/merge-early-access.sh b/src/deployments/production/build-scripts/merge-early-access.sh new file mode 100755 index 000000000000..b7e711b1660c --- /dev/null +++ b/src/deployments/production/build-scripts/merge-early-access.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +# Takes docs-early-access files and merges them into docs-internal +# Assumed that it is being run from the root of the docs-internal repo + +mv docs-early-access/assets/images assets/images/early-access +mv docs-early-access/content content/early-access +mv docs-early-access/data data/early-access diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json index a5bae1302ea2..a64bc443a5ad 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json @@ -2458,6 +2458,30 @@ "verb": "delete", "requestPath": "/enterprises/{enterprise}/properties/schema/{custom_property_name}" }, + { + "slug": "create-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "post", + "requestPath": "/enterprises/{enterprise}/rulesets" + }, + { + "slug": "get-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, + { + "slug": "update-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "put", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, + { + "slug": "delete-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "delete", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, { "slug": "get-github-actions-billing-for-an-enterprise", "subcategory": "billing", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json index 56810d0c6d36..90c9dec1c58d 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json @@ -2186,6 +2186,30 @@ "verb": "delete", "requestPath": "/enterprises/{enterprise}/properties/schema/{custom_property_name}" }, + { + "slug": "create-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "post", + "requestPath": "/enterprises/{enterprise}/rulesets" + }, + { + "slug": "get-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, + { + "slug": "update-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "put", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, + { + "slug": "delete-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "delete", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, { "slug": "get-github-actions-billing-for-an-enterprise", "subcategory": "billing", diff --git a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json index a5bae1302ea2..a64bc443a5ad 100644 --- a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json @@ -2458,6 +2458,30 @@ "verb": "delete", "requestPath": "/enterprises/{enterprise}/properties/schema/{custom_property_name}" }, + { + "slug": "create-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "post", + "requestPath": "/enterprises/{enterprise}/rulesets" + }, + { + "slug": "get-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, + { + "slug": "update-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "put", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, + { + "slug": "delete-an-enterprise-repository-ruleset", + "subcategory": "rules", + "verb": "delete", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}" + }, { "slug": "get-github-actions-billing-for-an-enterprise", "subcategory": "billing", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index f789ea239d77..aa3a59c183dc 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "4ab8513682637010cd3bb5d8ee3227cc5ce739d1" + "sha": "17a74203d23fd26f4c3510dc91713d248169bdd1" } \ No newline at end of file diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index 0d8776d16920..9f83fccf81d3 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -223502,14 +223502,14 @@ { "serverUrl": "https://api.github.com", "verb": "get", - "requestPath": "/enterprises/{enterprise}/copilot/metrics", - "title": "Get Copilot metrics for an enterprise", + "requestPath": "/orgs/{org}/copilot/metrics", + "title": "Get Copilot metrics for an organization", "category": "copilot", "subcategory": "copilot-metrics", "parameters": [ { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", + "name": "org", + "description": "

The organization name. The name is not case sensitive.

", "in": "path", "required": true, "schema": { @@ -223555,12 +223555,15 @@ ], "bodyParameters": [], "progAccess": { - "userToServerRest": false, - "serverToServer": false, - "fineGrainedPat": false, + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, "permissions": [ { - "\"Enterprise administration\" business permissions": "read" + "\"GitHub Copilot Business\" organization permissions": "read" + }, + { + "\"Administration\" organization permissions": "read" } ] }, @@ -223571,7 +223574,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "parameters": { - "enterprise": "ENTERPRISE" + "org": "ORG" } }, "response": { @@ -224054,7 +224057,7 @@ } ], "previews": [], - "descriptionHTML": "

Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.

\n

The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

To access this endpoint, the Copilot Metrics API access policy must be enabled or set to \"no policy\" for the enterprise within GitHub settings.\nOnly enterprise owners and billing managers can view Copilot metrics for the enterprise.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

", + "descriptionHTML": "

Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.

\n

Note

\n

\nThis endpoint will only return results for a given day if the organization contained five or more members with active Copilot licenses on that day, as evaluated at the end of that day.

\n
\n

The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.\nOnly organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot, read:org, or read:enterprise scopes to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "200", @@ -224081,14 +224084,14 @@ { "serverUrl": "https://api.github.com", "verb": "get", - "requestPath": "/enterprises/{enterprise}/team/{team_slug}/copilot/metrics", - "title": "Get Copilot metrics for an enterprise team", + "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics", + "title": "Get Copilot metrics for a team", "category": "copilot", "subcategory": "copilot-metrics", "parameters": [ { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", + "name": "org", + "description": "

The organization name. The name is not case sensitive.

", "in": "path", "required": true, "schema": { @@ -224097,7 +224100,7 @@ }, { "name": "team_slug", - "description": "

The slug of the enterprise team name.

", + "description": "

The slug of the team name.

", "in": "path", "required": true, "schema": { @@ -224143,12 +224146,15 @@ ], "bodyParameters": [], "progAccess": { - "userToServerRest": false, - "serverToServer": false, - "fineGrainedPat": false, + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, "permissions": [ { - "\"Enterprise administration\" business permissions": "read" + "\"GitHub Copilot Business\" organization permissions": "read" + }, + { + "\"Administration\" organization permissions": "read" } ] }, @@ -224159,7 +224165,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "parameters": { - "enterprise": "ENTERPRISE", + "org": "ORG", "team_slug": "TEAM_SLUG" } }, @@ -224643,7 +224649,7 @@ } ], "previews": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See \"About enterprise accounts for Copilot Business.\"

\n
\n

Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.

\n

The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

Note

\n

\nThis endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses on that day, as evaluated at the end of that day.

\n
\n

To access this endpoint, the Copilot Metrics API access policy must be enabled or set to \"no policy\" for the enterprise within GitHub settings.\nOnly owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

", + "descriptionHTML": "

Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.

\n

Note

\n

\nThis endpoint will only return results for a given day if the team had five or more members with active Copilot licenses on that day, as evaluated at the end of that day.

\n
\n

The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.\nOnly organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot, read:org, or read:enterprise scopes to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "200", @@ -224666,2065 +224672,315 @@ "description": "

Internal Error

" } ] + } + ], + "copilot-usage": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/copilot/usage", + "title": "Get a summary of Copilot usage for organization members", + "category": "copilot", + "subcategory": "copilot-usage", + "parameters": [ + { + "name": "org", + "description": "

The organization name. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "

Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Maximum value is 28 days ago.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "until", + "description": "

Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) and should not preceed the since date if it is passed.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "description": "

The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "

The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"

", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"GitHub Copilot Business\" organization permissions": "read" + }, + { + "\"Administration\" organization permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": [ + { + "day": "2023-10-15", + "total_suggestions_count": 1000, + "total_acceptances_count": 800, + "total_lines_suggested": 1800, + "total_lines_accepted": 1200, + "total_active_users": 10, + "total_chat_acceptances": 32, + "total_chat_turns": 200, + "total_active_chat_users": 4, + "breakdown": [ + { + "language": "python", + "editor": "vscode", + "suggestions_count": 300, + "acceptances_count": 250, + "lines_suggested": 900, + "lines_accepted": 700, + "active_users": 5 + }, + { + "language": "python", + "editor": "jetbrains", + "suggestions_count": 300, + "acceptances_count": 200, + "lines_suggested": 400, + "lines_accepted": 300, + "active_users": 2 + }, + { + "language": "ruby", + "editor": "vscode", + "suggestions_count": 400, + "acceptances_count": 350, + "lines_suggested": 500, + "lines_accepted": 200, + "active_users": 3 + } + ] + }, + { + "day": "2023-10-16", + "total_suggestions_count": 800, + "total_acceptances_count": 600, + "total_lines_suggested": 1100, + "total_lines_accepted": 700, + "total_active_users": 12, + "total_chat_acceptances": 57, + "total_chat_turns": 426, + "total_active_chat_users": 8, + "breakdown": [ + { + "language": "python", + "editor": "vscode", + "suggestions_count": 300, + "acceptances_count": 200, + "lines_suggested": 600, + "lines_accepted": 300, + "active_users": 2 + }, + { + "language": "python", + "editor": "jetbrains", + "suggestions_count": 300, + "acceptances_count": 150, + "lines_suggested": 300, + "lines_accepted": 250, + "active_users": 6 + }, + { + "language": "ruby", + "editor": "vscode", + "suggestions_count": 200, + "acceptances_count": 150, + "lines_suggested": 200, + "lines_accepted": 150, + "active_users": 3 + } + ] + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Summary of Copilot usage.", + "type": "object", + "properties": { + "day": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are reported, in `YYYY-MM-DD` format." + }, + "total_suggestions_count": { + "type": "integer", + "description": "The total number of Copilot code completion suggestions shown to users." + }, + "total_acceptances_count": { + "type": "integer", + "description": "The total number of Copilot code completion suggestions accepted by users." + }, + "total_lines_suggested": { + "type": "integer", + "description": "The total number of lines of code completions suggested by Copilot." + }, + "total_lines_accepted": { + "type": "integer", + "description": "The total number of lines of code completions accepted by users." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of users who were shown Copilot code completion suggestions during the day specified." + }, + "total_chat_acceptances": { + "type": "integer", + "description": "The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline)." + }, + "total_chat_turns": { + "type": "integer", + "description": "The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE." + }, + "total_active_chat_users": { + "type": "integer", + "description": "The total number of users who interacted with Copilot Chat in the IDE during the day specified." + }, + "breakdown": { + "type": [ + "array", + "null" + ], + "description": "Breakdown of Copilot code completions usage by language and editor", + "items": { + "type": "object", + "description": "Breakdown of Copilot usage by editor for this language", + "additionalProperties": true, + "properties": { + "language": { + "type": "string", + "description": "The language in which Copilot suggestions were shown to users in the specified editor." + }, + "editor": { + "type": "string", + "description": "The editor in which Copilot suggestions were shown to users for the specified language." + }, + "suggestions_count": { + "type": "integer", + "description": "The number of Copilot suggestions shown to users in the editor specified during the day specified." + }, + "acceptances_count": { + "type": "integer", + "description": "The number of Copilot suggestions accepted by users in the editor specified during the day specified." + }, + "lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot in the editor specified during the day specified." + }, + "lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted by users in the editor specified during the day specified." + }, + "active_users": { + "type": "integer", + "description": "The number of users who were shown Copilot completion suggestions in the editor specified during the day specified." + } + } + } + } + }, + "required": [ + "day", + "breakdown" + ], + "additionalProperties": false + } + } + } + } + ], + "previews": [], + "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE\nacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.\nSee the response schema tab for detailed metrics definitions.

\n

The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot, read:org, or read:enterprise scopes to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

OK

" + }, + { + "httpStatusCode": "401", + "description": "

Requires authentication

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + } + ] }, { "serverUrl": "https://api.github.com", "verb": "get", - "requestPath": "/orgs/{org}/copilot/metrics", - "title": "Get Copilot metrics for an organization", + "requestPath": "/orgs/{org}/team/{team_slug}/copilot/usage", + "title": "Get a summary of Copilot usage for a team", "category": "copilot", - "subcategory": "copilot-metrics", + "subcategory": "copilot-usage", "parameters": [ { "name": "org", "description": "

The organization name. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "since", - "description": "

Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Maximum value is 28 days ago.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "until", - "description": "

Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) and should not preceed the since date if it is passed.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "description": "

The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "per_page", - "description": "

The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 28 - } - } - ], - "bodyParameters": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"GitHub Copilot Business\" organization permissions": "read" - }, - { - "\"Administration\" organization permissions": "read" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": [ - { - "date": "2024-06-24", - "total_active_users": 24, - "total_engaged_users": 20, - "copilot_ide_code_completions": { - "total_engaged_users": 20, - "languages": [ - { - "name": "python", - "total_engaged_users": 10 - }, - { - "name": "ruby", - "total_engaged_users": 10 - } - ], - "editors": [ - { - "name": "vscode", - "total_engaged_users": 13, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_engaged_users": 13, - "languages": [ - { - "name": "python", - "total_engaged_users": 6, - "total_code_suggestions": 249, - "total_code_acceptances": 123, - "total_code_lines_suggested": 225, - "total_code_lines_accepted": 135 - }, - { - "name": "ruby", - "total_engaged_users": 7, - "total_code_suggestions": 496, - "total_code_acceptances": 253, - "total_code_lines_suggested": 520, - "total_code_lines_accepted": 270 - } - ] - } - ] - }, - { - "name": "neovim", - "total_engaged_users": 7, - "models": [ - { - "name": "a-custom-model", - "is_custom_model": true, - "custom_model_training_date": "2024-02-01", - "languages": [ - { - "name": "typescript", - "total_engaged_users": 3, - "total_code_suggestions": 112, - "total_code_acceptances": 56, - "total_code_lines_suggested": 143, - "total_code_lines_accepted": 61 - }, - { - "name": "go", - "total_engaged_users": 4, - "total_code_suggestions": 132, - "total_code_acceptances": 67, - "total_code_lines_suggested": 154, - "total_code_lines_accepted": 72 - } - ] - } - ] - } - ] - }, - "copilot_ide_chat": { - "total_engaged_users": 13, - "editors": [ - { - "name": "vscode", - "total_engaged_users": 13, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_engaged_users": 12, - "total_chats": 45, - "total_chat_insertion_events": 12, - "total_chat_copy_events": 16 - }, - { - "name": "a-custom-model", - "is_custom_model": true, - "custom_model_training_date": "2024-02-01", - "total_engaged_users": 1, - "total_chats": 10, - "total_chat_insertion_events": 11, - "total_chat_copy_events": 3 - } - ] - } - ] - }, - "copilot_dotcom_chat": { - "total_engaged_users": 14, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_engaged_users": 14, - "total_chats": 38 - } - ] - }, - "copilot_dotcom_pull_requests": { - "total_engaged_users": 12, - "repositories": [ - { - "name": "demo/repo1", - "total_engaged_users": 8, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_pr_summaries_created": 6, - "total_engaged_users": 8 - } - ] - }, - { - "name": "demo/repo2", - "total_engaged_users": 4, - "models": [ - { - "name": "a-custom-model", - "is_custom_model": true, - "custom_model_training_date": "2024-02-01", - "total_pr_summaries_created": 10, - "total_engaged_users": 4 - } - ] - } - ] - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Copilot Usage Metrics", - "description": "Copilot usage metrics for a given day.", - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date", - "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." - }, - "total_active_users": { - "type": "integer", - "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." - }, - "total_engaged_users": { - "type": "integer", - "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." - }, - "copilot_ide_code_completions": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot editor code completions in the IDE.", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." - }, - "languages": { - "type": "array", - "description": "Code completion metrics for active languages.", - "items": { - "type": "object", - "description": "Usage metrics for a given language for the given editor for Copilot code completions.", - "properties": { - "name": { - "type": "string", - "description": "Name of the language used for Copilot code completion suggestions." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." - } - } - } - }, - "editors": { - "type": "array", - "items": { - "type": "object", - "description": "Copilot code completion metrics for active editors.", - "additionalProperties": true, - "properties": { - "name": { - "type": "string", - "description": "Name of the given editor." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." - }, - "models": { - "type": "array", - "description": "List of model metrics for custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." - }, - "languages": { - "type": "array", - "description": "Code completion metrics for active languages, for the given editor.", - "items": { - "type": "object", - "description": "Usage metrics for a given language for the given editor for Copilot code completions.", - "properties": { - "name": { - "type": "string", - "description": "Name of the language used for Copilot code completion suggestions, for the given editor." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." - }, - "total_code_suggestions": { - "type": "integer", - "description": "The number of Copilot code suggestions generated for the given editor, for the given language." - }, - "total_code_acceptances": { - "type": "integer", - "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." - }, - "total_code_lines_suggested": { - "type": "integer", - "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." - }, - "total_code_lines_accepted": { - "type": "integer", - "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." - } - } - } - } - } - } - } - } - } - } - } - }, - "copilot_ide_chat": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot Chat in the IDE.", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "Total number of users who prompted Copilot Chat in the IDE." - }, - "editors": { - "type": "array", - "items": { - "type": "object", - "description": "Copilot Chat metrics, for active editors.", - "properties": { - "name": { - "type": "string", - "description": "Name of the given editor." - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who prompted Copilot Chat in the specified editor." - }, - "models": { - "type": "array", - "description": "List of model metrics for custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model." - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who prompted Copilot Chat in the given editor and model." - }, - "total_chats": { - "type": "integer", - "description": "The total number of chats initiated by users in the given editor and model." - }, - "total_chat_insertion_events": { - "type": "integer", - "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." - }, - "total_chat_copy_events": { - "type": "integer", - "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." - } - } - } - } - } - } - } - } - }, - "copilot_dotcom_chat": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot Chat in github.com", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "Total number of users who prompted Copilot Chat on github.com at least once." - }, - "models": { - "type": "array", - "description": "List of model metrics for a custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model (if applicable)." - }, - "total_engaged_users": { - "type": "integer", - "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." - }, - "total_chats": { - "type": "integer", - "description": "Total number of chats initiated by users on github.com." - } - } - } - } - } - }, - "copilot_dotcom_pull_requests": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot for pull requests.", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." - }, - "repositories": { - "type": "array", - "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Repository name" - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." - }, - "models": { - "type": "array", - "description": "List of model metrics for custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model." - }, - "total_pr_summaries_created": { - "type": "integer", - "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." - } - } - } - } - } - } - } - } - } - }, - "required": [ - "date" - ], - "additionalProperties": true - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.

\n

Note

\n

\nThis endpoint will only return results for a given day if the organization contained five or more members with active Copilot licenses on that day, as evaluated at the end of that day.

\n
\n

The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.\nOnly organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot, read:org, or read:enterprise scopes to use this endpoint.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Copilot Usage Merics API setting is disabled at the organization or enterprise level.

" - }, - { - "httpStatusCode": "500", - "description": "

Internal Error

" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics", - "title": "Get Copilot metrics for a team", - "category": "copilot", - "subcategory": "copilot-metrics", - "parameters": [ - { - "name": "org", - "description": "

The organization name. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

The slug of the team name.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "since", - "description": "

Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Maximum value is 28 days ago.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "until", - "description": "

Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) and should not preceed the since date if it is passed.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "description": "

The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "per_page", - "description": "

The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 28 - } - } - ], - "bodyParameters": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"GitHub Copilot Business\" organization permissions": "read" - }, - { - "\"Administration\" organization permissions": "read" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": [ - { - "date": "2024-06-24", - "total_active_users": 24, - "total_engaged_users": 20, - "copilot_ide_code_completions": { - "total_engaged_users": 20, - "languages": [ - { - "name": "python", - "total_engaged_users": 10 - }, - { - "name": "ruby", - "total_engaged_users": 10 - } - ], - "editors": [ - { - "name": "vscode", - "total_engaged_users": 13, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_engaged_users": 13, - "languages": [ - { - "name": "python", - "total_engaged_users": 6, - "total_code_suggestions": 249, - "total_code_acceptances": 123, - "total_code_lines_suggested": 225, - "total_code_lines_accepted": 135 - }, - { - "name": "ruby", - "total_engaged_users": 7, - "total_code_suggestions": 496, - "total_code_acceptances": 253, - "total_code_lines_suggested": 520, - "total_code_lines_accepted": 270 - } - ] - } - ] - }, - { - "name": "neovim", - "total_engaged_users": 7, - "models": [ - { - "name": "a-custom-model", - "is_custom_model": true, - "custom_model_training_date": "2024-02-01", - "languages": [ - { - "name": "typescript", - "total_engaged_users": 3, - "total_code_suggestions": 112, - "total_code_acceptances": 56, - "total_code_lines_suggested": 143, - "total_code_lines_accepted": 61 - }, - { - "name": "go", - "total_engaged_users": 4, - "total_code_suggestions": 132, - "total_code_acceptances": 67, - "total_code_lines_suggested": 154, - "total_code_lines_accepted": 72 - } - ] - } - ] - } - ] - }, - "copilot_ide_chat": { - "total_engaged_users": 13, - "editors": [ - { - "name": "vscode", - "total_engaged_users": 13, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_engaged_users": 12, - "total_chats": 45, - "total_chat_insertion_events": 12, - "total_chat_copy_events": 16 - }, - { - "name": "a-custom-model", - "is_custom_model": true, - "custom_model_training_date": "2024-02-01", - "total_engaged_users": 1, - "total_chats": 10, - "total_chat_insertion_events": 11, - "total_chat_copy_events": 3 - } - ] - } - ] - }, - "copilot_dotcom_chat": { - "total_engaged_users": 14, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_engaged_users": 14, - "total_chats": 38 - } - ] - }, - "copilot_dotcom_pull_requests": { - "total_engaged_users": 12, - "repositories": [ - { - "name": "demo/repo1", - "total_engaged_users": 8, - "models": [ - { - "name": "default", - "is_custom_model": false, - "custom_model_training_date": null, - "total_pr_summaries_created": 6, - "total_engaged_users": 8 - } - ] - }, - { - "name": "demo/repo2", - "total_engaged_users": 4, - "models": [ - { - "name": "a-custom-model", - "is_custom_model": true, - "custom_model_training_date": "2024-02-01", - "total_pr_summaries_created": 10, - "total_engaged_users": 4 - } - ] - } - ] - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Copilot Usage Metrics", - "description": "Copilot usage metrics for a given day.", - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date", - "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." - }, - "total_active_users": { - "type": "integer", - "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." - }, - "total_engaged_users": { - "type": "integer", - "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." - }, - "copilot_ide_code_completions": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot editor code completions in the IDE.", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." - }, - "languages": { - "type": "array", - "description": "Code completion metrics for active languages.", - "items": { - "type": "object", - "description": "Usage metrics for a given language for the given editor for Copilot code completions.", - "properties": { - "name": { - "type": "string", - "description": "Name of the language used for Copilot code completion suggestions." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." - } - } - } - }, - "editors": { - "type": "array", - "items": { - "type": "object", - "description": "Copilot code completion metrics for active editors.", - "additionalProperties": true, - "properties": { - "name": { - "type": "string", - "description": "Name of the given editor." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." - }, - "models": { - "type": "array", - "description": "List of model metrics for custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." - }, - "languages": { - "type": "array", - "description": "Code completion metrics for active languages, for the given editor.", - "items": { - "type": "object", - "description": "Usage metrics for a given language for the given editor for Copilot code completions.", - "properties": { - "name": { - "type": "string", - "description": "Name of the language used for Copilot code completion suggestions, for the given editor." - }, - "total_engaged_users": { - "type": "integer", - "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." - }, - "total_code_suggestions": { - "type": "integer", - "description": "The number of Copilot code suggestions generated for the given editor, for the given language." - }, - "total_code_acceptances": { - "type": "integer", - "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." - }, - "total_code_lines_suggested": { - "type": "integer", - "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." - }, - "total_code_lines_accepted": { - "type": "integer", - "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." - } - } - } - } - } - } - } - } - } - } - } - }, - "copilot_ide_chat": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot Chat in the IDE.", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "Total number of users who prompted Copilot Chat in the IDE." - }, - "editors": { - "type": "array", - "items": { - "type": "object", - "description": "Copilot Chat metrics, for active editors.", - "properties": { - "name": { - "type": "string", - "description": "Name of the given editor." - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who prompted Copilot Chat in the specified editor." - }, - "models": { - "type": "array", - "description": "List of model metrics for custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model." - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who prompted Copilot Chat in the given editor and model." - }, - "total_chats": { - "type": "integer", - "description": "The total number of chats initiated by users in the given editor and model." - }, - "total_chat_insertion_events": { - "type": "integer", - "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." - }, - "total_chat_copy_events": { - "type": "integer", - "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." - } - } - } - } - } - } - } - } - }, - "copilot_dotcom_chat": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot Chat in github.com", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "Total number of users who prompted Copilot Chat on github.com at least once." - }, - "models": { - "type": "array", - "description": "List of model metrics for a custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model (if applicable)." - }, - "total_engaged_users": { - "type": "integer", - "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." - }, - "total_chats": { - "type": "integer", - "description": "Total number of chats initiated by users on github.com." - } - } - } - } - } - }, - "copilot_dotcom_pull_requests": { - "type": [ - "object", - "null" - ], - "description": "Usage metrics for Copilot for pull requests.", - "additionalProperties": true, - "properties": { - "total_engaged_users": { - "type": "integer", - "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." - }, - "repositories": { - "type": "array", - "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Repository name" - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." - }, - "models": { - "type": "array", - "description": "List of model metrics for custom models and the default model.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'." - }, - "is_custom_model": { - "type": "boolean", - "description": "Indicates whether a model is custom or default." - }, - "custom_model_training_date": { - "type": [ - "string", - "null" - ], - "description": "The training date for the custom model." - }, - "total_pr_summaries_created": { - "type": "integer", - "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." - }, - "total_engaged_users": { - "type": "integer", - "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." - } - } - } - } - } - } - } - } - } - }, - "required": [ - "date" - ], - "additionalProperties": true - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.

\n

Note

\n

\nThis endpoint will only return results for a given day if the team had five or more members with active Copilot licenses on that day, as evaluated at the end of that day.

\n
\n

The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.\nOnly organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot, read:org, or read:enterprise scopes to use this endpoint.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Copilot Usage Merics API setting is disabled at the organization or enterprise level.

" - }, - { - "httpStatusCode": "500", - "description": "

Internal Error

" - } - ] - } - ], - "copilot-usage": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/enterprises/{enterprise}/copilot/usage", - "title": "Get a summary of Copilot usage for enterprise members", - "category": "copilot", - "subcategory": "copilot-usage", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "since", - "description": "

Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Maximum value is 28 days ago.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "until", - "description": "

Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) and should not preceed the since date if it is passed.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "description": "

The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "per_page", - "description": "

The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 28 - } - } - ], - "bodyParameters": [], - "progAccess": { - "userToServerRest": false, - "serverToServer": false, - "fineGrainedPat": false, - "permissions": [ - { - "\"Enterprise administration\" business permissions": "read" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "enterprise": "ENTERPRISE" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": [ - { - "day": "2023-10-15", - "total_suggestions_count": 5000, - "total_acceptances_count": 3000, - "total_lines_suggested": 7000, - "total_lines_accepted": 3500, - "total_active_users": 15, - "total_chat_acceptances": 45, - "total_chat_turns": 350, - "total_active_chat_users": 8, - "breakdown": [ - { - "language": "python", - "editor": "vscode", - "suggestions_count": 3000, - "acceptances_count": 2000, - "lines_suggested": 3000, - "lines_accepted": 1500, - "active_users": 5 - }, - { - "language": "python", - "editor": "jetbrains", - "suggestions_count": 1000, - "acceptances_count": 500, - "lines_suggested": 2000, - "lines_accepted": 1000, - "active_users": 5 - }, - { - "language": "javascript", - "editor": "vscode", - "suggestions_count": 1000, - "acceptances_count": 500, - "lines_suggested": 2000, - "lines_accepted": 1000, - "active_users": 5 - } - ] - }, - { - "day": "2023-10-16", - "total_suggestions_count": 5200, - "total_acceptances_count": 5100, - "total_lines_suggested": 5300, - "total_lines_accepted": 5000, - "total_active_users": 15, - "total_chat_acceptances": 57, - "total_chat_turns": 455, - "total_active_chat_users": 12, - "breakdown": [ - { - "language": "python", - "editor": "vscode", - "suggestions_count": 3100, - "acceptances_count": 3000, - "lines_suggested": 3200, - "lines_accepted": 3100, - "active_users": 5 - }, - { - "language": "python", - "editor": "jetbrains", - "suggestions_count": 1100, - "acceptances_count": 1000, - "lines_suggested": 1200, - "lines_accepted": 1100, - "active_users": 5 - }, - { - "language": "javascript", - "editor": "vscode", - "suggestions_count": 1000, - "acceptances_count": 900, - "lines_suggested": 1100, - "lines_accepted": 1000, - "active_users": 5 - } - ] - } - ], - "schema": { - "type": "array", - "items": { - "title": "Copilot Usage Metrics", - "description": "Summary of Copilot usage.", - "type": "object", - "properties": { - "day": { - "type": "string", - "format": "date", - "description": "The date for which the usage metrics are reported, in `YYYY-MM-DD` format." - }, - "total_suggestions_count": { - "type": "integer", - "description": "The total number of Copilot code completion suggestions shown to users." - }, - "total_acceptances_count": { - "type": "integer", - "description": "The total number of Copilot code completion suggestions accepted by users." - }, - "total_lines_suggested": { - "type": "integer", - "description": "The total number of lines of code completions suggested by Copilot." - }, - "total_lines_accepted": { - "type": "integer", - "description": "The total number of lines of code completions accepted by users." - }, - "total_active_users": { - "type": "integer", - "description": "The total number of users who were shown Copilot code completion suggestions during the day specified." - }, - "total_chat_acceptances": { - "type": "integer", - "description": "The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline)." - }, - "total_chat_turns": { - "type": "integer", - "description": "The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE." - }, - "total_active_chat_users": { - "type": "integer", - "description": "The total number of users who interacted with Copilot Chat in the IDE during the day specified." - }, - "breakdown": { - "type": [ - "array", - "null" - ], - "description": "Breakdown of Copilot code completions usage by language and editor", - "items": { - "type": "object", - "description": "Breakdown of Copilot usage by editor for this language", - "additionalProperties": true, - "properties": { - "language": { - "type": "string", - "description": "The language in which Copilot suggestions were shown to users in the specified editor." - }, - "editor": { - "type": "string", - "description": "The editor in which Copilot suggestions were shown to users for the specified language." - }, - "suggestions_count": { - "type": "integer", - "description": "The number of Copilot suggestions shown to users in the editor specified during the day specified." - }, - "acceptances_count": { - "type": "integer", - "description": "The number of Copilot suggestions accepted by users in the editor specified during the day specified." - }, - "lines_suggested": { - "type": "integer", - "description": "The number of lines of code suggested by Copilot in the editor specified during the day specified." - }, - "lines_accepted": { - "type": "integer", - "description": "The number of lines of code accepted by users in the editor specified during the day specified." - }, - "active_users": { - "type": "integer", - "description": "The number of users who were shown Copilot completion suggestions in the editor specified during the day specified." - } - } - } - } - }, - "required": [ - "day", - "breakdown" - ], - "additionalProperties": false - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE\nfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,\nand number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.

\n

The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

The time zone in the response is in UTC time, that means that the cutoff time for the \"day\" is UTC time.

\n

Only owners and billing managers can view Copilot usage metrics for the enterprise.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "401", - "description": "

Requires authentication

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "500", - "description": "

Internal Error

" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/enterprises/{enterprise}/team/{team_slug}/copilot/usage", - "title": "Get a summary of Copilot usage for an enterprise team", - "category": "copilot", - "subcategory": "copilot-usage", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

The slug of the team name.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "since", - "description": "

Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Maximum value is 28 days ago.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "until", - "description": "

Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) and should not preceed the since date if it is passed.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "description": "

The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "per_page", - "description": "

The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 28 - } - } - ], - "bodyParameters": [], - "progAccess": { - "userToServerRest": false, - "serverToServer": false, - "fineGrainedPat": false, - "permissions": [ - { - "\"Enterprise administration\" business permissions": "read" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "enterprise": "ENTERPRISE", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": [ - { - "day": "2023-10-15", - "total_suggestions_count": 1000, - "total_acceptances_count": 800, - "total_lines_suggested": 1800, - "total_lines_accepted": 1200, - "total_active_users": 10, - "total_chat_acceptances": 32, - "total_chat_turns": 200, - "total_active_chat_users": 4, - "breakdown": [ - { - "language": "python", - "editor": "vscode", - "suggestions_count": 300, - "acceptances_count": 250, - "lines_suggested": 900, - "lines_accepted": 700, - "active_users": 5 - }, - { - "language": "python", - "editor": "jetbrains", - "suggestions_count": 300, - "acceptances_count": 200, - "lines_suggested": 400, - "lines_accepted": 300, - "active_users": 2 - }, - { - "language": "ruby", - "editor": "vscode", - "suggestions_count": 400, - "acceptances_count": 350, - "lines_suggested": 500, - "lines_accepted": 200, - "active_users": 3 - } - ] - }, - { - "day": "2023-10-16", - "total_suggestions_count": 800, - "total_acceptances_count": 600, - "total_lines_suggested": 1100, - "total_lines_accepted": 700, - "total_active_users": 12, - "total_chat_acceptances": 57, - "total_chat_turns": 426, - "total_active_chat_users": 8, - "breakdown": [ - { - "language": "python", - "editor": "vscode", - "suggestions_count": 300, - "acceptances_count": 200, - "lines_suggested": 600, - "lines_accepted": 300, - "active_users": 2 - }, - { - "language": "python", - "editor": "jetbrains", - "suggestions_count": 300, - "acceptances_count": 150, - "lines_suggested": 300, - "lines_accepted": 250, - "active_users": 6 - }, - { - "language": "ruby", - "editor": "vscode", - "suggestions_count": 200, - "acceptances_count": 150, - "lines_suggested": 200, - "lines_accepted": 150, - "active_users": 3 - } - ] - } - ], - "schema": { - "type": "array", - "items": { - "title": "Copilot Usage Metrics", - "description": "Summary of Copilot usage.", - "type": "object", - "properties": { - "day": { - "type": "string", - "format": "date", - "description": "The date for which the usage metrics are reported, in `YYYY-MM-DD` format." - }, - "total_suggestions_count": { - "type": "integer", - "description": "The total number of Copilot code completion suggestions shown to users." - }, - "total_acceptances_count": { - "type": "integer", - "description": "The total number of Copilot code completion suggestions accepted by users." - }, - "total_lines_suggested": { - "type": "integer", - "description": "The total number of lines of code completions suggested by Copilot." - }, - "total_lines_accepted": { - "type": "integer", - "description": "The total number of lines of code completions accepted by users." - }, - "total_active_users": { - "type": "integer", - "description": "The total number of users who were shown Copilot code completion suggestions during the day specified." - }, - "total_chat_acceptances": { - "type": "integer", - "description": "The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline)." - }, - "total_chat_turns": { - "type": "integer", - "description": "The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE." - }, - "total_active_chat_users": { - "type": "integer", - "description": "The total number of users who interacted with Copilot Chat in the IDE during the day specified." - }, - "breakdown": { - "type": [ - "array", - "null" - ], - "description": "Breakdown of Copilot code completions usage by language and editor", - "items": { - "type": "object", - "description": "Breakdown of Copilot usage by editor for this language", - "additionalProperties": true, - "properties": { - "language": { - "type": "string", - "description": "The language in which Copilot suggestions were shown to users in the specified editor." - }, - "editor": { - "type": "string", - "description": "The editor in which Copilot suggestions were shown to users for the specified language." - }, - "suggestions_count": { - "type": "integer", - "description": "The number of Copilot suggestions shown to users in the editor specified during the day specified." - }, - "acceptances_count": { - "type": "integer", - "description": "The number of Copilot suggestions accepted by users in the editor specified during the day specified." - }, - "lines_suggested": { - "type": "integer", - "description": "The number of lines of code suggested by Copilot in the editor specified during the day specified." - }, - "lines_accepted": { - "type": "integer", - "description": "The number of lines of code accepted by users in the editor specified during the day specified." - }, - "active_users": { - "type": "integer", - "description": "The number of users who were shown Copilot completion suggestions in the editor specified during the day specified." - } - } - } - } - }, - "required": [ - "day", - "breakdown" - ], - "additionalProperties": false - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See \"About enterprise accounts for Copilot Business.\"

\n
\n

You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE\nfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.\nSee the response schema tab for detailed metrics definitions.

\n

The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

Note

\n

\nThis endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.

\n
\n

Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "401", - "description": "

Requires authentication

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "500", - "description": "

Internal Error

" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/orgs/{org}/copilot/usage", - "title": "Get a summary of Copilot usage for organization members", - "category": "copilot", - "subcategory": "copilot-usage", - "parameters": [ - { - "name": "org", - "description": "

The organization name. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "since", - "description": "

Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Maximum value is 28 days ago.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "until", - "description": "

Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) and should not preceed the since date if it is passed.

", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "description": "

The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "per_page", - "description": "

The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 28 - } - } - ], - "bodyParameters": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"GitHub Copilot Business\" organization permissions": "read" - }, - { - "\"Administration\" organization permissions": "read" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": [ - { - "day": "2023-10-15", - "total_suggestions_count": 1000, - "total_acceptances_count": 800, - "total_lines_suggested": 1800, - "total_lines_accepted": 1200, - "total_active_users": 10, - "total_chat_acceptances": 32, - "total_chat_turns": 200, - "total_active_chat_users": 4, - "breakdown": [ - { - "language": "python", - "editor": "vscode", - "suggestions_count": 300, - "acceptances_count": 250, - "lines_suggested": 900, - "lines_accepted": 700, - "active_users": 5 - }, - { - "language": "python", - "editor": "jetbrains", - "suggestions_count": 300, - "acceptances_count": 200, - "lines_suggested": 400, - "lines_accepted": 300, - "active_users": 2 - }, - { - "language": "ruby", - "editor": "vscode", - "suggestions_count": 400, - "acceptances_count": 350, - "lines_suggested": 500, - "lines_accepted": 200, - "active_users": 3 - } - ] - }, - { - "day": "2023-10-16", - "total_suggestions_count": 800, - "total_acceptances_count": 600, - "total_lines_suggested": 1100, - "total_lines_accepted": 700, - "total_active_users": 12, - "total_chat_acceptances": 57, - "total_chat_turns": 426, - "total_active_chat_users": 8, - "breakdown": [ - { - "language": "python", - "editor": "vscode", - "suggestions_count": 300, - "acceptances_count": 200, - "lines_suggested": 600, - "lines_accepted": 300, - "active_users": 2 - }, - { - "language": "python", - "editor": "jetbrains", - "suggestions_count": 300, - "acceptances_count": 150, - "lines_suggested": 300, - "lines_accepted": 250, - "active_users": 6 - }, - { - "language": "ruby", - "editor": "vscode", - "suggestions_count": 200, - "acceptances_count": 150, - "lines_suggested": 200, - "lines_accepted": 150, - "active_users": 3 - } - ] - } - ], - "schema": { - "type": "array", - "items": { - "title": "Copilot Usage Metrics", - "description": "Summary of Copilot usage.", - "type": "object", - "properties": { - "day": { - "type": "string", - "format": "date", - "description": "The date for which the usage metrics are reported, in `YYYY-MM-DD` format." - }, - "total_suggestions_count": { - "type": "integer", - "description": "The total number of Copilot code completion suggestions shown to users." - }, - "total_acceptances_count": { - "type": "integer", - "description": "The total number of Copilot code completion suggestions accepted by users." - }, - "total_lines_suggested": { - "type": "integer", - "description": "The total number of lines of code completions suggested by Copilot." - }, - "total_lines_accepted": { - "type": "integer", - "description": "The total number of lines of code completions accepted by users." - }, - "total_active_users": { - "type": "integer", - "description": "The total number of users who were shown Copilot code completion suggestions during the day specified." - }, - "total_chat_acceptances": { - "type": "integer", - "description": "The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline)." - }, - "total_chat_turns": { - "type": "integer", - "description": "The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE." - }, - "total_active_chat_users": { - "type": "integer", - "description": "The total number of users who interacted with Copilot Chat in the IDE during the day specified." - }, - "breakdown": { - "type": [ - "array", - "null" - ], - "description": "Breakdown of Copilot code completions usage by language and editor", - "items": { - "type": "object", - "description": "Breakdown of Copilot usage by editor for this language", - "additionalProperties": true, - "properties": { - "language": { - "type": "string", - "description": "The language in which Copilot suggestions were shown to users in the specified editor." - }, - "editor": { - "type": "string", - "description": "The editor in which Copilot suggestions were shown to users for the specified language." - }, - "suggestions_count": { - "type": "integer", - "description": "The number of Copilot suggestions shown to users in the editor specified during the day specified." - }, - "acceptances_count": { - "type": "integer", - "description": "The number of Copilot suggestions accepted by users in the editor specified during the day specified." - }, - "lines_suggested": { - "type": "integer", - "description": "The number of lines of code suggested by Copilot in the editor specified during the day specified." - }, - "lines_accepted": { - "type": "integer", - "description": "The number of lines of code accepted by users in the editor specified during the day specified." - }, - "active_users": { - "type": "integer", - "description": "The number of users who were shown Copilot completion suggestions in the editor specified during the day specified." - } - } - } - } - }, - "required": [ - "day", - "breakdown" - ], - "additionalProperties": false - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE\nacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.\nSee the response schema tab for detailed metrics definitions.

\n

The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.

\n

Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.

\n

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot, read:org, or read:enterprise scopes to use this endpoint.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "401", - "description": "

Requires authentication

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "500", - "description": "

Internal Error

" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/orgs/{org}/team/{team_slug}/copilot/usage", - "title": "Get a summary of Copilot usage for a team", - "category": "copilot", - "subcategory": "copilot-usage", - "parameters": [ - { - "name": "org", - "description": "

The organization name. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

The slug of the team name.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "

The slug of the team name.

", "in": "path", "required": true, "schema": { @@ -227003,795 +225259,6 @@ } ], "copilot-user-management": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/enterprises/{enterprise}/copilot/billing/seats", - "title": "List all Copilot seat assignments for an enterprise", - "category": "copilot", - "subcategory": "copilot-user-management", - "parameters": [ - { - "name": "enterprise", - "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "description": "

The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "per_page", - "description": "

The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

", - "in": "query", - "schema": { - "type": "integer", - "default": 50 - } - } - ], - "bodyParameters": [], - "progAccess": { - "userToServerRest": false, - "serverToServer": false, - "fineGrainedPat": false, - "permissions": [ - { - "\"Enterprise administration\" business permissions": "read" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "enterprise": "ENTERPRISE" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "total_seats": 2, - "seats": [ - { - "created_at": "2021-08-03T18:00:00-06:00", - "updated_at": "2021-09-23T15:00:00-06:00", - "pending_cancellation_date": null, - "last_activity_at": "2021-10-14T00:53:32-06:00", - "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", - "plan_type": "business", - "assignee": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "assigning_team": { - "id": 1, - "node_id": "MDQ6VGVhbTE=", - "url": "https://api.github.com/teams/1", - "html_url": "https://github.com/orgs/github/teams/justice-league", - "name": "Justice League", - "slug": "justice-league", - "description": "A great team.", - "privacy": "closed", - "notification_setting": "notifications_enabled", - "permission": "admin", - "members_url": "https://api.github.com/teams/1/members{/member}", - "repositories_url": "https://api.github.com/teams/1/repos", - "parent": null - } - }, - { - "created_at": "2021-09-23T18:00:00-06:00", - "updated_at": "2021-09-23T15:00:00-06:00", - "pending_cancellation_date": "2021-11-01", - "last_activity_at": "2021-10-13T00:53:32-06:00", - "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", - "assignee": { - "login": "octokitten", - "id": 1, - "node_id": "MDQ76VNlcjE=", - "avatar_url": "https://github.com/images/error/octokitten_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octokitten", - "html_url": "https://github.com/octokitten", - "followers_url": "https://api.github.com/users/octokitten/followers", - "following_url": "https://api.github.com/users/octokitten/following{/other_user}", - "gists_url": "https://api.github.com/users/octokitten/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octokitten/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octokitten/subscriptions", - "organizations_url": "https://api.github.com/users/octokitten/orgs", - "repos_url": "https://api.github.com/users/octokitten/repos", - "events_url": "https://api.github.com/users/octokitten/events{/privacy}", - "received_events_url": "https://api.github.com/users/octokitten/received_events", - "type": "User", - "site_admin": false - } - } - ] - }, - "schema": { - "type": "object", - "properties": { - "total_seats": { - "type": "integer", - "description": "The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once." - }, - "seats": { - "type": "array", - "items": { - "title": "Copilot Business Seat Detail", - "description": "Information about a Copilot Business seat assignment for a user, team, or organization.", - "type": "object", - "properties": { - "assignee": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - }, - "organization": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Organization Simple", - "description": "A GitHub organization.", - "type": "object", - "properties": { - "login": { - "type": "string", - "examples": [ - "github" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDEyOk9yZ2FuaXphdGlvbjE=" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/orgs/github" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/orgs/github/repos" - ] - }, - "events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/orgs/github/events" - ] - }, - "hooks_url": { - "type": "string", - "examples": [ - "https://api.github.com/orgs/github/hooks" - ] - }, - "issues_url": { - "type": "string", - "examples": [ - "https://api.github.com/orgs/github/issues" - ] - }, - "members_url": { - "type": "string", - "examples": [ - "https://api.github.com/orgs/github/members{/member}" - ] - }, - "public_members_url": { - "type": "string", - "examples": [ - "https://api.github.com/orgs/github/public_members{/member}" - ] - }, - "avatar_url": { - "type": "string", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "description": { - "type": [ - "string", - "null" - ], - "examples": [ - "A great organization" - ] - } - }, - "required": [ - "login", - "url", - "id", - "node_id", - "repos_url", - "events_url", - "hooks_url", - "issues_url", - "members_url", - "public_members_url", - "avatar_url", - "description" - ] - } - ] - }, - "assigning_team": { - "description": "The team through which the assignee is granted access to GitHub Copilot, if applicable.", - "oneOf": [ - { - "title": "Team", - "description": "Groups of organization members that gives permissions on specified repositories.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "node_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "privacy": { - "type": "string" - }, - "notification_setting": { - "type": "string" - }, - "permission": { - "type": "string" - }, - "permissions": { - "type": "object", - "properties": { - "pull": { - "type": "boolean" - }, - "triage": { - "type": "boolean" - }, - "push": { - "type": "boolean" - }, - "maintain": { - "type": "boolean" - }, - "admin": { - "type": "boolean" - } - }, - "required": [ - "pull", - "triage", - "push", - "maintain", - "admin" - ] - }, - "url": { - "type": "string", - "format": "uri" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/rails/teams/core" - ] - }, - "members_url": { - "type": "string" - }, - "repositories_url": { - "type": "string", - "format": "uri" - }, - "parent": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Team Simple", - "description": "Groups of organization members that gives permissions on specified repositories.", - "type": "object", - "properties": { - "id": { - "description": "Unique identifier of the team", - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VGVhbTE=" - ] - }, - "url": { - "description": "URL for the team", - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/1" - ] - }, - "members_url": { - "type": "string", - "examples": [ - "https://api.github.com/organizations/1/team/1/members{/member}" - ] - }, - "name": { - "description": "Name of the team", - "type": "string", - "examples": [ - "Justice League" - ] - }, - "description": { - "description": "Description of the team", - "type": [ - "string", - "null" - ], - "examples": [ - "A great team." - ] - }, - "permission": { - "description": "Permission that the team will have for its repositories", - "type": "string", - "examples": [ - "admin" - ] - }, - "privacy": { - "description": "The level of privacy this team should have", - "type": "string", - "examples": [ - "closed" - ] - }, - "notification_setting": { - "description": "The notification setting the team has set", - "type": "string", - "examples": [ - "notifications_enabled" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/rails/teams/core" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/1/repos" - ] - }, - "slug": { - "type": "string", - "examples": [ - "justice-league" - ] - }, - "ldap_dn": { - "description": "Distinguished Name (DN) that team maps to within LDAP environment", - "type": "string", - "examples": [ - "uid=example,ou=users,dc=github,dc=com" - ] - } - }, - "required": [ - "id", - "node_id", - "url", - "members_url", - "name", - "description", - "permission", - "html_url", - "repositories_url", - "slug" - ] - } - ] - } - }, - "required": [ - "id", - "node_id", - "url", - "members_url", - "name", - "description", - "permission", - "html_url", - "repositories_url", - "slug", - "parent" - ] - }, - { - "title": "Enterprise Team", - "description": "Group of enterprise owners and/or members", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - }, - "sync_to_organizations": { - "type": "string", - "examples": [ - "disabled | all" - ] - }, - "group_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "62ab9291-fae2-468e-974b-7e45096d5021" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/enterprises/dc/teams/justice-league" - ] - }, - "members_url": { - "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "id", - "url", - "members_url", - "sync_to_organizations", - "name", - "html_url", - "slug", - "created_at", - "updated_at" - ] - } - ], - "type": [ - "null", - "object" - ] - }, - "pending_cancellation_date": { - "type": [ - "string", - "null" - ], - "format": "date", - "description": "The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle." - }, - "last_activity_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp of user's last GitHub Copilot activity, in ISO 8601 format." - }, - "last_activity_editor": { - "type": [ - "string", - "null" - ], - "description": "Last editor that was used by the user for a GitHub Copilot completion." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "deprecated": true, - "description": "**Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format." - }, - "plan_type": { - "type": "string", - "description": "The Copilot plan of the organization, or the parent enterprise, when applicable.", - "enum": [ - "business", - "enterprise", - "unknown" - ] - } - }, - "required": [ - "assignee", - "created_at" - ], - "additionalProperties": false - } - } - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.

\n

Users with access through multiple organizations or enterprise teams will only be counted toward total_seats once.

\n

For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the seats array.\nEach seat object contains information about the assigned user's most recent Copilot activity. Users must have\ntelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at. For more information about activity data,\nsee \"Reviewing user activity data for Copilot in your organization.\"

\n

Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.

\n

Personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "401", - "description": "

Requires authentication

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "500", - "description": "

Internal Error

" - } - ] - }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -370821,6 +368288,9 @@ }, "repository_id": { "type": "integer" + }, + "bundle_url": { + "type": "string" } } } @@ -386869,7 +384339,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -386877,7 +384348,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -387003,7 +384475,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -387474,6 +384946,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -388127,7 +385606,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ], "default": "branch" }, @@ -388183,7 +385663,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -388614,6 +386094,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -389399,7 +386884,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -389407,7 +386893,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -389533,7 +387020,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -390004,6 +387491,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -390756,7 +388250,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -390764,7 +388259,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -390890,7 +388386,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -391361,6 +388857,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -392021,7 +389524,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { @@ -392075,7 +389579,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -392506,6 +390010,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -393292,7 +390801,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -393300,7 +390810,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -393426,7 +390937,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -393897,6 +391408,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -459433,6 +456951,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -459689,6 +457213,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ @@ -491510,6 +489058,9 @@ }, "repository_id": { "type": "integer" + }, + "bundle_url": { + "type": "string" } } } @@ -518683,6 +516234,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -519578,7 +517136,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -519586,7 +517145,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -519712,7 +517272,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -520183,6 +517743,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -521167,6 +518734,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -521933,7 +519505,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -521941,7 +519514,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -522067,7 +519641,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -522538,6 +520112,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -523301,7 +520882,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -523309,7 +520891,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -523435,7 +521018,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -523906,6 +521489,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -524895,6 +522485,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -525662,7 +523257,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -525670,7 +523266,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -525796,7 +523393,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -526267,6 +523864,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -537283,6 +534887,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -537374,6 +534979,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -538561,6 +536167,13 @@ } ] }, + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, "push_protection_bypass_request_comment": { "type": [ "string", @@ -538938,6 +536551,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -539029,6 +536643,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -540216,6 +537831,13 @@ } ] }, + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, "push_protection_bypass_request_comment": { "type": [ "string", @@ -540536,6 +538158,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -540560,6 +538183,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -541203,6 +538827,13 @@ } ] }, + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, "push_protection_bypass_request_comment": { "type": [ "string", @@ -541346,6 +538977,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -541986,490 +539618,681 @@ } ] }, - "push_protection_bypass_request_comment": { - "type": [ - "string", - "null" - ], - "description": "An optional comment when requesting a push protection bypass." - }, - "push_protection_bypass_request_html_url": { - "type": [ - "string", - "null" - ], - "format": "uri", - "description": "The URL to a push protection bypass request." - }, - "validity": { - "type": "string", - "description": "The token status as of the latest validity check.", - "enum": [ - "active", - "inactive", - "unknown" - ] - }, - "publicly_leaked": { - "type": [ - "boolean", - "null" - ], - "description": "Whether the detected secret was publicly leaked." - }, - "multi_repo": { - "type": [ - "boolean", - "null" - ], - "description": "Whether the detected secret was found in multiple repositories under the same organization or enterprise." - } - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Gets a single secret scanning alert detected in an eligible repository.

\n

The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "304", - "description": "

Not modified

" - }, - { - "httpStatusCode": "404", - "description": "

Repository is public, or secret scanning is disabled for the repository, or the resource is not found

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", - "title": "Update a secret scanning alert", - "category": "secret-scanning", - "subcategory": "secret-scanning", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "alert_number", - "in": "path", - "description": "

The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.

", - "required": true, - "schema": { - "type": "integer", - "description": "The security alert number.", - "readOnly": true - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "state", - "in": "body", - "description": "

Sets the state of the secret scanning alert. You must provide resolution when you set the state to resolved.

", - "isRequired": true, - "enum": [ - "open", - "resolved" - ] - }, - { - "type": "string or null", - "name": "resolution", - "in": "body", - "description": "

Required when the state is resolved. The reason for resolving the alert.

", - "enum": [ - "false_positive", - "wont_fix", - "revoked", - "used_in_tests", - null - ] - }, - { - "type": "string or null", - "name": "resolution_comment", - "in": "body", - "description": "

An optional comment when closing an alert. Cannot be updated or deleted. Must be null when changing state to open.

" - } - ], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Secret scanning alerts\" repository permissions": "write" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "state": "resolved", - "resolution": "false_positive" - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "alert_number": "ALERT_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "number": 42, - "created_at": "2020-11-06T18:18:30Z", - "url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42", - "html_url": "https://github.com/owner/private-repo/security/secret-scanning/42", - "locations_url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42/locations", - "state": "resolved", - "resolution": "used_in_tests", - "resolved_at": "2020-11-16T22:42:07Z", - "resolved_by": { - "login": "monalisa", - "id": 2, - "node_id": "MDQ6VXNlcjI=", - "avatar_url": "https://alambic.github.com/avatars/u/2?", - "gravatar_id": "", - "url": "https://api.github.com/users/monalisa", - "html_url": "https://github.com/monalisa", - "followers_url": "https://api.github.com/users/monalisa/followers", - "following_url": "https://api.github.com/users/monalisa/following{/other_user}", - "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", - "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", - "organizations_url": "https://api.github.com/users/monalisa/orgs", - "repos_url": "https://api.github.com/users/monalisa/repos", - "events_url": "https://api.github.com/users/monalisa/events{/privacy}", - "received_events_url": "https://api.github.com/users/monalisa/received_events", - "type": "User", - "site_admin": true - }, - "secret_type": "mailchimp_api_key", - "secret_type_display_name": "Mailchimp API Key", - "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2", - "push_protection_bypassed": false, - "push_protection_bypassed_by": null, - "push_protection_bypassed_at": null, - "push_protection_bypass_request_reviewer": null, - "push_protection_bypass_request_comment": null, - "push_protection_bypass_request_html_url": null, - "resolution_comment": "Example comment", - "validity": "unknown", - "publicly_leaked": false, - "multi_repo": false - }, - "schema": { - "type": "object", - "properties": { - "number": { - "type": "integer", - "description": "The security alert number.", - "readOnly": true - }, - "created_at": { - "type": "string", - "description": "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", - "format": "date-time", - "readOnly": true - }, - "updated_at": { - "anyOf": [ - { - "type": "null" - }, - { - "type": "string", - "description": "The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", - "format": "date-time", - "readOnly": true - } - ] - }, - "url": { - "type": "string", - "description": "The REST API URL of the alert resource.", - "format": "uri", - "readOnly": true - }, - "html_url": { - "type": "string", - "description": "The GitHub URL of the alert resource.", - "format": "uri", - "readOnly": true - }, - "locations_url": { - "type": "string", - "format": "uri", - "description": "The REST API URL of the code locations for this alert." - }, - "state": { - "description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.", - "type": "string", - "enum": [ - "open", - "resolved" - ] - }, - "resolution": { - "type": [ - "string", - "null" - ], - "description": "**Required when the `state` is `resolved`.** The reason for resolving the alert.", - "enum": [ - "false_positive", - "wont_fix", - "revoked", - "used_in_tests", - null - ] - }, - "resolved_at": { + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, + "push_protection_bypass_request_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when requesting a push protection bypass." + }, + "push_protection_bypass_request_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "The URL to a push protection bypass request." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] + }, + "publicly_leaked": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the detected secret was publicly leaked." + }, + "multi_repo": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the detected secret was found in multiple repositories under the same organization or enterprise." + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "

Gets a single secret scanning alert detected in an eligible repository.

\n

The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

OK

" + }, + { + "httpStatusCode": "304", + "description": "

Not modified

" + }, + { + "httpStatusCode": "404", + "description": "

Repository is public, or secret scanning is disabled for the repository, or the resource is not found

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", + "title": "Update a secret scanning alert", + "category": "secret-scanning", + "subcategory": "secret-scanning", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "alert_number", + "in": "path", + "description": "

The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.

", + "required": true, + "schema": { + "type": "integer", + "description": "The security alert number.", + "readOnly": true + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "state", + "in": "body", + "description": "

Sets the state of the secret scanning alert. You must provide resolution when you set the state to resolved.

", + "isRequired": true, + "enum": [ + "open", + "resolved" + ] + }, + { + "type": "string or null", + "name": "resolution", + "in": "body", + "description": "

Required when the state is resolved. The reason for resolving the alert.

", + "enum": [ + "false_positive", + "wont_fix", + "revoked", + "used_in_tests", + null + ] + }, + { + "type": "string or null", + "name": "resolution_comment", + "in": "body", + "description": "

An optional comment when closing an alert. Cannot be updated or deleted. Must be null when changing state to open.

" + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Secret scanning alerts\" repository permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "state": "resolved", + "resolution": "false_positive" + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "alert_number": "ALERT_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "number": 42, + "created_at": "2020-11-06T18:18:30Z", + "url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42", + "html_url": "https://github.com/owner/private-repo/security/secret-scanning/42", + "locations_url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42/locations", + "state": "resolved", + "resolution": "used_in_tests", + "resolved_at": "2020-11-16T22:42:07Z", + "resolved_by": { + "login": "monalisa", + "id": 2, + "node_id": "MDQ6VXNlcjI=", + "avatar_url": "https://alambic.github.com/avatars/u/2?", + "gravatar_id": "", + "url": "https://api.github.com/users/monalisa", + "html_url": "https://github.com/monalisa", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "repos_url": "https://api.github.com/users/monalisa/repos", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "type": "User", + "site_admin": true + }, + "secret_type": "mailchimp_api_key", + "secret_type_display_name": "Mailchimp API Key", + "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2", + "push_protection_bypassed": false, + "push_protection_bypassed_by": null, + "push_protection_bypassed_at": null, + "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, + "push_protection_bypass_request_comment": null, + "push_protection_bypass_request_html_url": null, + "resolution_comment": "Example comment", + "validity": "unknown", + "publicly_leaked": false, + "multi_repo": false + }, + "schema": { + "type": "object", + "properties": { + "number": { + "type": "integer", + "description": "The security alert number.", + "readOnly": true + }, + "created_at": { + "type": "string", + "description": "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", + "format": "date-time", + "readOnly": true + } + ] + }, + "url": { + "type": "string", + "description": "The REST API URL of the alert resource.", + "format": "uri", + "readOnly": true + }, + "html_url": { + "type": "string", + "description": "The GitHub URL of the alert resource.", + "format": "uri", + "readOnly": true + }, + "locations_url": { + "type": "string", + "format": "uri", + "description": "The REST API URL of the code locations for this alert." + }, + "state": { + "description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.", + "type": "string", + "enum": [ + "open", + "resolved" + ] + }, + "resolution": { + "type": [ + "string", + "null" + ], + "description": "**Required when the `state` is `resolved`.** The reason for resolving the alert.", + "enum": [ + "false_positive", + "wont_fix", + "revoked", + "used_in_tests", + null + ] + }, + "resolved_at": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "resolved_by": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "format": "int64", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + }, + "user_view_type": { + "type": "string", + "examples": [ + "public" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "resolution_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment to resolve an alert." + }, + "secret_type": { + "type": "string", + "description": "The type of secret that secret scanning detected." + }, + "secret_type_display_name": { + "type": "string", + "description": "User-friendly name for the detected secret, matching the `secret_type`.\nFor a list of built-in patterns, see \"[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets).\"" + }, + "secret": { + "type": "string", + "description": "The secret that was detected." + }, + "push_protection_bypassed": { + "type": [ + "boolean", + "null" + ], + "description": "Whether push protection was bypassed for the detected secret." + }, + "push_protection_bypassed_by": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "format": "int64", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + }, + "user_view_type": { + "type": "string", + "examples": [ + "public" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "push_protection_bypassed_at": { "type": [ "string", "null" ], "format": "date-time", - "description": "The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." - }, - "resolved_by": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "resolution_comment": { - "type": [ - "string", - "null" - ], - "description": "An optional comment to resolve an alert." - }, - "secret_type": { - "type": "string", - "description": "The type of secret that secret scanning detected." - }, - "secret_type_display_name": { - "type": "string", - "description": "User-friendly name for the detected secret, matching the `secret_type`.\nFor a list of built-in patterns, see \"[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets).\"" - }, - "secret": { - "type": "string", - "description": "The secret that was detected." - }, - "push_protection_bypassed": { - "type": [ - "boolean", - "null" - ], - "description": "Whether push protection was bypassed for the detected secret." + "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." }, - "push_protection_bypassed_by": { + "push_protection_bypass_request_reviewer": { "anyOf": [ { "type": "null" @@ -542644,188 +540467,12 @@ } ] }, - "push_protection_bypassed_at": { + "push_protection_bypass_request_reviewer_comment": { "type": [ "string", "null" ], - "format": "date-time", - "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." - }, - "push_protection_bypass_request_reviewer": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] + "description": "An optional comment when reviewing a push protection bypass." }, "push_protection_bypass_request_comment": { "type": [ @@ -595449,6 +593096,9 @@ }, "repository_id": { "type": "integer" + }, + "bundle_url": { + "type": "string" } } } diff --git a/src/rest/data/ghec-2022-11-28/schema.json b/src/rest/data/ghec-2022-11-28/schema.json index c38ef08b4817..3b20f24bc802 100644 --- a/src/rest/data/ghec-2022-11-28/schema.json +++ b/src/rest/data/ghec-2022-11-28/schema.json @@ -264618,7 +264618,45 @@ } } ], - "bodyParameters": [], + "bodyParameters": [ + { + "type": "string", + "name": "value_type", + "in": "body", + "description": "

The type of the value for the property

", + "isRequired": true, + "enum": [ + "string", + "single_select", + "multi_select", + "true_false" + ] + }, + { + "type": "boolean", + "name": "required", + "in": "body", + "description": "

Whether the property is required.

" + }, + { + "type": "null or string or array", + "name": "default_value", + "in": "body", + "description": "

Default value of the property

" + }, + { + "type": "string or null", + "name": "description", + "in": "body", + "description": "

Short description of the property

" + }, + { + "type": "array of strings or null", + "name": "allowed_values", + "in": "body", + "description": "

An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values.

" + } + ], "progAccess": { "userToServerRest": true, "serverToServer": true, @@ -264633,8 +264671,19 @@ { "key": "default", "request": { + "contentType": "application/json", "description": "Example", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "value_type": "single_select", + "required": true, + "default_value": "production", + "description": "Prod or dev environment", + "allowed_values": [ + "production", + "development" + ] + }, "parameters": { "enterprise": "ENTERPRISE", "custom_property_name": "CUSTOM_PROPERTY_NAME" @@ -265003,93 +265052,6908 @@ "null" ] }, - "enterprise_server_user_ids": { - "type": "array", - "items": { - "type": "string" + "enterprise_server_user_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "github_com_user": { + "type": "boolean" + }, + "enterprise_server_user": { + "type": [ + "boolean", + "null" + ] + }, + "visual_studio_subscription_user": { + "type": "boolean" + }, + "license_type": { + "type": "string" + }, + "github_com_profile": { + "type": [ + "string", + "null" + ] + }, + "github_com_member_roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "github_com_enterprise_roles": { + "type": "array", + "description": "All enterprise roles for a user.", + "items": { + "type": "string" + } + }, + "github_com_verified_domain_emails": { + "type": "array", + "items": { + "type": "string" + } + }, + "github_com_saml_name_id": { + "type": [ + "string", + "null" + ] + }, + "github_com_orgs_with_pending_invites": { + "type": "array", + "items": { + "type": "string" + } + }, + "github_com_two_factor_auth": { + "type": [ + "boolean", + "null" + ] + }, + "enterprise_server_emails": { + "type": "array", + "items": { + "type": "string" + } + }, + "visual_studio_license_status": { + "type": [ + "string", + "null" + ] + }, + "visual_studio_subscription_email": { + "type": [ + "string", + "null" + ] + }, + "total_user_accounts": { + "type": "integer" + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "

Lists the license consumption information for all users, including those from connected servers, associated with an enterprise.

\n

The authenticated user must be an enterprise admin to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Consumed Licenses Response

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/license-sync-status", + "title": "Get a license sync status", + "category": "enterprise-admin", + "subcategory": "license", + "parameters": [ + { + "name": "enterprise", + "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

License Sync Status Response

", + "example": { + "server_instances": [ + { + "server_id": "deadbeef1", + "hostname": "github.example.com", + "last_sync": { + "date": "2020-01-01T00:00:00Z", + "status": "success", + "error": "" + } + }, + { + "server_id": "filetoffish1", + "hostname": "github2.example.com", + "last_sync": { + "date": "2020-01-01T00:00:00Z", + "status": "success", + "error": "" + } + } + ] + }, + "schema": { + "title": "License Sync Status", + "description": "Information about the status of a license sync job for an enterprise.", + "properties": { + "server_instances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "server_id": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "last_sync": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "

Gets information about the status of a license sync job for an enterprise.

\n

The authenticated user must be an enterprise admin to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

License Sync Status Response

" + } + ] + } + ], + "rules": [ + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/enterprises/{enterprise}/rulesets", + "title": "Create an enterprise repository ruleset", + "category": "enterprise-admin", + "subcategory": "rules", + "parameters": [ + { + "name": "enterprise", + "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "name", + "in": "body", + "description": "

The name of the ruleset.

", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "

The target of the ruleset

", + "enum": [ + "branch", + "tag", + "push", + "repository" + ], + "default": "branch" + }, + { + "type": "string", + "name": "enforcement", + "in": "body", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", + "isRequired": true, + "enum": [ + "disabled", + "active", + "evaluate" + ] + }, + { + "type": "array of objects", + "name": "bypass_actors", + "in": "body", + "description": "

The actors that can bypass the rules in this ruleset

", + "childParamsGroups": [ + { + "type": "integer or null", + "name": "actor_id", + "description": "

The ID of the actor that can bypass a ruleset. If actor_type is OrganizationAdmin, this should be 1. If actor_type is DeployKey, this should be null. If actor_type is EnterpriseOwner, actor_id is ignored. OrganizationAdmin and EnterpriseOwner are not applicable for personal repositories.

" + }, + { + "type": "string", + "name": "actor_type", + "description": "

The type of actor that can bypass a ruleset

", + "isRequired": true, + "enum": [ + "Integration", + "OrganizationAdmin", + "RepositoryRole", + "Team", + "DeployKey", + "EnterpriseOwner" + ] + }, + { + "type": "string", + "name": "bypass_mode", + "description": "

When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. pull_request is not applicable for the DeployKey actor type. Also, pull_request is only applicable to branch rulesets.

", + "enum": [ + "always", + "pull_request" + ], + "default": "always" + } + ] + }, + { + "type": "object", + "name": "conditions", + "in": "body", + "description": "

Conditions for an enterprise ruleset. The conditions object should contain either the organization_id or organization_name property and the repository_name or repository_property property. For branch and tag rulesets, the conditions object should also contain the ref_name property.

", + "childParamsGroups": [ + { + "type": "object", + "name": "organization_name_and_repository_name", + "description": "

Conditions to target organizations by name and all repositories

", + "isRequired": [ + "organization_name", + "repository_name" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of organization names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all organizations and ~EMUS to target all enterprise managed user accounts.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of organization names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + }, + { + "type": "object", + "name": "repository_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all repositories.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.

" + }, + { + "type": "boolean", + "name": "protected", + "description": "

Whether renaming of target repositories is prevented.

" + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + }, + { + "type": "object", + "name": "organization_name_and_repository_property", + "description": "

Conditions to target organizations by name and repositories by property

", + "isRequired": [ + "organization_name", + "repository_property" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of organization names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all organizations and ~EMUS to target all enterprise managed user accounts.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of organization names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + }, + { + "type": "object", + "name": "repository_property", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of objects", + "name": "include", + "description": "

The repository properties and values to include. All of these properties must match for the condition to pass.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + }, + { + "type": "array of objects", + "name": "exclude", + "description": "

The repository properties and values to exclude. The condition will not pass if any of these properties match.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + }, + { + "type": "object", + "name": "organization_id_and_repository_name", + "description": "

Conditions to target organizations by id and all repositories

", + "isRequired": [ + "organization_id", + "repository_name" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_id", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of integers", + "name": "organization_ids", + "description": "

The organization IDs that the ruleset applies to. One of these IDs must match for the condition to pass.

" + } + ] + }, + { + "type": "object", + "name": "repository_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all repositories.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.

" + }, + { + "type": "boolean", + "name": "protected", + "description": "

Whether renaming of target repositories is prevented.

" + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + }, + { + "type": "object", + "name": "organization_id_and_repository_property", + "description": "

Conditions to target organization by id and repositories by property

", + "isRequired": [ + "organization_id", + "repository_property" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_id", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of integers", + "name": "organization_ids", + "description": "

The organization IDs that the ruleset applies to. One of these IDs must match for the condition to pass.

" + } + ] + }, + { + "type": "object", + "name": "repository_property", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of objects", + "name": "include", + "description": "

The repository properties and values to include. All of these properties must match for the condition to pass.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + }, + { + "type": "array of objects", + "name": "exclude", + "description": "

The repository properties and values to exclude. The condition will not pass if any of these properties match.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + } + ], + "oneOfObject": true + }, + { + "type": "array of objects", + "name": "rules", + "in": "body", + "description": "

An array of rules within the ruleset.

", + "childParamsGroups": [ + { + "type": "object", + "name": "creation", + "description": "

Only allow users with bypass permission to create matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "creation" + ] + } + ] + }, + { + "type": "object", + "name": "update", + "description": "

Only allow users with bypass permission to update matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "update" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "boolean", + "name": "update_allows_fetch_and_merge", + "description": "

Branch can pull changes from its upstream repository

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "deletion", + "description": "

Only allow users with bypass permissions to delete matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "deletion" + ] + } + ] + }, + { + "type": "object", + "name": "required_linear_history", + "description": "

Prevent merge commits from being pushed to matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_linear_history" + ] + } + ] + }, + { + "type": "object", + "name": "merge_queue", + "description": "

Merges must be performed via a merge queue.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "merge_queue" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "integer", + "name": "check_response_timeout_minutes", + "description": "

Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed

", + "isRequired": true + }, + { + "type": "string", + "name": "grouping_strategy", + "description": "

When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge.

", + "isRequired": true, + "enum": [ + "ALLGREEN", + "HEADGREEN" + ] + }, + { + "type": "integer", + "name": "max_entries_to_build", + "description": "

Limit the number of queued pull requests requesting checks and workflow runs at the same time.

", + "isRequired": true + }, + { + "type": "integer", + "name": "max_entries_to_merge", + "description": "

The maximum number of PRs that will be merged together in a group.

", + "isRequired": true + }, + { + "type": "string", + "name": "merge_method", + "description": "

Method to use when merging changes from queued pull requests.

", + "isRequired": true, + "enum": [ + "MERGE", + "SQUASH", + "REBASE" + ] + }, + { + "type": "integer", + "name": "min_entries_to_merge", + "description": "

The minimum number of PRs that will be merged together in a group.

", + "isRequired": true + }, + { + "type": "integer", + "name": "min_entries_to_merge_wait_minutes", + "description": "

The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "required_deployments", + "description": "

Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_deployments" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "required_deployment_environments", + "description": "

The environments that must be successfully deployed to before branches can be merged.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "required_signatures", + "description": "

Commits pushed to matching refs must have verified signatures.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_signatures" + ] + } + ] + }, + { + "type": "object", + "name": "pull_request", + "description": "

Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "pull_request" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, + { + "type": "boolean", + "name": "dismiss_stale_reviews_on_push", + "description": "

New, reviewable commits pushed will dismiss previous pull request review approvals.

", + "isRequired": true + }, + { + "type": "boolean", + "name": "require_code_owner_review", + "description": "

Require an approving review in pull requests that modify files that have a designated code owner.

", + "isRequired": true + }, + { + "type": "boolean", + "name": "require_last_push_approval", + "description": "

Whether the most recent reviewable push must be approved by someone other than the person who pushed it.

", + "isRequired": true + }, + { + "type": "integer", + "name": "required_approving_review_count", + "description": "

The number of approving reviews that are required before a pull request can be merged.

", + "isRequired": true + }, + { + "type": "boolean", + "name": "required_review_thread_resolution", + "description": "

All conversations on code must be resolved before a pull request can be merged.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "required_status_checks", + "description": "

Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_status_checks" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "boolean", + "name": "do_not_enforce_on_create", + "description": "

Allow repositories and branches to be created if a check would otherwise prohibit it.

" + }, + { + "type": "array of objects", + "name": "required_status_checks", + "description": "

Status checks that are required.

", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "context", + "description": "

The status check context name that must be present on the commit.

", + "isRequired": true + }, + { + "type": "integer", + "name": "integration_id", + "description": "

The optional integration ID that this status check must originate from.

" + } + ] + }, + { + "type": "boolean", + "name": "strict_required_status_checks_policy", + "description": "

Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "non_fast_forward", + "description": "

Prevent users with push access from force pushing to refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "non_fast_forward" + ] + } + ] + }, + { + "type": "object", + "name": "commit_message_pattern", + "description": "

Parameters to be used for the commit_message_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "commit_message_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "commit_author_email_pattern", + "description": "

Parameters to be used for the commit_author_email_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "commit_author_email_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "committer_email_pattern", + "description": "

Parameters to be used for the committer_email_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "committer_email_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "branch_name_pattern", + "description": "

Parameters to be used for the branch_name_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "branch_name_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "tag_name_pattern", + "description": "

Parameters to be used for the tag_name_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "tag_name_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "file_path_restriction", + "description": "

Prevent commits that include changes in specified file paths from being pushed to the commit graph.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "file_path_restriction" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "restricted_file_paths", + "description": "

The file paths that are restricted from being pushed to the commit graph.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "max_file_path_length", + "description": "

Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "max_file_path_length" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "integer", + "name": "max_file_path_length", + "description": "

The maximum amount of characters allowed in file paths

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "file_extension_restriction", + "description": "

Prevent commits that include files with specified file extensions from being pushed to the commit graph.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "file_extension_restriction" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "restricted_file_extensions", + "description": "

The file extensions that are restricted from being pushed to the commit graph.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "max_file_size", + "description": "

Prevent commits that exceed a specified file size limit from being pushed to the commit.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "max_file_size" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "integer", + "name": "max_file_size", + "description": "

The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS).

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "workflows", + "description": "

Require all changes made to a targeted branch to pass the specified workflows before they can be merged.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "workflows" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "boolean", + "name": "do_not_enforce_on_create", + "description": "

Allow repositories and branches to be created if a check would otherwise prohibit it.

" + }, + { + "type": "array of objects", + "name": "workflows", + "description": "

Workflows that must pass for this rule to pass.

", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "path", + "description": "

The path to the workflow file

", + "isRequired": true + }, + { + "type": "string", + "name": "ref", + "description": "

The ref (branch or tag) of the workflow file to use

" + }, + { + "type": "integer", + "name": "repository_id", + "description": "

The ID of the repository where the workflow is defined

", + "isRequired": true + }, + { + "type": "string", + "name": "sha", + "description": "

The commit SHA of the workflow file to use

" + } + ] + } + ] + } + ] + }, + { + "type": "object", + "name": "code_scanning", + "description": "

Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "code_scanning" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of objects", + "name": "code_scanning_tools", + "description": "

Tools that must provide code scanning results for this rule to pass.

", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "alerts_threshold", + "description": "

The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see \"About code scanning alerts.\"

", + "isRequired": true, + "enum": [ + "none", + "errors", + "errors_and_warnings", + "all" + ] + }, + { + "type": "string", + "name": "security_alerts_threshold", + "description": "

The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see \"About code scanning alerts.\"

", + "isRequired": true, + "enum": [ + "none", + "critical", + "high_or_higher", + "medium_or_higher", + "all" + ] + }, + { + "type": "string", + "name": "tool", + "description": "

The name of a code scanning tool

", + "isRequired": true + } + ] + } + ] + } + ] + } + ], + "oneOfObject": true + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "super cool ruleset", + "target": "repository", + "enforcement": "active", + "bypass_actors": [ + { + "actor_id": 234, + "actor_type": "Team", + "bypass_mode": "always" + } + ], + "conditions": { + "org_name": { + "include": [ + "important_org" + ], + "exclude": [ + "unimportant_org" + ] + } + }, + "rules": [ + { + "type": "repository_delete" + } + ] + }, + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "

Response

", + "example": { + "id": 21, + "name": "super cool ruleset", + "target": "repository", + "source_type": "Enterprise", + "source": "my-enterprise", + "enforcement": "active", + "conditions": { + "organization_name": { + "include": [ + "important_organization" + ] + }, + "repository_name": { + "include": [ + "~ALL" + ] + } + }, + "rules": [ + { + "type": "repository_delete" + } + ], + "node_id": "RRS_lACkVXNlcgQB", + "_links": { + "self": { + "href": "https://api.github.com/enterprises/my-enterprise/rulesets/21" + }, + "html": { + "href": "https://github.com/enterprise/my-enterprise/settings/policies/repositories/21" + } + }, + "created_at": "2024-08-15T08:43:03Z", + "updated_at": "2024-09-23T16:29:47Z" + }, + "schema": { + "title": "Repository ruleset", + "type": "object", + "description": "A set of rules to apply when specified conditions are met.", + "required": [ + "id", + "name", + "source", + "enforcement" + ], + "properties": { + "id": { + "type": "integer", + "description": "The ID of the ruleset" + }, + "name": { + "type": "string", + "description": "The name of the ruleset" + }, + "target": { + "type": "string", + "description": "The target of the ruleset", + "enum": [ + "branch", + "tag", + "push", + "repository" + ] + }, + "source_type": { + "type": "string", + "description": "The type of the source of the ruleset", + "enum": [ + "Repository", + "Organization", + "Enterprise" + ] + }, + "source": { + "type": "string", + "description": "The name of the source" + }, + "enforcement": { + "type": "string", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", + "enum": [ + "disabled", + "active", + "evaluate" + ] + }, + "bypass_actors": { + "type": "array", + "description": "The actors that can bypass the rules in this ruleset", + "items": { + "title": "Repository Ruleset Bypass Actor", + "type": "object", + "description": "An actor that can bypass rules in a ruleset", + "required": [ + "actor_type" + ], + "properties": { + "actor_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. If `actor_type` is `EnterpriseOwner`, `actor_id` is ignored. `OrganizationAdmin` and `EnterpriseOwner` are not applicable for personal repositories." + }, + "actor_type": { + "type": "string", + "enum": [ + "Integration", + "OrganizationAdmin", + "RepositoryRole", + "Team", + "DeployKey", + "EnterpriseOwner" + ], + "description": "The type of actor that can bypass a ruleset" + }, + "bypass_mode": { + "type": "string", + "description": "When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets.", + "enum": [ + "always", + "pull_request" + ], + "default": "always" + } + } + } + }, + "current_user_can_bypass": { + "type": "string", + "description": "The bypass type of the user making the API request for this ruleset. This field is only returned when\nquerying the repository-level endpoint.", + "enum": [ + "always", + "pull_requests_only", + "never" + ] + }, + "node_id": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URL of the ruleset" + } + } + }, + "html": { + "type": [ + "object", + "null" + ], + "properties": { + "href": { + "type": "string", + "description": "The html URL of the ruleset" + } + } + } + } + }, + "conditions": { + "anyOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Organization ruleset conditions", + "type": "object", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", + "oneOf": [ + { + "type": "object", + "title": "repository_name_and_ref_name", + "description": "Conditions to target repositories by name and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository names", + "type": "object", + "description": "Parameters for a repository name condition", + "properties": { + "repository_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + }, + "protected": { + "type": "boolean", + "description": "Whether renaming of target repositories is prevented." + } + } + } + }, + "required": [ + "repository_name" + ] + } + ] + }, + { + "type": "object", + "title": "repository_id_and_ref_name", + "description": "Conditions to target repositories by id and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository IDs", + "type": "object", + "description": "Parameters for a repository ID condition", + "properties": { + "repository_id": { + "type": "object", + "properties": { + "repository_ids": { + "type": "array", + "description": "The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.", + "items": { + "type": "integer" + } + } + } + } + }, + "required": [ + "repository_id" + ] + } + ] + }, + { + "type": "object", + "title": "repository_property_and_ref_name", + "description": "Conditions to target repositories by property and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository properties", + "type": "object", + "description": "Parameters for a repository property condition", + "properties": { + "repository_property": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "The repository properties and values to include. All of these properties must match for the condition to pass.", + "items": { + "title": "Repository ruleset property targeting definition", + "type": "object", + "description": "Parameters for a targeting a repository property", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository property to target" + }, + "property_values": { + "type": "array", + "description": "The values to match for the repository property", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "description": "The source of the repository property. Defaults to 'custom' if not specified.", + "enum": [ + "custom", + "system" + ] + } + }, + "required": [ + "name", + "property_values" + ] + } + }, + "exclude": { + "type": "array", + "description": "The repository properties and values to exclude. The condition will not pass if any of these properties match.", + "items": { + "title": "Repository ruleset property targeting definition", + "type": "object", + "description": "Parameters for a targeting a repository property", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository property to target" + }, + "property_values": { + "type": "array", + "description": "The values to match for the repository property", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "description": "The source of the repository property. Defaults to 'custom' if not specified.", + "enum": [ + "custom", + "system" + ] + } + }, + "required": [ + "name", + "property_values" + ] + } + } + } + } + }, + "required": [ + "repository_property" + ] + } + ] + } + ] + } + ], + "type": [ + "null", + "object" + ] + }, + "rules": { + "type": "array", + "items": { + "title": "Repository Rule", + "type": "object", + "description": "A repository rule.", + "oneOf": [ + { + "title": "creation", + "description": "Only allow users with bypass permission to create matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "creation" + ] + } + } + }, + { + "title": "update", + "description": "Only allow users with bypass permission to update matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "update" + ] + }, + "parameters": { + "type": "object", + "properties": { + "update_allows_fetch_and_merge": { + "type": "boolean", + "description": "Branch can pull changes from its upstream repository" + } + }, + "required": [ + "update_allows_fetch_and_merge" + ] + } + } + }, + { + "title": "deletion", + "description": "Only allow users with bypass permissions to delete matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "deletion" + ] + } + } + }, + { + "title": "required_linear_history", + "description": "Prevent merge commits from being pushed to matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_linear_history" + ] + } + } + }, + { + "title": "merge_queue", + "description": "Merges must be performed via a merge queue.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "merge_queue" + ] + }, + "parameters": { + "type": "object", + "properties": { + "check_response_timeout_minutes": { + "type": "integer", + "description": "Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed", + "minimum": 1, + "maximum": 360 + }, + "grouping_strategy": { + "type": "string", + "description": "When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge.", + "enum": [ + "ALLGREEN", + "HEADGREEN" + ] + }, + "max_entries_to_build": { + "type": "integer", + "description": "Limit the number of queued pull requests requesting checks and workflow runs at the same time.", + "minimum": 0, + "maximum": 100 + }, + "max_entries_to_merge": { + "type": "integer", + "description": "The maximum number of PRs that will be merged together in a group.", + "minimum": 0, + "maximum": 100 + }, + "merge_method": { + "type": "string", + "description": "Method to use when merging changes from queued pull requests.", + "enum": [ + "MERGE", + "SQUASH", + "REBASE" + ] + }, + "min_entries_to_merge": { + "type": "integer", + "description": "The minimum number of PRs that will be merged together in a group.", + "minimum": 0, + "maximum": 100 + }, + "min_entries_to_merge_wait_minutes": { + "type": "integer", + "description": "The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged.", + "minimum": 0, + "maximum": 360 + } + }, + "required": [ + "check_response_timeout_minutes", + "grouping_strategy", + "max_entries_to_build", + "max_entries_to_merge", + "merge_method", + "min_entries_to_merge", + "min_entries_to_merge_wait_minutes" + ] + } + } + }, + { + "title": "required_deployments", + "description": "Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_deployments" + ] + }, + "parameters": { + "type": "object", + "properties": { + "required_deployment_environments": { + "type": "array", + "description": "The environments that must be successfully deployed to before branches can be merged.", + "items": { + "type": "string" + } + } + }, + "required": [ + "required_deployment_environments" + ] + } + } + }, + { + "title": "required_signatures", + "description": "Commits pushed to matching refs must have verified signatures.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_signatures" + ] + } + } + }, + { + "title": "pull_request", + "description": "Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "pull_request" + ] + }, + "parameters": { + "type": "object", + "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, + "dismiss_stale_reviews_on_push": { + "type": "boolean", + "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." + }, + "require_code_owner_review": { + "type": "boolean", + "description": "Require an approving review in pull requests that modify files that have a designated code owner." + }, + "require_last_push_approval": { + "type": "boolean", + "description": "Whether the most recent reviewable push must be approved by someone other than the person who pushed it." + }, + "required_approving_review_count": { + "type": "integer", + "description": "The number of approving reviews that are required before a pull request can be merged.", + "minimum": 0, + "maximum": 10 + }, + "required_review_thread_resolution": { + "type": "boolean", + "description": "All conversations on code must be resolved before a pull request can be merged." + } + }, + "required": [ + "dismiss_stale_reviews_on_push", + "require_code_owner_review", + "require_last_push_approval", + "required_approving_review_count", + "required_review_thread_resolution" + ] + } + } + }, + { + "title": "required_status_checks", + "description": "Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_status_checks" + ] + }, + "parameters": { + "type": "object", + "properties": { + "do_not_enforce_on_create": { + "type": "boolean", + "description": "Allow repositories and branches to be created if a check would otherwise prohibit it." + }, + "required_status_checks": { + "type": "array", + "description": "Status checks that are required.", + "items": { + "title": "StatusCheckConfiguration", + "description": "Required status check", + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The status check context name that must be present on the commit." + }, + "integration_id": { + "type": "integer", + "description": "The optional integration ID that this status check must originate from." + } + }, + "required": [ + "context" + ] + } + }, + "strict_required_status_checks_policy": { + "type": "boolean", + "description": "Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled." + } + }, + "required": [ + "required_status_checks", + "strict_required_status_checks_policy" + ] + } + } + }, + { + "title": "non_fast_forward", + "description": "Prevent users with push access from force pushing to refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "non_fast_forward" + ] + } + } + }, + { + "title": "commit_message_pattern", + "description": "Parameters to be used for the commit_message_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "commit_message_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "commit_author_email_pattern", + "description": "Parameters to be used for the commit_author_email_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "commit_author_email_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "committer_email_pattern", + "description": "Parameters to be used for the committer_email_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "committer_email_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "branch_name_pattern", + "description": "Parameters to be used for the branch_name_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "branch_name_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "tag_name_pattern", + "description": "Parameters to be used for the tag_name_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "tag_name_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "file_path_restriction", + "description": "Prevent commits that include changes in specified file paths from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_path_restriction" + ] + }, + "parameters": { + "type": "object", + "properties": { + "restricted_file_paths": { + "type": "array", + "description": "The file paths that are restricted from being pushed to the commit graph.", + "items": { + "type": "string" + } + } + }, + "required": [ + "restricted_file_paths" + ] + } + } + }, + { + "title": "max_file_path_length", + "description": "Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "max_file_path_length" + ] + }, + "parameters": { + "type": "object", + "properties": { + "max_file_path_length": { + "type": "integer", + "description": "The maximum amount of characters allowed in file paths", + "minimum": 1, + "maximum": 256 + } + }, + "required": [ + "max_file_path_length" + ] + } + } + }, + { + "title": "file_extension_restriction", + "description": "Prevent commits that include files with specified file extensions from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_extension_restriction" + ] + }, + "parameters": { + "type": "object", + "properties": { + "restricted_file_extensions": { + "type": "array", + "description": "The file extensions that are restricted from being pushed to the commit graph.", + "items": { + "type": "string" + } + } + }, + "required": [ + "restricted_file_extensions" + ] + } + } + }, + { + "title": "max_file_size", + "description": "Prevent commits that exceed a specified file size limit from being pushed to the commit.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "max_file_size" + ] + }, + "parameters": { + "type": "object", + "properties": { + "max_file_size": { + "type": "integer", + "description": "The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS).", + "minimum": 1, + "maximum": 100 + } + }, + "required": [ + "max_file_size" + ] + } + } + }, + { + "title": "workflows", + "description": "Require all changes made to a targeted branch to pass the specified workflows before they can be merged.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "workflows" + ] + }, + "parameters": { + "type": "object", + "properties": { + "do_not_enforce_on_create": { + "type": "boolean", + "description": "Allow repositories and branches to be created if a check would otherwise prohibit it." + }, + "workflows": { + "type": "array", + "description": "Workflows that must pass for this rule to pass.", + "items": { + "title": "WorkflowFileReference", + "description": "A workflow that must run for this rule to pass", + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The path to the workflow file" + }, + "ref": { + "type": "string", + "description": "The ref (branch or tag) of the workflow file to use" + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository where the workflow is defined" + }, + "sha": { + "type": "string", + "description": "The commit SHA of the workflow file to use" + } + }, + "required": [ + "path", + "repository_id" + ] + } + } + }, + "required": [ + "workflows" + ] + } + } + }, + { + "title": "code_scanning", + "description": "Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_scanning" + ] + }, + "parameters": { + "type": "object", + "properties": { + "code_scanning_tools": { + "type": "array", + "description": "Tools that must provide code scanning results for this rule to pass.", + "items": { + "title": "CodeScanningTool", + "description": "A tool that must provide code scanning results for this rule to pass.", + "type": "object", + "properties": { + "alerts_threshold": { + "type": "string", + "description": "The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see \"[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"", + "enum": [ + "none", + "errors", + "errors_and_warnings", + "all" + ] + }, + "security_alerts_threshold": { + "type": "string", + "description": "The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see \"[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"", + "enum": [ + "none", + "critical", + "high_or_higher", + "medium_or_higher", + "all" + ] + }, + "tool": { + "type": "string", + "description": "The name of a code scanning tool" + } + }, + "required": [ + "alerts_threshold", + "security_alerts_threshold", + "tool" + ] + } + } + }, + "required": [ + "code_scanning_tools" + ] + } + } + } + ] + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "

Create a repository ruleset for an enterprise.

", + "statusCodes": [ + { + "httpStatusCode": "201", + "description": "

Created

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}", + "title": "Get an enterprise repository ruleset", + "category": "enterprise-admin", + "subcategory": "rules", + "parameters": [ + { + "name": "enterprise", + "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ruleset_id", + "description": "

The ID of the ruleset.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE", + "ruleset_id": "RULESET_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "id": 21, + "name": "super cool ruleset", + "target": "repository", + "source_type": "Enterprise", + "source": "my-enterprise", + "enforcement": "active", + "conditions": { + "organization_name": { + "include": [ + "important_organization" + ] + }, + "repository_name": { + "include": [ + "~ALL" + ] + } + }, + "rules": [ + { + "type": "repository_delete" + } + ], + "node_id": "RRS_lACkVXNlcgQB", + "_links": { + "self": { + "href": "https://api.github.com/enterprises/my-enterprise/rulesets/21" + }, + "html": { + "href": "https://github.com/enterprise/my-enterprise/settings/policies/repositories/21" + } + }, + "created_at": "2024-08-15T08:43:03Z", + "updated_at": "2024-09-23T16:29:47Z" + }, + "schema": { + "title": "Repository ruleset", + "type": "object", + "description": "A set of rules to apply when specified conditions are met.", + "required": [ + "id", + "name", + "source", + "enforcement" + ], + "properties": { + "id": { + "type": "integer", + "description": "The ID of the ruleset" + }, + "name": { + "type": "string", + "description": "The name of the ruleset" + }, + "target": { + "type": "string", + "description": "The target of the ruleset", + "enum": [ + "branch", + "tag", + "push", + "repository" + ] + }, + "source_type": { + "type": "string", + "description": "The type of the source of the ruleset", + "enum": [ + "Repository", + "Organization", + "Enterprise" + ] + }, + "source": { + "type": "string", + "description": "The name of the source" + }, + "enforcement": { + "type": "string", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", + "enum": [ + "disabled", + "active", + "evaluate" + ] + }, + "bypass_actors": { + "type": "array", + "description": "The actors that can bypass the rules in this ruleset", + "items": { + "title": "Repository Ruleset Bypass Actor", + "type": "object", + "description": "An actor that can bypass rules in a ruleset", + "required": [ + "actor_type" + ], + "properties": { + "actor_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. If `actor_type` is `EnterpriseOwner`, `actor_id` is ignored. `OrganizationAdmin` and `EnterpriseOwner` are not applicable for personal repositories." + }, + "actor_type": { + "type": "string", + "enum": [ + "Integration", + "OrganizationAdmin", + "RepositoryRole", + "Team", + "DeployKey", + "EnterpriseOwner" + ], + "description": "The type of actor that can bypass a ruleset" + }, + "bypass_mode": { + "type": "string", + "description": "When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets.", + "enum": [ + "always", + "pull_request" + ], + "default": "always" + } + } + } + }, + "current_user_can_bypass": { + "type": "string", + "description": "The bypass type of the user making the API request for this ruleset. This field is only returned when\nquerying the repository-level endpoint.", + "enum": [ + "always", + "pull_requests_only", + "never" + ] + }, + "node_id": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URL of the ruleset" + } + } + }, + "html": { + "type": [ + "object", + "null" + ], + "properties": { + "href": { + "type": "string", + "description": "The html URL of the ruleset" + } + } + } + } + }, + "conditions": { + "anyOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Organization ruleset conditions", + "type": "object", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", + "oneOf": [ + { + "type": "object", + "title": "repository_name_and_ref_name", + "description": "Conditions to target repositories by name and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository names", + "type": "object", + "description": "Parameters for a repository name condition", + "properties": { + "repository_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + }, + "protected": { + "type": "boolean", + "description": "Whether renaming of target repositories is prevented." + } + } + } + }, + "required": [ + "repository_name" + ] + } + ] + }, + { + "type": "object", + "title": "repository_id_and_ref_name", + "description": "Conditions to target repositories by id and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository IDs", + "type": "object", + "description": "Parameters for a repository ID condition", + "properties": { + "repository_id": { + "type": "object", + "properties": { + "repository_ids": { + "type": "array", + "description": "The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.", + "items": { + "type": "integer" + } + } + } + } + }, + "required": [ + "repository_id" + ] + } + ] + }, + { + "type": "object", + "title": "repository_property_and_ref_name", + "description": "Conditions to target repositories by property and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository properties", + "type": "object", + "description": "Parameters for a repository property condition", + "properties": { + "repository_property": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "The repository properties and values to include. All of these properties must match for the condition to pass.", + "items": { + "title": "Repository ruleset property targeting definition", + "type": "object", + "description": "Parameters for a targeting a repository property", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository property to target" + }, + "property_values": { + "type": "array", + "description": "The values to match for the repository property", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "description": "The source of the repository property. Defaults to 'custom' if not specified.", + "enum": [ + "custom", + "system" + ] + } + }, + "required": [ + "name", + "property_values" + ] + } + }, + "exclude": { + "type": "array", + "description": "The repository properties and values to exclude. The condition will not pass if any of these properties match.", + "items": { + "title": "Repository ruleset property targeting definition", + "type": "object", + "description": "Parameters for a targeting a repository property", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository property to target" + }, + "property_values": { + "type": "array", + "description": "The values to match for the repository property", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "description": "The source of the repository property. Defaults to 'custom' if not specified.", + "enum": [ + "custom", + "system" + ] + } + }, + "required": [ + "name", + "property_values" + ] + } + } + } + } + }, + "required": [ + "repository_property" + ] + } + ] + } + ] + } + ], + "type": [ + "null", + "object" + ] + }, + "rules": { + "type": "array", + "items": { + "title": "Repository Rule", + "type": "object", + "description": "A repository rule.", + "oneOf": [ + { + "title": "creation", + "description": "Only allow users with bypass permission to create matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "creation" + ] + } + } + }, + { + "title": "update", + "description": "Only allow users with bypass permission to update matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "update" + ] + }, + "parameters": { + "type": "object", + "properties": { + "update_allows_fetch_and_merge": { + "type": "boolean", + "description": "Branch can pull changes from its upstream repository" + } + }, + "required": [ + "update_allows_fetch_and_merge" + ] + } + } + }, + { + "title": "deletion", + "description": "Only allow users with bypass permissions to delete matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "deletion" + ] + } + } + }, + { + "title": "required_linear_history", + "description": "Prevent merge commits from being pushed to matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_linear_history" + ] + } + } + }, + { + "title": "merge_queue", + "description": "Merges must be performed via a merge queue.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "merge_queue" + ] + }, + "parameters": { + "type": "object", + "properties": { + "check_response_timeout_minutes": { + "type": "integer", + "description": "Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed", + "minimum": 1, + "maximum": 360 + }, + "grouping_strategy": { + "type": "string", + "description": "When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge.", + "enum": [ + "ALLGREEN", + "HEADGREEN" + ] + }, + "max_entries_to_build": { + "type": "integer", + "description": "Limit the number of queued pull requests requesting checks and workflow runs at the same time.", + "minimum": 0, + "maximum": 100 + }, + "max_entries_to_merge": { + "type": "integer", + "description": "The maximum number of PRs that will be merged together in a group.", + "minimum": 0, + "maximum": 100 + }, + "merge_method": { + "type": "string", + "description": "Method to use when merging changes from queued pull requests.", + "enum": [ + "MERGE", + "SQUASH", + "REBASE" + ] + }, + "min_entries_to_merge": { + "type": "integer", + "description": "The minimum number of PRs that will be merged together in a group.", + "minimum": 0, + "maximum": 100 + }, + "min_entries_to_merge_wait_minutes": { + "type": "integer", + "description": "The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged.", + "minimum": 0, + "maximum": 360 + } + }, + "required": [ + "check_response_timeout_minutes", + "grouping_strategy", + "max_entries_to_build", + "max_entries_to_merge", + "merge_method", + "min_entries_to_merge", + "min_entries_to_merge_wait_minutes" + ] + } + } + }, + { + "title": "required_deployments", + "description": "Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_deployments" + ] + }, + "parameters": { + "type": "object", + "properties": { + "required_deployment_environments": { + "type": "array", + "description": "The environments that must be successfully deployed to before branches can be merged.", + "items": { + "type": "string" + } + } + }, + "required": [ + "required_deployment_environments" + ] + } + } + }, + { + "title": "required_signatures", + "description": "Commits pushed to matching refs must have verified signatures.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_signatures" + ] + } + } + }, + { + "title": "pull_request", + "description": "Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "pull_request" + ] + }, + "parameters": { + "type": "object", + "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, + "dismiss_stale_reviews_on_push": { + "type": "boolean", + "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." + }, + "require_code_owner_review": { + "type": "boolean", + "description": "Require an approving review in pull requests that modify files that have a designated code owner." + }, + "require_last_push_approval": { + "type": "boolean", + "description": "Whether the most recent reviewable push must be approved by someone other than the person who pushed it." + }, + "required_approving_review_count": { + "type": "integer", + "description": "The number of approving reviews that are required before a pull request can be merged.", + "minimum": 0, + "maximum": 10 + }, + "required_review_thread_resolution": { + "type": "boolean", + "description": "All conversations on code must be resolved before a pull request can be merged." + } + }, + "required": [ + "dismiss_stale_reviews_on_push", + "require_code_owner_review", + "require_last_push_approval", + "required_approving_review_count", + "required_review_thread_resolution" + ] + } + } + }, + { + "title": "required_status_checks", + "description": "Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_status_checks" + ] + }, + "parameters": { + "type": "object", + "properties": { + "do_not_enforce_on_create": { + "type": "boolean", + "description": "Allow repositories and branches to be created if a check would otherwise prohibit it." + }, + "required_status_checks": { + "type": "array", + "description": "Status checks that are required.", + "items": { + "title": "StatusCheckConfiguration", + "description": "Required status check", + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The status check context name that must be present on the commit." + }, + "integration_id": { + "type": "integer", + "description": "The optional integration ID that this status check must originate from." + } + }, + "required": [ + "context" + ] + } + }, + "strict_required_status_checks_policy": { + "type": "boolean", + "description": "Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled." + } + }, + "required": [ + "required_status_checks", + "strict_required_status_checks_policy" + ] + } + } + }, + { + "title": "non_fast_forward", + "description": "Prevent users with push access from force pushing to refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "non_fast_forward" + ] + } + } + }, + { + "title": "commit_message_pattern", + "description": "Parameters to be used for the commit_message_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "commit_message_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "commit_author_email_pattern", + "description": "Parameters to be used for the commit_author_email_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "commit_author_email_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "committer_email_pattern", + "description": "Parameters to be used for the committer_email_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "committer_email_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "branch_name_pattern", + "description": "Parameters to be used for the branch_name_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "branch_name_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "tag_name_pattern", + "description": "Parameters to be used for the tag_name_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "tag_name_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } + }, + { + "title": "file_path_restriction", + "description": "Prevent commits that include changes in specified file paths from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_path_restriction" + ] + }, + "parameters": { + "type": "object", + "properties": { + "restricted_file_paths": { + "type": "array", + "description": "The file paths that are restricted from being pushed to the commit graph.", + "items": { + "type": "string" + } + } + }, + "required": [ + "restricted_file_paths" + ] + } + } + }, + { + "title": "max_file_path_length", + "description": "Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "max_file_path_length" + ] + }, + "parameters": { + "type": "object", + "properties": { + "max_file_path_length": { + "type": "integer", + "description": "The maximum amount of characters allowed in file paths", + "minimum": 1, + "maximum": 256 + } + }, + "required": [ + "max_file_path_length" + ] + } + } + }, + { + "title": "file_extension_restriction", + "description": "Prevent commits that include files with specified file extensions from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_extension_restriction" + ] + }, + "parameters": { + "type": "object", + "properties": { + "restricted_file_extensions": { + "type": "array", + "description": "The file extensions that are restricted from being pushed to the commit graph.", + "items": { + "type": "string" + } + } + }, + "required": [ + "restricted_file_extensions" + ] + } + } + }, + { + "title": "max_file_size", + "description": "Prevent commits that exceed a specified file size limit from being pushed to the commit.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "max_file_size" + ] + }, + "parameters": { + "type": "object", + "properties": { + "max_file_size": { + "type": "integer", + "description": "The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS).", + "minimum": 1, + "maximum": 100 + } + }, + "required": [ + "max_file_size" + ] + } + } + }, + { + "title": "workflows", + "description": "Require all changes made to a targeted branch to pass the specified workflows before they can be merged.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "workflows" + ] + }, + "parameters": { + "type": "object", + "properties": { + "do_not_enforce_on_create": { + "type": "boolean", + "description": "Allow repositories and branches to be created if a check would otherwise prohibit it." + }, + "workflows": { + "type": "array", + "description": "Workflows that must pass for this rule to pass.", + "items": { + "title": "WorkflowFileReference", + "description": "A workflow that must run for this rule to pass", + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The path to the workflow file" + }, + "ref": { + "type": "string", + "description": "The ref (branch or tag) of the workflow file to use" + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository where the workflow is defined" + }, + "sha": { + "type": "string", + "description": "The commit SHA of the workflow file to use" + } + }, + "required": [ + "path", + "repository_id" + ] + } + } + }, + "required": [ + "workflows" + ] + } + } + }, + { + "title": "code_scanning", + "description": "Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_scanning" + ] + }, + "parameters": { + "type": "object", + "properties": { + "code_scanning_tools": { + "type": "array", + "description": "Tools that must provide code scanning results for this rule to pass.", + "items": { + "title": "CodeScanningTool", + "description": "A tool that must provide code scanning results for this rule to pass.", + "type": "object", + "properties": { + "alerts_threshold": { + "type": "string", + "description": "The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see \"[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"", + "enum": [ + "none", + "errors", + "errors_and_warnings", + "all" + ] + }, + "security_alerts_threshold": { + "type": "string", + "description": "The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see \"[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"", + "enum": [ + "none", + "critical", + "high_or_higher", + "medium_or_higher", + "all" + ] + }, + "tool": { + "type": "string", + "description": "The name of a code scanning tool" + } + }, + "required": [ + "alerts_threshold", + "security_alerts_threshold", + "tool" + ] + } + } + }, + "required": [ + "code_scanning_tools" + ] + } + } + } + ] + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "

Get a repository ruleset for an enterprise.

\n

Note: To prevent leaking sensitive information, the bypass_actors property is only returned if the user\nmaking the API request has write access to the ruleset.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

OK

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "put", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}", + "title": "Update an enterprise repository ruleset", + "category": "enterprise-admin", + "subcategory": "rules", + "parameters": [ + { + "name": "enterprise", + "description": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ruleset_id", + "description": "

The ID of the ruleset.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "name", + "in": "body", + "description": "

The name of the ruleset.

" + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "

The target of the ruleset

", + "enum": [ + "branch", + "tag", + "push", + "repository" + ] + }, + { + "type": "string", + "name": "enforcement", + "in": "body", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", + "enum": [ + "disabled", + "active", + "evaluate" + ] + }, + { + "type": "array of objects", + "name": "bypass_actors", + "in": "body", + "description": "

The actors that can bypass the rules in this ruleset

", + "childParamsGroups": [ + { + "type": "integer or null", + "name": "actor_id", + "description": "

The ID of the actor that can bypass a ruleset. If actor_type is OrganizationAdmin, this should be 1. If actor_type is DeployKey, this should be null. If actor_type is EnterpriseOwner, actor_id is ignored. OrganizationAdmin and EnterpriseOwner are not applicable for personal repositories.

" + }, + { + "type": "string", + "name": "actor_type", + "description": "

The type of actor that can bypass a ruleset

", + "isRequired": true, + "enum": [ + "Integration", + "OrganizationAdmin", + "RepositoryRole", + "Team", + "DeployKey", + "EnterpriseOwner" + ] + }, + { + "type": "string", + "name": "bypass_mode", + "description": "

When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. pull_request is not applicable for the DeployKey actor type. Also, pull_request is only applicable to branch rulesets.

", + "enum": [ + "always", + "pull_request" + ], + "default": "always" + } + ] + }, + { + "type": "object", + "name": "conditions", + "in": "body", + "description": "

Conditions for an enterprise ruleset. The conditions object should contain either the organization_id or organization_name property and the repository_name or repository_property property. For branch and tag rulesets, the conditions object should also contain the ref_name property.

", + "childParamsGroups": [ + { + "type": "object", + "name": "organization_name_and_repository_name", + "description": "

Conditions to target organizations by name and all repositories

", + "isRequired": [ + "organization_name", + "repository_name" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of organization names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all organizations and ~EMUS to target all enterprise managed user accounts.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of organization names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + }, + { + "type": "object", + "name": "repository_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all repositories.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.

" + }, + { + "type": "boolean", + "name": "protected", + "description": "

Whether renaming of target repositories is prevented.

" + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + }, + { + "type": "object", + "name": "organization_name_and_repository_property", + "description": "

Conditions to target organizations by name and repositories by property

", + "isRequired": [ + "organization_name", + "repository_property" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of organization names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all organizations and ~EMUS to target all enterprise managed user accounts.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of organization names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + }, + { + "type": "object", + "name": "repository_property", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of objects", + "name": "include", + "description": "

The repository properties and values to include. All of these properties must match for the condition to pass.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + }, + { + "type": "array of objects", + "name": "exclude", + "description": "

The repository properties and values to exclude. The condition will not pass if any of these properties match.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + }, + { + "type": "object", + "name": "organization_id_and_repository_name", + "description": "

Conditions to target organizations by id and all repositories

", + "isRequired": [ + "organization_id", + "repository_name" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_id", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of integers", + "name": "organization_ids", + "description": "

The organization IDs that the ruleset applies to. One of these IDs must match for the condition to pass.

" + } + ] + }, + { + "type": "object", + "name": "repository_name", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all repositories.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.

" + }, + { + "type": "boolean", + "name": "protected", + "description": "

Whether renaming of target repositories is prevented.

" + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + }, + { + "type": "object", + "name": "organization_id_and_repository_property", + "description": "

Conditions to target organization by id and repositories by property

", + "isRequired": [ + "organization_id", + "repository_property" + ], + "childParamsGroups": [ + { + "type": "object", + "name": "organization_id", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of integers", + "name": "organization_ids", + "description": "

The organization IDs that the ruleset applies to. One of these IDs must match for the condition to pass.

" + } + ] + }, + { + "type": "object", + "name": "repository_property", + "description": "", + "isRequired": true, + "childParamsGroups": [ + { + "type": "array of objects", + "name": "include", + "description": "

The repository properties and values to include. All of these properties must match for the condition to pass.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + }, + { + "type": "array of objects", + "name": "exclude", + "description": "

The repository properties and values to exclude. The condition will not pass if any of these properties match.

", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

The name of the repository property to target

", + "isRequired": true + }, + { + "type": "array of strings", + "name": "property_values", + "description": "

The values to match for the repository property

", + "isRequired": true + }, + { + "type": "string", + "name": "source", + "description": "

The source of the repository property. Defaults to 'custom' if not specified.

", + "enum": [ + "custom", + "system" + ] + } + ] + } + ] + }, + { + "type": "object", + "name": "ref_name", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "include", + "description": "

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

" + }, + { + "type": "array of strings", + "name": "exclude", + "description": "

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

" + } + ] + } + ] + } + ], + "oneOfObject": true + }, + { + "type": "array of objects", + "name": "rules", + "in": "body", + "description": "

An array of rules within the ruleset.

", + "childParamsGroups": [ + { + "type": "object", + "name": "creation", + "description": "

Only allow users with bypass permission to create matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "creation" + ] + } + ] + }, + { + "type": "object", + "name": "update", + "description": "

Only allow users with bypass permission to update matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "update" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "boolean", + "name": "update_allows_fetch_and_merge", + "description": "

Branch can pull changes from its upstream repository

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "deletion", + "description": "

Only allow users with bypass permissions to delete matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "deletion" + ] + } + ] + }, + { + "type": "object", + "name": "required_linear_history", + "description": "

Prevent merge commits from being pushed to matching refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_linear_history" + ] + } + ] + }, + { + "type": "object", + "name": "merge_queue", + "description": "

Merges must be performed via a merge queue.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "merge_queue" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "integer", + "name": "check_response_timeout_minutes", + "description": "

Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed

", + "isRequired": true + }, + { + "type": "string", + "name": "grouping_strategy", + "description": "

When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge.

", + "isRequired": true, + "enum": [ + "ALLGREEN", + "HEADGREEN" + ] + }, + { + "type": "integer", + "name": "max_entries_to_build", + "description": "

Limit the number of queued pull requests requesting checks and workflow runs at the same time.

", + "isRequired": true + }, + { + "type": "integer", + "name": "max_entries_to_merge", + "description": "

The maximum number of PRs that will be merged together in a group.

", + "isRequired": true + }, + { + "type": "string", + "name": "merge_method", + "description": "

Method to use when merging changes from queued pull requests.

", + "isRequired": true, + "enum": [ + "MERGE", + "SQUASH", + "REBASE" + ] + }, + { + "type": "integer", + "name": "min_entries_to_merge", + "description": "

The minimum number of PRs that will be merged together in a group.

", + "isRequired": true + }, + { + "type": "integer", + "name": "min_entries_to_merge_wait_minutes", + "description": "

The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "required_deployments", + "description": "

Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_deployments" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "required_deployment_environments", + "description": "

The environments that must be successfully deployed to before branches can be merged.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "required_signatures", + "description": "

Commits pushed to matching refs must have verified signatures.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_signatures" + ] + } + ] + }, + { + "type": "object", + "name": "pull_request", + "description": "

Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "pull_request" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, + { + "type": "boolean", + "name": "dismiss_stale_reviews_on_push", + "description": "

New, reviewable commits pushed will dismiss previous pull request review approvals.

", + "isRequired": true + }, + { + "type": "boolean", + "name": "require_code_owner_review", + "description": "

Require an approving review in pull requests that modify files that have a designated code owner.

", + "isRequired": true + }, + { + "type": "boolean", + "name": "require_last_push_approval", + "description": "

Whether the most recent reviewable push must be approved by someone other than the person who pushed it.

", + "isRequired": true + }, + { + "type": "integer", + "name": "required_approving_review_count", + "description": "

The number of approving reviews that are required before a pull request can be merged.

", + "isRequired": true + }, + { + "type": "boolean", + "name": "required_review_thread_resolution", + "description": "

All conversations on code must be resolved before a pull request can be merged.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "required_status_checks", + "description": "

Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "required_status_checks" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "boolean", + "name": "do_not_enforce_on_create", + "description": "

Allow repositories and branches to be created if a check would otherwise prohibit it.

" + }, + { + "type": "array of objects", + "name": "required_status_checks", + "description": "

Status checks that are required.

", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "context", + "description": "

The status check context name that must be present on the commit.

", + "isRequired": true + }, + { + "type": "integer", + "name": "integration_id", + "description": "

The optional integration ID that this status check must originate from.

" + } + ] + }, + { + "type": "boolean", + "name": "strict_required_status_checks_policy", + "description": "

Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "non_fast_forward", + "description": "

Prevent users with push access from force pushing to refs.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "non_fast_forward" + ] + } + ] + }, + { + "type": "object", + "name": "commit_message_pattern", + "description": "

Parameters to be used for the commit_message_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "commit_message_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "commit_author_email_pattern", + "description": "

Parameters to be used for the commit_author_email_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "commit_author_email_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "committer_email_pattern", + "description": "

Parameters to be used for the committer_email_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "committer_email_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "branch_name_pattern", + "description": "

Parameters to be used for the branch_name_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "branch_name_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "tag_name_pattern", + "description": "

Parameters to be used for the tag_name_pattern rule

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "tag_name_pattern" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "string", + "name": "name", + "description": "

How this rule will appear to users.

" + }, + { + "type": "boolean", + "name": "negate", + "description": "

If true, the rule will fail if the pattern matches.

" + }, + { + "type": "string", + "name": "operator", + "description": "

The operator to use for matching.

", + "isRequired": true, + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + { + "type": "string", + "name": "pattern", + "description": "

The pattern to match with.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "file_path_restriction", + "description": "

Prevent commits that include changes in specified file paths from being pushed to the commit graph.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "file_path_restriction" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "restricted_file_paths", + "description": "

The file paths that are restricted from being pushed to the commit graph.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "max_file_path_length", + "description": "

Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "max_file_path_length" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "integer", + "name": "max_file_path_length", + "description": "

The maximum amount of characters allowed in file paths

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "file_extension_restriction", + "description": "

Prevent commits that include files with specified file extensions from being pushed to the commit graph.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "file_extension_restriction" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of strings", + "name": "restricted_file_extensions", + "description": "

The file extensions that are restricted from being pushed to the commit graph.

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "max_file_size", + "description": "

Prevent commits that exceed a specified file size limit from being pushed to the commit.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "max_file_size" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "integer", + "name": "max_file_size", + "description": "

The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS).

", + "isRequired": true + } + ] + } + ] + }, + { + "type": "object", + "name": "workflows", + "description": "

Require all changes made to a targeted branch to pass the specified workflows before they can be merged.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "workflows" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "boolean", + "name": "do_not_enforce_on_create", + "description": "

Allow repositories and branches to be created if a check would otherwise prohibit it.

" + }, + { + "type": "array of objects", + "name": "workflows", + "description": "

Workflows that must pass for this rule to pass.

", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "path", + "description": "

The path to the workflow file

", + "isRequired": true + }, + { + "type": "string", + "name": "ref", + "description": "

The ref (branch or tag) of the workflow file to use

" + }, + { + "type": "integer", + "name": "repository_id", + "description": "

The ID of the repository where the workflow is defined

", + "isRequired": true + }, + { + "type": "string", + "name": "sha", + "description": "

The commit SHA of the workflow file to use

" + } + ] + } + ] + } + ] + }, + { + "type": "object", + "name": "code_scanning", + "description": "

Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.

", + "isRequired": [ + "type" + ], + "childParamsGroups": [ + { + "type": "string", + "name": "type", + "description": "", + "isRequired": true, + "enum": [ + "code_scanning" + ] + }, + { + "type": "object", + "name": "parameters", + "description": "", + "childParamsGroups": [ + { + "type": "array of objects", + "name": "code_scanning_tools", + "description": "

Tools that must provide code scanning results for this rule to pass.

", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "alerts_threshold", + "description": "

The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see \"About code scanning alerts.\"

", + "isRequired": true, + "enum": [ + "none", + "errors", + "errors_and_warnings", + "all" + ] + }, + { + "type": "string", + "name": "security_alerts_threshold", + "description": "

The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see \"About code scanning alerts.\"

", + "isRequired": true, + "enum": [ + "none", + "critical", + "high_or_higher", + "medium_or_higher", + "all" + ] + }, + { + "type": "string", + "name": "tool", + "description": "

The name of a code scanning tool

", + "isRequired": true + } + ] + } + ] + } + ] + } + ], + "oneOfObject": true + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "super cool ruleset", + "target": "repository", + "enforcement": "active", + "bypass_actors": [ + { + "actor_id": 234, + "actor_type": "Team", + "bypass_mode": "always" + } + ], + "conditions": { + "org_name": { + "include": [ + "important_org" + ], + "exclude": [ + "unimportant_org" + ] + } + }, + "rules": [ + { + "type": "repository_delete" + } + ] + }, + "parameters": { + "enterprise": "ENTERPRISE", + "ruleset_id": "RULESET_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "id": 21, + "name": "super cool ruleset", + "target": "repository", + "source_type": "Enterprise", + "source": "my-enterprise", + "enforcement": "active", + "conditions": { + "organization_name": { + "include": [ + "important_organization" + ] + }, + "repository_name": { + "include": [ + "~ALL" + ] + } + }, + "rules": [ + { + "type": "repository_delete" + } + ], + "node_id": "RRS_lACkVXNlcgQB", + "_links": { + "self": { + "href": "https://api.github.com/enterprises/my-enterprise/rulesets/21" + }, + "html": { + "href": "https://github.com/enterprise/my-enterprise/settings/policies/repositories/21" + } + }, + "created_at": "2024-08-15T08:43:03Z", + "updated_at": "2024-09-23T16:29:47Z" + }, + "schema": { + "title": "Repository ruleset", + "type": "object", + "description": "A set of rules to apply when specified conditions are met.", + "required": [ + "id", + "name", + "source", + "enforcement" + ], + "properties": { + "id": { + "type": "integer", + "description": "The ID of the ruleset" + }, + "name": { + "type": "string", + "description": "The name of the ruleset" + }, + "target": { + "type": "string", + "description": "The target of the ruleset", + "enum": [ + "branch", + "tag", + "push", + "repository" + ] + }, + "source_type": { + "type": "string", + "description": "The type of the source of the ruleset", + "enum": [ + "Repository", + "Organization", + "Enterprise" + ] + }, + "source": { + "type": "string", + "description": "The name of the source" + }, + "enforcement": { + "type": "string", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", + "enum": [ + "disabled", + "active", + "evaluate" + ] + }, + "bypass_actors": { + "type": "array", + "description": "The actors that can bypass the rules in this ruleset", + "items": { + "title": "Repository Ruleset Bypass Actor", + "type": "object", + "description": "An actor that can bypass rules in a ruleset", + "required": [ + "actor_type" + ], + "properties": { + "actor_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. If `actor_type` is `EnterpriseOwner`, `actor_id` is ignored. `OrganizationAdmin` and `EnterpriseOwner` are not applicable for personal repositories." + }, + "actor_type": { + "type": "string", + "enum": [ + "Integration", + "OrganizationAdmin", + "RepositoryRole", + "Team", + "DeployKey", + "EnterpriseOwner" + ], + "description": "The type of actor that can bypass a ruleset" + }, + "bypass_mode": { + "type": "string", + "description": "When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets.", + "enum": [ + "always", + "pull_request" + ], + "default": "always" + } + } + } + }, + "current_user_can_bypass": { + "type": "string", + "description": "The bypass type of the user making the API request for this ruleset. This field is only returned when\nquerying the repository-level endpoint.", + "enum": [ + "always", + "pull_requests_only", + "never" + ] + }, + "node_id": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URL of the ruleset" + } + } + }, + "html": { + "type": [ + "object", + "null" + ], + "properties": { + "href": { + "type": "string", + "description": "The html URL of the ruleset" + } + } + } + } + }, + "conditions": { + "anyOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Organization ruleset conditions", + "type": "object", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", + "oneOf": [ + { + "type": "object", + "title": "repository_name_and_ref_name", + "description": "Conditions to target repositories by name and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository names", + "type": "object", + "description": "Parameters for a repository name condition", + "properties": { + "repository_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + }, + "protected": { + "type": "boolean", + "description": "Whether renaming of target repositories is prevented." + } + } + } + }, + "required": [ + "repository_name" + ] + } + ] + }, + { + "type": "object", + "title": "repository_id_and_ref_name", + "description": "Conditions to target repositories by id and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository IDs", + "type": "object", + "description": "Parameters for a repository ID condition", + "properties": { + "repository_id": { + "type": "object", + "properties": { + "repository_ids": { + "type": "array", + "description": "The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.", + "items": { + "type": "integer" + } + } + } + } + }, + "required": [ + "repository_id" + ] + } + ] + }, + { + "type": "object", + "title": "repository_property_and_ref_name", + "description": "Conditions to target repositories by property and refs by name", + "allOf": [ + { + "title": "Repository ruleset conditions for ref names", + "type": "object", + "description": "Parameters for a repository ruleset ref name condition", + "properties": { + "ref_name": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.", + "items": { + "type": "string" + } + }, + "exclude": { + "type": "array", + "description": "Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.", + "items": { + "type": "string" + } + } + } + } + } + }, + { + "title": "Repository ruleset conditions for repository properties", + "type": "object", + "description": "Parameters for a repository property condition", + "properties": { + "repository_property": { + "type": "object", + "properties": { + "include": { + "type": "array", + "description": "The repository properties and values to include. All of these properties must match for the condition to pass.", + "items": { + "title": "Repository ruleset property targeting definition", + "type": "object", + "description": "Parameters for a targeting a repository property", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository property to target" + }, + "property_values": { + "type": "array", + "description": "The values to match for the repository property", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "description": "The source of the repository property. Defaults to 'custom' if not specified.", + "enum": [ + "custom", + "system" + ] + } + }, + "required": [ + "name", + "property_values" + ] + } + }, + "exclude": { + "type": "array", + "description": "The repository properties and values to exclude. The condition will not pass if any of these properties match.", + "items": { + "title": "Repository ruleset property targeting definition", + "type": "object", + "description": "Parameters for a targeting a repository property", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository property to target" + }, + "property_values": { + "type": "array", + "description": "The values to match for the repository property", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "description": "The source of the repository property. Defaults to 'custom' if not specified.", + "enum": [ + "custom", + "system" + ] + } + }, + "required": [ + "name", + "property_values" + ] + } + } + } + } + }, + "required": [ + "repository_property" + ] + } + ] + } + ] + } + ], + "type": [ + "null", + "object" + ] + }, + "rules": { + "type": "array", + "items": { + "title": "Repository Rule", + "type": "object", + "description": "A repository rule.", + "oneOf": [ + { + "title": "creation", + "description": "Only allow users with bypass permission to create matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "creation" + ] + } + } + }, + { + "title": "update", + "description": "Only allow users with bypass permission to update matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "update" + ] + }, + "parameters": { + "type": "object", + "properties": { + "update_allows_fetch_and_merge": { + "type": "boolean", + "description": "Branch can pull changes from its upstream repository" + } + }, + "required": [ + "update_allows_fetch_and_merge" + ] + } + } + }, + { + "title": "deletion", + "description": "Only allow users with bypass permissions to delete matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "deletion" + ] + } + } + }, + { + "title": "required_linear_history", + "description": "Prevent merge commits from being pushed to matching refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_linear_history" + ] + } + } + }, + { + "title": "merge_queue", + "description": "Merges must be performed via a merge queue.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "merge_queue" + ] + }, + "parameters": { + "type": "object", + "properties": { + "check_response_timeout_minutes": { + "type": "integer", + "description": "Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed", + "minimum": 1, + "maximum": 360 + }, + "grouping_strategy": { + "type": "string", + "description": "When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge.", + "enum": [ + "ALLGREEN", + "HEADGREEN" + ] + }, + "max_entries_to_build": { + "type": "integer", + "description": "Limit the number of queued pull requests requesting checks and workflow runs at the same time.", + "minimum": 0, + "maximum": 100 + }, + "max_entries_to_merge": { + "type": "integer", + "description": "The maximum number of PRs that will be merged together in a group.", + "minimum": 0, + "maximum": 100 + }, + "merge_method": { + "type": "string", + "description": "Method to use when merging changes from queued pull requests.", + "enum": [ + "MERGE", + "SQUASH", + "REBASE" + ] + }, + "min_entries_to_merge": { + "type": "integer", + "description": "The minimum number of PRs that will be merged together in a group.", + "minimum": 0, + "maximum": 100 + }, + "min_entries_to_merge_wait_minutes": { + "type": "integer", + "description": "The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged.", + "minimum": 0, + "maximum": 360 + } + }, + "required": [ + "check_response_timeout_minutes", + "grouping_strategy", + "max_entries_to_build", + "max_entries_to_merge", + "merge_method", + "min_entries_to_merge", + "min_entries_to_merge_wait_minutes" + ] + } + } + }, + { + "title": "required_deployments", + "description": "Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_deployments" + ] + }, + "parameters": { + "type": "object", + "properties": { + "required_deployment_environments": { + "type": "array", + "description": "The environments that must be successfully deployed to before branches can be merged.", + "items": { + "type": "string" + } + } + }, + "required": [ + "required_deployment_environments" + ] + } } }, - "github_com_user": { - "type": "boolean" + { + "title": "required_signatures", + "description": "Commits pushed to matching refs must have verified signatures.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_signatures" + ] + } + } }, - "enterprise_server_user": { - "type": [ - "boolean", - "null" - ] + { + "title": "pull_request", + "description": "Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "pull_request" + ] + }, + "parameters": { + "type": "object", + "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, + "dismiss_stale_reviews_on_push": { + "type": "boolean", + "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." + }, + "require_code_owner_review": { + "type": "boolean", + "description": "Require an approving review in pull requests that modify files that have a designated code owner." + }, + "require_last_push_approval": { + "type": "boolean", + "description": "Whether the most recent reviewable push must be approved by someone other than the person who pushed it." + }, + "required_approving_review_count": { + "type": "integer", + "description": "The number of approving reviews that are required before a pull request can be merged.", + "minimum": 0, + "maximum": 10 + }, + "required_review_thread_resolution": { + "type": "boolean", + "description": "All conversations on code must be resolved before a pull request can be merged." + } + }, + "required": [ + "dismiss_stale_reviews_on_push", + "require_code_owner_review", + "require_last_push_approval", + "required_approving_review_count", + "required_review_thread_resolution" + ] + } + } }, - "visual_studio_subscription_user": { - "type": "boolean" + { + "title": "required_status_checks", + "description": "Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "required_status_checks" + ] + }, + "parameters": { + "type": "object", + "properties": { + "do_not_enforce_on_create": { + "type": "boolean", + "description": "Allow repositories and branches to be created if a check would otherwise prohibit it." + }, + "required_status_checks": { + "type": "array", + "description": "Status checks that are required.", + "items": { + "title": "StatusCheckConfiguration", + "description": "Required status check", + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The status check context name that must be present on the commit." + }, + "integration_id": { + "type": "integer", + "description": "The optional integration ID that this status check must originate from." + } + }, + "required": [ + "context" + ] + } + }, + "strict_required_status_checks_policy": { + "type": "boolean", + "description": "Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled." + } + }, + "required": [ + "required_status_checks", + "strict_required_status_checks_policy" + ] + } + } }, - "license_type": { - "type": "string" + { + "title": "non_fast_forward", + "description": "Prevent users with push access from force pushing to refs.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "non_fast_forward" + ] + } + } }, - "github_com_profile": { - "type": [ - "string", - "null" - ] + { + "title": "commit_message_pattern", + "description": "Parameters to be used for the commit_message_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "commit_message_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } }, - "github_com_member_roles": { - "type": "array", - "items": { - "type": "string" + { + "title": "commit_author_email_pattern", + "description": "Parameters to be used for the commit_author_email_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "commit_author_email_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } } }, - "github_com_enterprise_roles": { - "type": "array", - "description": "All enterprise roles for a user.", - "items": { - "type": "string" + { + "title": "committer_email_pattern", + "description": "Parameters to be used for the committer_email_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "committer_email_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } } }, - "github_com_verified_domain_emails": { - "type": "array", - "items": { - "type": "string" + { + "title": "branch_name_pattern", + "description": "Parameters to be used for the branch_name_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "branch_name_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } } }, - "github_com_saml_name_id": { - "type": [ - "string", - "null" - ] + { + "title": "tag_name_pattern", + "description": "Parameters to be used for the tag_name_pattern rule", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "tag_name_pattern" + ] + }, + "parameters": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "How this rule will appear to users." + }, + "negate": { + "type": "boolean", + "description": "If true, the rule will fail if the pattern matches." + }, + "operator": { + "type": "string", + "description": "The operator to use for matching.", + "enum": [ + "starts_with", + "ends_with", + "contains", + "regex" + ] + }, + "pattern": { + "type": "string", + "description": "The pattern to match with." + } + }, + "required": [ + "operator", + "pattern" + ] + } + } }, - "github_com_orgs_with_pending_invites": { - "type": "array", - "items": { - "type": "string" + { + "title": "file_path_restriction", + "description": "Prevent commits that include changes in specified file paths from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_path_restriction" + ] + }, + "parameters": { + "type": "object", + "properties": { + "restricted_file_paths": { + "type": "array", + "description": "The file paths that are restricted from being pushed to the commit graph.", + "items": { + "type": "string" + } + } + }, + "required": [ + "restricted_file_paths" + ] + } } }, - "github_com_two_factor_auth": { - "type": [ - "boolean", - "null" - ] + { + "title": "max_file_path_length", + "description": "Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "max_file_path_length" + ] + }, + "parameters": { + "type": "object", + "properties": { + "max_file_path_length": { + "type": "integer", + "description": "The maximum amount of characters allowed in file paths", + "minimum": 1, + "maximum": 256 + } + }, + "required": [ + "max_file_path_length" + ] + } + } }, - "enterprise_server_emails": { - "type": "array", - "items": { - "type": "string" + { + "title": "file_extension_restriction", + "description": "Prevent commits that include files with specified file extensions from being pushed to the commit graph.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_extension_restriction" + ] + }, + "parameters": { + "type": "object", + "properties": { + "restricted_file_extensions": { + "type": "array", + "description": "The file extensions that are restricted from being pushed to the commit graph.", + "items": { + "type": "string" + } + } + }, + "required": [ + "restricted_file_extensions" + ] + } } }, - "visual_studio_license_status": { - "type": [ - "string", - "null" - ] + { + "title": "max_file_size", + "description": "Prevent commits that exceed a specified file size limit from being pushed to the commit.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "max_file_size" + ] + }, + "parameters": { + "type": "object", + "properties": { + "max_file_size": { + "type": "integer", + "description": "The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS).", + "minimum": 1, + "maximum": 100 + } + }, + "required": [ + "max_file_size" + ] + } + } }, - "visual_studio_subscription_email": { - "type": [ - "string", - "null" - ] + { + "title": "workflows", + "description": "Require all changes made to a targeted branch to pass the specified workflows before they can be merged.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "workflows" + ] + }, + "parameters": { + "type": "object", + "properties": { + "do_not_enforce_on_create": { + "type": "boolean", + "description": "Allow repositories and branches to be created if a check would otherwise prohibit it." + }, + "workflows": { + "type": "array", + "description": "Workflows that must pass for this rule to pass.", + "items": { + "title": "WorkflowFileReference", + "description": "A workflow that must run for this rule to pass", + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The path to the workflow file" + }, + "ref": { + "type": "string", + "description": "The ref (branch or tag) of the workflow file to use" + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository where the workflow is defined" + }, + "sha": { + "type": "string", + "description": "The commit SHA of the workflow file to use" + } + }, + "required": [ + "path", + "repository_id" + ] + } + } + }, + "required": [ + "workflows" + ] + } + } }, - "total_user_accounts": { - "type": "integer" + { + "title": "code_scanning", + "description": "Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_scanning" + ] + }, + "parameters": { + "type": "object", + "properties": { + "code_scanning_tools": { + "type": "array", + "description": "Tools that must provide code scanning results for this rule to pass.", + "items": { + "title": "CodeScanningTool", + "description": "A tool that must provide code scanning results for this rule to pass.", + "type": "object", + "properties": { + "alerts_threshold": { + "type": "string", + "description": "The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see \"[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"", + "enum": [ + "none", + "errors", + "errors_and_warnings", + "all" + ] + }, + "security_alerts_threshold": { + "type": "string", + "description": "The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see \"[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"", + "enum": [ + "none", + "critical", + "high_or_higher", + "medium_or_higher", + "all" + ] + }, + "tool": { + "type": "string", + "description": "The name of a code scanning tool" + } + }, + "required": [ + "alerts_threshold", + "security_alerts_threshold", + "tool" + ] + } + } + }, + "required": [ + "code_scanning_tools" + ] + } + } } - } + ] } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" } } } @@ -265097,21 +271961,29 @@ } ], "previews": [], - "descriptionHTML": "

Lists the license consumption information for all users, including those from connected servers, associated with an enterprise.

\n

The authenticated user must be an enterprise admin to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.

", + "descriptionHTML": "

Update a ruleset for an enterprise.

", "statusCodes": [ { "httpStatusCode": "200", - "description": "

Consumed Licenses Response

" + "description": "

OK

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" } ] }, { "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/enterprises/{enterprise}/license-sync-status", - "title": "Get a license sync status", + "verb": "delete", + "requestPath": "/enterprises/{enterprise}/rulesets/{ruleset_id}", + "title": "Delete an enterprise repository ruleset", "category": "enterprise-admin", - "subcategory": "license", + "subcategory": "rules", "parameters": [ { "name": "enterprise", @@ -265121,6 +271993,15 @@ "schema": { "type": "string" } + }, + { + "name": "ruleset_id", + "description": "

The ID of the ruleset.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } } ], "bodyParameters": [], @@ -265130,7 +272011,7 @@ "fineGrainedPat": true, "permissions": [ { - "\"Enterprise administration\" business permissions": "read" + "\"Enterprise administration\" business permissions": "write" } ] }, @@ -265141,78 +272022,30 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "parameters": { - "enterprise": "ENTERPRISE" + "enterprise": "ENTERPRISE", + "ruleset_id": "RULESET_ID" } }, "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

License Sync Status Response

", - "example": { - "server_instances": [ - { - "server_id": "deadbeef1", - "hostname": "github.example.com", - "last_sync": { - "date": "2020-01-01T00:00:00Z", - "status": "success", - "error": "" - } - }, - { - "server_id": "filetoffish1", - "hostname": "github2.example.com", - "last_sync": { - "date": "2020-01-01T00:00:00Z", - "status": "success", - "error": "" - } - } - ] - }, - "schema": { - "title": "License Sync Status", - "description": "Information about the status of a license sync job for an enterprise.", - "properties": { - "server_instances": { - "type": "array", - "items": { - "type": "object", - "properties": { - "server_id": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "last_sync": { - "type": "object", - "properties": { - "date": { - "type": "string" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - } - } - } - } + "statusCode": "204", + "description": "

Response

" } } ], "previews": [], - "descriptionHTML": "

Gets information about the status of a license sync job for an enterprise.

\n

The authenticated user must be an enterprise admin to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.

", + "descriptionHTML": "

Delete a ruleset for an enterprise.

", "statusCodes": [ { - "httpStatusCode": "200", - "description": "

License Sync Status Response

" + "httpStatusCode": "204", + "description": "

No Content

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" } ] } @@ -390021,6 +396854,9 @@ }, "repository_id": { "type": "integer" + }, + "bundle_url": { + "type": "string" } } } @@ -410727,7 +417563,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -410735,7 +417572,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -410744,7 +417582,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -410862,7 +417700,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -411333,6 +418171,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -411986,7 +418831,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ], "default": "branch" }, @@ -411994,7 +418840,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -412043,7 +418889,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -412474,6 +419320,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -413259,7 +420110,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -413267,7 +420119,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -413276,7 +420129,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -413394,7 +420247,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -413865,6 +420718,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -414617,7 +421477,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -414625,7 +421486,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -414634,7 +421496,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -414752,7 +421614,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -415223,6 +422085,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -415883,14 +422752,15 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -415938,7 +422808,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -416369,6 +423239,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -417155,7 +424030,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -417163,7 +424039,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -417172,7 +424049,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -417290,7 +424167,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -417761,6 +424638,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -483411,6 +490295,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -483667,6 +490557,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ @@ -515554,6 +522468,9 @@ }, "repository_id": { "type": "integer" + }, + "bundle_url": { + "type": "string" } } } @@ -542942,6 +549859,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -543837,7 +550761,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -543845,7 +550770,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -543854,7 +550780,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -543972,7 +550898,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -544443,6 +551369,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -545113,7 +552046,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -545428,6 +552361,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -546194,7 +553132,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -546202,7 +553141,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -546211,7 +553151,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -546329,7 +553269,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -546800,6 +553740,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -547563,7 +554510,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -547571,7 +554519,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -547580,7 +554529,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -547698,7 +554647,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -548169,6 +555118,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -548845,7 +555801,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -549159,6 +556115,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -549926,7 +556887,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, "source_type": { @@ -549934,7 +556896,8 @@ "description": "The type of the source of the ruleset", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, "source": { @@ -549943,7 +556906,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -550061,7 +557024,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -550532,6 +557495,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -564112,6 +571082,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -564203,6 +571174,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -565390,6 +572362,13 @@ } ] }, + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, "push_protection_bypass_request_comment": { "type": [ "string", @@ -565767,6 +572746,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -565858,6 +572838,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -567045,6 +574026,13 @@ } ] }, + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, "push_protection_bypass_request_comment": { "type": [ "string", @@ -567365,6 +574353,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -567389,6 +574378,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -568032,6 +575022,13 @@ } ] }, + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, "push_protection_bypass_request_comment": { "type": [ "string", @@ -568175,6 +575172,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -568815,490 +575813,681 @@ } ] }, - "push_protection_bypass_request_comment": { - "type": [ - "string", - "null" - ], - "description": "An optional comment when requesting a push protection bypass." - }, - "push_protection_bypass_request_html_url": { - "type": [ - "string", - "null" - ], - "format": "uri", - "description": "The URL to a push protection bypass request." - }, - "validity": { - "type": "string", - "description": "The token status as of the latest validity check.", - "enum": [ - "active", - "inactive", - "unknown" - ] - }, - "publicly_leaked": { - "type": [ - "boolean", - "null" - ], - "description": "Whether the detected secret was publicly leaked." - }, - "multi_repo": { - "type": [ - "boolean", - "null" - ], - "description": "Whether the detected secret was found in multiple repositories under the same organization or enterprise." - } - } - } - } - } - ], - "previews": [], - "descriptionHTML": "

Gets a single secret scanning alert detected in an eligible repository.

\n

The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

", - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

OK

" - }, - { - "httpStatusCode": "304", - "description": "

Not modified

" - }, - { - "httpStatusCode": "404", - "description": "

Repository is public, or secret scanning is disabled for the repository, or the resource is not found

" - }, - { - "httpStatusCode": "503", - "description": "

Service unavailable

" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", - "title": "Update a secret scanning alert", - "category": "secret-scanning", - "subcategory": "secret-scanning", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "alert_number", - "in": "path", - "description": "

The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.

", - "required": true, - "schema": { - "type": "integer", - "description": "The security alert number.", - "readOnly": true - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "state", - "in": "body", - "description": "

Sets the state of the secret scanning alert. You must provide resolution when you set the state to resolved.

", - "isRequired": true, - "enum": [ - "open", - "resolved" - ] - }, - { - "type": "string or null", - "name": "resolution", - "in": "body", - "description": "

Required when the state is resolved. The reason for resolving the alert.

", - "enum": [ - "false_positive", - "wont_fix", - "revoked", - "used_in_tests", - null - ] - }, - { - "type": "string or null", - "name": "resolution_comment", - "in": "body", - "description": "

An optional comment when closing an alert. Cannot be updated or deleted. Must be null when changing state to open.

" - } - ], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Secret scanning alerts\" repository permissions": "write" - } - ] - }, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "state": "resolved", - "resolution": "false_positive" - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "alert_number": "ALERT_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "number": 42, - "created_at": "2020-11-06T18:18:30Z", - "url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42", - "html_url": "https://github.com/owner/private-repo/security/secret-scanning/42", - "locations_url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42/locations", - "state": "resolved", - "resolution": "used_in_tests", - "resolved_at": "2020-11-16T22:42:07Z", - "resolved_by": { - "login": "monalisa", - "id": 2, - "node_id": "MDQ6VXNlcjI=", - "avatar_url": "https://alambic.github.com/avatars/u/2?", - "gravatar_id": "", - "url": "https://api.github.com/users/monalisa", - "html_url": "https://github.com/monalisa", - "followers_url": "https://api.github.com/users/monalisa/followers", - "following_url": "https://api.github.com/users/monalisa/following{/other_user}", - "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", - "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", - "organizations_url": "https://api.github.com/users/monalisa/orgs", - "repos_url": "https://api.github.com/users/monalisa/repos", - "events_url": "https://api.github.com/users/monalisa/events{/privacy}", - "received_events_url": "https://api.github.com/users/monalisa/received_events", - "type": "User", - "site_admin": true - }, - "secret_type": "mailchimp_api_key", - "secret_type_display_name": "Mailchimp API Key", - "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2", - "push_protection_bypassed": false, - "push_protection_bypassed_by": null, - "push_protection_bypassed_at": null, - "push_protection_bypass_request_reviewer": null, - "push_protection_bypass_request_comment": null, - "push_protection_bypass_request_html_url": null, - "resolution_comment": "Example comment", - "validity": "unknown", - "publicly_leaked": false, - "multi_repo": false - }, - "schema": { - "type": "object", - "properties": { - "number": { - "type": "integer", - "description": "The security alert number.", - "readOnly": true - }, - "created_at": { - "type": "string", - "description": "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", - "format": "date-time", - "readOnly": true - }, - "updated_at": { - "anyOf": [ - { - "type": "null" - }, - { - "type": "string", - "description": "The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", - "format": "date-time", - "readOnly": true - } - ] - }, - "url": { - "type": "string", - "description": "The REST API URL of the alert resource.", - "format": "uri", - "readOnly": true - }, - "html_url": { - "type": "string", - "description": "The GitHub URL of the alert resource.", - "format": "uri", - "readOnly": true - }, - "locations_url": { - "type": "string", - "format": "uri", - "description": "The REST API URL of the code locations for this alert." - }, - "state": { - "description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.", - "type": "string", - "enum": [ - "open", - "resolved" - ] - }, - "resolution": { - "type": [ - "string", - "null" - ], - "description": "**Required when the `state` is `resolved`.** The reason for resolving the alert.", - "enum": [ - "false_positive", - "wont_fix", - "revoked", - "used_in_tests", - null - ] - }, - "resolved_at": { + "push_protection_bypass_request_reviewer_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when reviewing a push protection bypass." + }, + "push_protection_bypass_request_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment when requesting a push protection bypass." + }, + "push_protection_bypass_request_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "The URL to a push protection bypass request." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] + }, + "publicly_leaked": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the detected secret was publicly leaked." + }, + "multi_repo": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the detected secret was found in multiple repositories under the same organization or enterprise." + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "

Gets a single secret scanning alert detected in an eligible repository.

\n

The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

\n

OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

OK

" + }, + { + "httpStatusCode": "304", + "description": "

Not modified

" + }, + { + "httpStatusCode": "404", + "description": "

Repository is public, or secret scanning is disabled for the repository, or the resource is not found

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", + "title": "Update a secret scanning alert", + "category": "secret-scanning", + "subcategory": "secret-scanning", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "alert_number", + "in": "path", + "description": "

The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.

", + "required": true, + "schema": { + "type": "integer", + "description": "The security alert number.", + "readOnly": true + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "state", + "in": "body", + "description": "

Sets the state of the secret scanning alert. You must provide resolution when you set the state to resolved.

", + "isRequired": true, + "enum": [ + "open", + "resolved" + ] + }, + { + "type": "string or null", + "name": "resolution", + "in": "body", + "description": "

Required when the state is resolved. The reason for resolving the alert.

", + "enum": [ + "false_positive", + "wont_fix", + "revoked", + "used_in_tests", + null + ] + }, + { + "type": "string or null", + "name": "resolution_comment", + "in": "body", + "description": "

An optional comment when closing an alert. Cannot be updated or deleted. Must be null when changing state to open.

" + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Secret scanning alerts\" repository permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "state": "resolved", + "resolution": "false_positive" + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "alert_number": "ALERT_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "number": 42, + "created_at": "2020-11-06T18:18:30Z", + "url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42", + "html_url": "https://github.com/owner/private-repo/security/secret-scanning/42", + "locations_url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42/locations", + "state": "resolved", + "resolution": "used_in_tests", + "resolved_at": "2020-11-16T22:42:07Z", + "resolved_by": { + "login": "monalisa", + "id": 2, + "node_id": "MDQ6VXNlcjI=", + "avatar_url": "https://alambic.github.com/avatars/u/2?", + "gravatar_id": "", + "url": "https://api.github.com/users/monalisa", + "html_url": "https://github.com/monalisa", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "repos_url": "https://api.github.com/users/monalisa/repos", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "type": "User", + "site_admin": true + }, + "secret_type": "mailchimp_api_key", + "secret_type_display_name": "Mailchimp API Key", + "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2", + "push_protection_bypassed": false, + "push_protection_bypassed_by": null, + "push_protection_bypassed_at": null, + "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, + "push_protection_bypass_request_comment": null, + "push_protection_bypass_request_html_url": null, + "resolution_comment": "Example comment", + "validity": "unknown", + "publicly_leaked": false, + "multi_repo": false + }, + "schema": { + "type": "object", + "properties": { + "number": { + "type": "integer", + "description": "The security alert number.", + "readOnly": true + }, + "created_at": { + "type": "string", + "description": "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.", + "format": "date-time", + "readOnly": true + } + ] + }, + "url": { + "type": "string", + "description": "The REST API URL of the alert resource.", + "format": "uri", + "readOnly": true + }, + "html_url": { + "type": "string", + "description": "The GitHub URL of the alert resource.", + "format": "uri", + "readOnly": true + }, + "locations_url": { + "type": "string", + "format": "uri", + "description": "The REST API URL of the code locations for this alert." + }, + "state": { + "description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.", + "type": "string", + "enum": [ + "open", + "resolved" + ] + }, + "resolution": { + "type": [ + "string", + "null" + ], + "description": "**Required when the `state` is `resolved`.** The reason for resolving the alert.", + "enum": [ + "false_positive", + "wont_fix", + "revoked", + "used_in_tests", + null + ] + }, + "resolved_at": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "resolved_by": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "format": "int64", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + }, + "user_view_type": { + "type": "string", + "examples": [ + "public" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "resolution_comment": { + "type": [ + "string", + "null" + ], + "description": "An optional comment to resolve an alert." + }, + "secret_type": { + "type": "string", + "description": "The type of secret that secret scanning detected." + }, + "secret_type_display_name": { + "type": "string", + "description": "User-friendly name for the detected secret, matching the `secret_type`.\nFor a list of built-in patterns, see \"[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets).\"" + }, + "secret": { + "type": "string", + "description": "The secret that was detected." + }, + "push_protection_bypassed": { + "type": [ + "boolean", + "null" + ], + "description": "Whether push protection was bypassed for the detected secret." + }, + "push_protection_bypassed_by": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "format": "int64", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + }, + "user_view_type": { + "type": "string", + "examples": [ + "public" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "push_protection_bypassed_at": { "type": [ "string", "null" ], "format": "date-time", - "description": "The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." - }, - "resolved_by": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "resolution_comment": { - "type": [ - "string", - "null" - ], - "description": "An optional comment to resolve an alert." - }, - "secret_type": { - "type": "string", - "description": "The type of secret that secret scanning detected." - }, - "secret_type_display_name": { - "type": "string", - "description": "User-friendly name for the detected secret, matching the `secret_type`.\nFor a list of built-in patterns, see \"[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets).\"" - }, - "secret": { - "type": "string", - "description": "The secret that was detected." - }, - "push_protection_bypassed": { - "type": [ - "boolean", - "null" - ], - "description": "Whether push protection was bypassed for the detected secret." + "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." }, - "push_protection_bypassed_by": { + "push_protection_bypass_request_reviewer": { "anyOf": [ { "type": "null" @@ -569473,188 +576662,12 @@ } ] }, - "push_protection_bypassed_at": { + "push_protection_bypass_request_reviewer_comment": { "type": [ "string", "null" ], - "format": "date-time", - "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." - }, - "push_protection_bypass_request_reviewer": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] + "description": "An optional comment when reviewing a push protection bypass." }, "push_protection_bypass_request_comment": { "type": [ @@ -623950,6 +630963,9 @@ }, "repository_id": { "type": "integer" + }, + "bundle_url": { + "type": "string" } } } diff --git a/src/rest/data/ghes-3.10-2022-11-28/schema.json b/src/rest/data/ghes-3.10-2022-11-28/schema.json index 474241b36ae7..903837ef2de9 100644 --- a/src/rest/data/ghes-3.10-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.10-2022-11-28/schema.json @@ -396475,6 +396475,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -396707,6 +396713,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ diff --git a/src/rest/data/ghes-3.11-2022-11-28/schema.json b/src/rest/data/ghes-3.11-2022-11-28/schema.json index ae64f9551001..423d0fff8444 100644 --- a/src/rest/data/ghes-3.11-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.11-2022-11-28/schema.json @@ -332930,7 +332930,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -333045,7 +333045,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -333323,6 +333323,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -333796,7 +333803,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -333845,7 +333852,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -334108,6 +334115,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -334550,6 +334562,16 @@ } ], "oneOfObject": true + }, + { + "type": "string", + "name": "source_type", + "in": "body", + "description": "

The type of the source of the ruleset

", + "enum": [ + "Repository", + "Organization" + ] } ], "progAccess": { @@ -334716,7 +334738,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -334831,7 +334853,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -335109,6 +335131,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -335690,7 +335719,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -335805,7 +335834,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -336083,6 +336112,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -336562,7 +336598,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -336610,7 +336646,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -336873,6 +336909,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -337482,7 +337523,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -337597,7 +337638,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -337875,6 +337916,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -402349,6 +402397,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -402581,6 +402635,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ @@ -459849,6 +459927,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -460669,7 +460754,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -460784,7 +460869,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -461062,6 +461147,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -461544,7 +461636,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -461782,6 +461874,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -462371,7 +462468,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -462486,7 +462583,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -462764,6 +462861,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -463356,7 +463460,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -463471,7 +463575,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -463749,6 +463853,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -464237,7 +464348,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -464474,6 +464585,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -465064,7 +465180,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -465179,7 +465295,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -465457,6 +465573,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/src/rest/data/ghes-3.12-2022-11-28/schema.json b/src/rest/data/ghes-3.12-2022-11-28/schema.json index fc83169a9e14..650c4258140a 100644 --- a/src/rest/data/ghes-3.12-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.12-2022-11-28/schema.json @@ -335801,7 +335801,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -335916,7 +335916,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -336194,6 +336194,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -336667,7 +336674,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -336716,7 +336723,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -336979,6 +336986,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -337421,6 +337433,16 @@ } ], "oneOfObject": true + }, + { + "type": "string", + "name": "source_type", + "in": "body", + "description": "

The type of the source of the ruleset

", + "enum": [ + "Repository", + "Organization" + ] } ], "progAccess": { @@ -337587,7 +337609,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -337702,7 +337724,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -337980,6 +338002,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -338561,7 +338590,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -338676,7 +338705,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -338954,6 +338983,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -339433,7 +339469,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -339481,7 +339517,7 @@ "type": "object", "name": "conditions", "in": "body", - "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.

", + "description": "

Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties.\nThe push rulesets conditions object does not require the ref_name property.\nFor repository policy rulesets, the conditions object should only contain the repository_name, the repository_id, or the repository_property.

", "childParamsGroups": [ { "type": "object", @@ -339744,6 +339780,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -340353,7 +340394,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -340468,7 +340509,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -340746,6 +340787,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -405220,6 +405268,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -405452,6 +405506,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ @@ -463243,6 +463321,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -464063,7 +464148,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -464178,7 +464263,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -464456,6 +464541,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -464938,7 +465030,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -465176,6 +465268,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -465765,7 +465862,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -465880,7 +465977,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -466158,6 +466255,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -466750,7 +466854,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -466865,7 +466969,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -467143,6 +467247,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -467631,7 +467742,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -467868,6 +467979,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -468458,7 +468574,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -468573,7 +468689,7 @@ { "title": "Organization ruleset conditions", "type": "object", - "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.", + "description": "Conditions for an organization ruleset.\nThe branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.\nThe push rulesets conditions object does not require the `ref_name` property.\nFor repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.", "oneOf": [ { "type": "object", @@ -468851,6 +468967,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -479598,6 +479721,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -479687,6 +479811,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -481025,6 +481150,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -481114,6 +481240,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -482395,6 +482522,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -482417,6 +482545,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, diff --git a/src/rest/data/ghes-3.13-2022-11-28/schema.json b/src/rest/data/ghes-3.13-2022-11-28/schema.json index 3bb4a49287cd..a73b31092336 100644 --- a/src/rest/data/ghes-3.13-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.13-2022-11-28/schema.json @@ -337349,7 +337349,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -337370,7 +337370,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -337879,6 +337879,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -338341,7 +338348,7 @@ "type": "string", "name": "target", "in": "body", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -338353,7 +338360,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -338756,6 +338763,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -339198,6 +339210,16 @@ } ], "oneOfObject": true + }, + { + "type": "string", + "name": "source_type", + "in": "body", + "description": "

The type of the source of the ruleset

", + "enum": [ + "Repository", + "Organization" + ] } ], "progAccess": { @@ -339344,7 +339366,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -339365,7 +339387,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -339874,6 +339896,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -340435,7 +340464,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -340456,7 +340485,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -340965,6 +340994,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -341434,7 +341470,7 @@ "type": "string", "name": "target", "in": "body", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -341445,7 +341481,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -341847,6 +341883,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -342436,7 +342477,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -342457,7 +342498,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -342966,6 +343007,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -407651,6 +407699,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -407883,6 +407937,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ @@ -465916,6 +465994,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -466716,7 +466801,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -466737,7 +466822,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -467246,6 +467331,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -467729,7 +467821,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -467967,6 +468059,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -468536,7 +468633,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -468557,7 +468654,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -469066,6 +469163,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -469638,7 +469742,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -469659,7 +469763,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -470168,6 +470272,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -470657,7 +470768,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -470894,6 +471005,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -471464,7 +471580,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -471485,7 +471601,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -471994,6 +472110,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -482741,6 +482864,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -482830,6 +482954,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -484168,6 +484293,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -484257,6 +484383,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -485538,6 +485665,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -485560,6 +485688,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, diff --git a/src/rest/data/ghes-3.14-2022-11-28/schema.json b/src/rest/data/ghes-3.14-2022-11-28/schema.json index 2bd4ae50b213..81c7c247bd23 100644 --- a/src/rest/data/ghes-3.14-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.14-2022-11-28/schema.json @@ -340206,7 +340206,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -340227,7 +340227,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -340738,6 +340738,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -341265,7 +341272,7 @@ "type": "string", "name": "target", "in": "body", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -341277,7 +341284,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -341679,6 +341686,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -342186,6 +342198,16 @@ } ], "oneOfObject": true + }, + { + "type": "string", + "name": "source_type", + "in": "body", + "description": "

The type of the source of the ruleset

", + "enum": [ + "Repository", + "Organization" + ] } ], "progAccess": { @@ -342332,7 +342354,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -342353,7 +342375,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -342864,6 +342886,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -343490,7 +343519,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -343511,7 +343540,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -344022,6 +344051,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -344556,7 +344592,7 @@ "type": "string", "name": "target", "in": "body", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -344567,7 +344603,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -344968,6 +345004,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -345622,7 +345663,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -345643,7 +345684,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -346154,6 +346195,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -410900,6 +410948,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -411132,6 +411186,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ @@ -469165,6 +469243,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -470056,7 +470141,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -470077,7 +470162,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -470588,6 +470673,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -471136,7 +471228,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -471373,6 +471465,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -472007,7 +472104,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -472028,7 +472125,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -472539,6 +472636,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -473176,7 +473280,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -473197,7 +473301,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -473708,6 +473812,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -474262,7 +474373,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -474498,6 +474609,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -475133,7 +475249,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -475154,7 +475270,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -475665,6 +475781,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -486477,6 +486600,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -486566,6 +486690,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -487904,6 +488029,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -487993,6 +488119,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -489274,6 +489401,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -489296,6 +489424,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, diff --git a/src/rest/data/ghes-3.15-2022-11-28/schema.json b/src/rest/data/ghes-3.15-2022-11-28/schema.json index 9b16b6d2fdaf..4d9dbadfc6ab 100644 --- a/src/rest/data/ghes-3.15-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.15-2022-11-28/schema.json @@ -343592,7 +343592,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -343613,7 +343613,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -344201,6 +344201,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -344728,7 +344735,7 @@ "type": "string", "name": "target", "in": "body", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -344740,7 +344747,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -345219,6 +345226,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -345726,6 +345738,16 @@ } ], "oneOfObject": true + }, + { + "type": "string", + "name": "source_type", + "in": "body", + "description": "

The type of the source of the ruleset

", + "enum": [ + "Repository", + "Organization" + ] } ], "progAccess": { @@ -345872,7 +345894,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -345893,7 +345915,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -346481,6 +346503,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -347107,7 +347136,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -347128,7 +347157,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -347716,6 +347745,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -348250,7 +348286,7 @@ "type": "string", "name": "target", "in": "body", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -348261,7 +348297,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -348739,6 +348775,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -349393,7 +349434,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -349414,7 +349455,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -350002,6 +350043,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -414856,6 +414904,12 @@ "used": 0, "remaining": 10, "reset": 1691591091 + }, + "code_scanning_autofix": { + "limit": 10, + "used": 0, + "remaining": 10, + "reset": 1691591091 } }, "rate": { @@ -415088,6 +415142,30 @@ "reset", "used" ] + }, + "code_scanning_autofix": { + "title": "Rate Limit", + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset": { + "type": "integer" + }, + "used": { + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset", + "used" + ] } }, "required": [ @@ -473377,6 +473455,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -474268,7 +474353,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -474289,7 +474374,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -474877,6 +474962,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -475425,7 +475517,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -475739,6 +475831,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -476373,7 +476470,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -476394,7 +476491,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -476982,6 +477079,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -477619,7 +477723,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -477640,7 +477744,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -478228,6 +478332,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -478782,7 +478893,7 @@ "type": "string", "name": "enforcement", "in": "body", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "enum": [ "disabled", "active", @@ -479095,6 +479206,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -479730,7 +479846,7 @@ }, "target": { "type": "string", - "description": "The target of the ruleset", + "description": "The target of the ruleset.", "enum": [ "branch", "tag", @@ -479751,7 +479867,7 @@ }, "enforcement": { "type": "string", - "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.", + "description": "The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target.", "enum": [ "disabled", "active", @@ -480339,6 +480455,13 @@ "parameters": { "type": "object", "properties": { + "allowed_merge_methods": { + "type": "array", + "description": "When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.", + "items": { + "type": "string" + } + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -491181,6 +491304,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -491270,6 +491394,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -492608,6 +492733,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -492697,6 +492823,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, @@ -493978,6 +494105,7 @@ "type": "User", "site_admin": true }, + "push_protection_bypass_request_reviewer_comment": "Example response", "push_protection_bypass_request_comment": "Example comment", "push_protection_bypass_request_html_url": "https://github.com/owner/repo/secret_scanning_exemptions/1", "resolution_comment": "Example comment", @@ -494000,6 +494128,7 @@ "push_protection_bypassed": false, "push_protection_bypassed_at": null, "push_protection_bypass_request_reviewer": null, + "push_protection_bypass_request_reviewer_comment": null, "push_protection_bypass_request_comment": null, "push_protection_bypass_request_html_url": null, "resolution_comment": null, diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index 99b22d914a60..4a235a935ec8 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -50,5 +50,5 @@ ] } }, - "sha": "4ab8513682637010cd3bb5d8ee3227cc5ce739d1" + "sha": "17a74203d23fd26f4c3510dc91713d248169bdd1" } \ No newline at end of file diff --git a/src/webhooks/data/fpt/schema.json b/src/webhooks/data/fpt/schema.json index df5e0e63ee6e..0f1836dd8ac7 100644 --- a/src/webhooks/data/fpt/schema.json +++ b/src/webhooks/data/fpt/schema.json @@ -208839,7 +208839,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { @@ -208848,7 +208849,8 @@ "description": "

The type of the source of the ruleset

", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, { @@ -209198,6 +209200,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -209932,7 +209939,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { @@ -209941,7 +209949,8 @@ "description": "

The type of the source of the ruleset

", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, { @@ -210291,6 +210300,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -211025,7 +211039,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { @@ -211034,7 +211049,8 @@ "description": "

The type of the source of the ruleset

", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, { @@ -211384,6 +211400,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -212452,6 +212473,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -213332,6 +213358,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -214217,6 +214248,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -216576,6 +216612,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -217154,6 +217195,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -217732,6 +217778,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -218310,6 +218361,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -218888,6 +218944,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -219467,6 +219528,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", diff --git a/src/webhooks/data/ghec/schema.json b/src/webhooks/data/ghec/schema.json index 5ca35af23fbc..fa15a70d90b6 100644 --- a/src/webhooks/data/ghec/schema.json +++ b/src/webhooks/data/ghec/schema.json @@ -1332,6 +1332,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1543,6 +1548,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1754,6 +1764,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1965,6 +1980,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2011,6 +2031,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2215,6 +2240,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2261,6 +2291,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2467,6 +2502,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2678,6 +2718,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2889,6 +2934,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -3100,6 +3150,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -3146,6 +3201,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -3350,6 +3410,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -3396,6 +3461,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -211173,7 +211243,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { @@ -211182,7 +211253,8 @@ "description": "

The type of the source of the ruleset

", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, { @@ -211194,7 +211266,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -211533,6 +211605,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -212267,7 +212344,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { @@ -212276,7 +212354,8 @@ "description": "

The type of the source of the ruleset

", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, { @@ -212288,7 +212367,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -212627,6 +212706,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -213361,7 +213445,8 @@ "enum": [ "branch", "tag", - "push" + "push", + "repository" ] }, { @@ -213370,7 +213455,8 @@ "description": "

The type of the source of the ruleset

", "enum": [ "Repository", - "Organization" + "Organization", + "Enterprise" ] }, { @@ -213382,7 +213468,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -213721,6 +213807,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -214789,6 +214880,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -215669,6 +215765,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -216554,6 +216655,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -218913,6 +219019,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -219491,6 +219602,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -220069,6 +220185,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -220647,6 +220768,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -221225,6 +221351,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", @@ -221804,6 +221935,11 @@ } ] }, + { + "type": "string or null", + "name": "push_protection_bypass_request_reviewer_comment", + "description": "

An optional comment when reviewing a push protection bypass.

" + }, { "type": "string or null", "name": "push_protection_bypass_request_comment", diff --git a/src/webhooks/data/ghes-3.11/schema.json b/src/webhooks/data/ghes-3.11/schema.json index e677e7bbc853..12042549cb6b 100644 --- a/src/webhooks/data/ghes-3.11/schema.json +++ b/src/webhooks/data/ghes-3.11/schema.json @@ -194122,7 +194122,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -194384,6 +194384,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -194945,7 +194950,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -195207,6 +195212,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -195768,7 +195778,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -196030,6 +196040,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -196828,6 +196843,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -197438,6 +197458,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -198053,6 +198078,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", diff --git a/src/webhooks/data/ghes-3.12/schema.json b/src/webhooks/data/ghes-3.12/schema.json index 00fe6b5f9354..4991d12177c5 100644 --- a/src/webhooks/data/ghes-3.12/schema.json +++ b/src/webhooks/data/ghes-3.12/schema.json @@ -195386,7 +195386,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -195648,6 +195648,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -196209,7 +196214,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -196471,6 +196476,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -197032,7 +197042,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -197294,6 +197304,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -198092,6 +198107,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -198702,6 +198722,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -199317,6 +199342,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", diff --git a/src/webhooks/data/ghes-3.13/schema.json b/src/webhooks/data/ghes-3.13/schema.json index c2d1aa617a8f..d6cd67de9fce 100644 --- a/src/webhooks/data/ghes-3.13/schema.json +++ b/src/webhooks/data/ghes-3.13/schema.json @@ -195377,7 +195377,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -195402,7 +195402,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -195664,6 +195664,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -196201,7 +196206,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -196226,7 +196231,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -196488,6 +196493,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -197025,7 +197035,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -197050,7 +197060,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -197312,6 +197322,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -198110,6 +198125,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -198720,6 +198740,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -199335,6 +199360,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", diff --git a/src/webhooks/data/ghes-3.14/schema.json b/src/webhooks/data/ghes-3.14/schema.json index e771bb181257..1d4b5f56d096 100644 --- a/src/webhooks/data/ghes-3.14/schema.json +++ b/src/webhooks/data/ghes-3.14/schema.json @@ -1253,6 +1253,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1464,6 +1469,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1675,6 +1685,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1886,6 +1901,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1932,6 +1952,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2136,6 +2161,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2182,6 +2212,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -196525,7 +196560,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -196550,7 +196585,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -196811,6 +196846,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -197413,7 +197453,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -197438,7 +197478,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -197699,6 +197739,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -198301,7 +198346,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -198326,7 +198371,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -198587,6 +198632,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -199450,6 +199500,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -200125,6 +200180,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -200805,6 +200865,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", diff --git a/src/webhooks/data/ghes-3.15/schema.json b/src/webhooks/data/ghes-3.15/schema.json index 491ae84c1fa9..13f952923d30 100644 --- a/src/webhooks/data/ghes-3.15/schema.json +++ b/src/webhooks/data/ghes-3.15/schema.json @@ -1332,6 +1332,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1543,6 +1548,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1754,6 +1764,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -1965,6 +1980,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2011,6 +2031,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2215,6 +2240,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -2261,6 +2291,11 @@ "dismissed" ] }, + { + "type": "string or null", + "name": "reviewer_comment", + "description": "

The comment the reviewer provided when responding to the exemption request.

" + }, { "type": "string", "name": "created_at", @@ -196698,7 +196733,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -196723,7 +196758,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -197061,6 +197096,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -197663,7 +197703,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -197688,7 +197728,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -198026,6 +198066,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -198628,7 +198673,7 @@ { "type": "string", "name": "target", - "description": "

The target of the ruleset

", + "description": "

The target of the ruleset.

", "enum": [ "branch", "tag", @@ -198653,7 +198698,7 @@ { "type": "string", "name": "enforcement", - "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page.

", + "description": "

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. evaluate is not available for the repository target.

", "isRequired": true, "enum": [ "disabled", @@ -198991,6 +199036,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -199931,6 +199981,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -200683,6 +200738,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", @@ -201440,6 +201500,11 @@ "name": "parameters", "description": "", "childParamsGroups": [ + { + "type": "array of strings", + "name": "allowed_merge_methods", + "description": "

When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled.

" + }, { "type": "boolean", "name": "dismiss_stale_reviews_on_push", diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index f9331d8032b2..8bc348f4c15d 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "4ab8513682637010cd3bb5d8ee3227cc5ce739d1" + "sha": "17a74203d23fd26f4c3510dc91713d248169bdd1" } \ No newline at end of file