Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #37064

Merged
merged 4 commits into from
Mar 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -21,6 +21,8 @@ topics:

_We recommend that organizations initially apply the {% data variables.product.prodname_github_security_configuration %}_. After you have applied the {% data variables.product.prodname_github_security_configuration %} to repositories in your organization, you can evaluate the security findings for each repository and determine if you instead want to create and apply a {% data variables.product.prodname_custom_security_configuration %}.

Currently, only one {% data variables.product.prodname_security_configuration %} can be applied to a repository at a time.

## Choosing the {% data variables.product.prodname_github_security_configuration %}

The {% data variables.product.prodname_github_security_configuration %} offers a number of benefits:
2 changes: 1 addition & 1 deletion content/github-models/prototyping-with-ai-models.md
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ The steps to use each model are similar. In general, you will need to:
1. Either open a codespace, or set up your local environment:
* To run in a codespace, click **{% octicon "codespaces" aria-hidden="true" %} Run codespace**, then click **Create new codespace**.
* To run locally:
* Create a {% data variables.product.company_short %} {% data variables.product.pat_generic %}. The token should not have any scopes or permissions. See [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
* Create a {% data variables.product.company_short %} {% data variables.product.pat_generic %}. The token needs to have `models:read` permissions. See [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
* Save your token as an environment variable.
* Install the dependencies for the SDK, if required.
1. Use the example code to make a request to the model.
90 changes: 40 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -301,7 +301,7 @@
"mdast-util-to-markdown": "2.1.0",
"mdast-util-to-string": "^4.0.0",
"morgan": "^1.10.0",
"next": "^15.1.5",
"next": "^15.2.3",
"ora": "^8.0.1",
"parse5": "7.1.2",
"quick-lru": "7.0.0",
10 changes: 10 additions & 0 deletions src/rest/components/get-rest-code-samples.ts
Original file line number Diff line number Diff line change
@@ -39,6 +39,16 @@ export function getShellExample(
contentTypeHeader = '-H "Content-Type: multipart/form-data"'
}

// GHES Manage API requests differ from the dotcom API requests and make use of multipart/form-data and json content types
if (operation.subcategory === 'manage-ghes') {
// GET requests don't have a requestBody set, therefore let's default them to application/json
if (operation.verb === 'get') {
contentTypeHeader = '-H "Content-Type: application/json"'
} else {
contentTypeHeader = `-H "Content-Type: ${codeSample?.request?.contentType}"`
}
}

let requestPath = codeSample?.request?.parameters
? parseTemplate(operation.requestPath).expand(codeSample.request.parameters)
: operation.requestPath