Skip to content

Commit

Permalink
Merge pull request #35389 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Nov 22, 2024
2 parents f746b91 + 5be4cec commit 958eba5
Show file tree
Hide file tree
Showing 22 changed files with 1,804 additions and 1,903 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions content/rest/enterprise-admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ autogenerated: rest

## Endpoint URLs

These endpoints{% ifversion ghes %}—except [Management Console](#management-console) endpoints—{% endif %} are prefixed with the following URL:
These endpoints
{% ifversion management-console-manage-ghes-parity -%}
—except Manage GitHub Enterprise Server API—
{%- else -%}
—except Management Console API—
{%- endif -%}
are prefixed with the following URL:

```shell
{% data variables.product.rest_url %}
Expand All @@ -55,7 +61,12 @@ When endpoints include `{enterprise}`, replace `{enterprise}` with the handle fo
{% endif %}

{% ifversion ghes %}
[Management Console](#management-console) endpoints are only prefixed with a hostname:
{% ifversion management-console-manage-ghes-parity -%}
Manage GitHub Enterprise Server API
{%- else -%}
Management Console API
{%- endif %}
endpoints are only prefixed with a hostname:

```shell
http(s)://HOSTNAME/
Expand All @@ -70,7 +81,13 @@ Your {% data variables.product.product_name %} installation's API endpoints acce

OAuth tokens must have the `site_admin` [OAuth scope](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes) when used with these endpoints.

These endpoints are only accessible to authenticated {% data variables.product.product_name %} site administrators, except for the [Management Console](/rest/enterprise-admin/management-console) endpoints, which requires the [Management Console password](/admin/configuration/administering-your-instance-from-the-management-console).
These endpoints are only accessible to authenticated {% data variables.product.product_name %} site administrators, except for the
{% ifversion management-console-manage-ghes-parity -%}
[AUTOTITLE](/rest/enterprise-admin/manage-ghes),
{%- else -%}
[AUTOTITLE](/rest/enterprise-admin/management-console),
{%- endif %}
which requires the [Management Console password](/admin/configuration/administering-your-instance-from-the-management-console).

{% data reusables.enterprise_management_console.api-deprecation %}

Expand Down
2 changes: 1 addition & 1 deletion content/rest/enterprise-admin/management-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ intro: >-
Use the REST API to manage your {% data variables.product.product_name %}
installation.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
ghes: '*'
ghes: <=3.14
topics:
- API
autogenerated: rest
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/fixtures/rest-redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"/v3/enterprise-admin/global_webhooks": "/en/enterprise-server/rest/enterprise-admin/global-webhooks",
"/v3/enterprise-admin/ldap": "/en/enterprise-server/rest/enterprise-admin/ldap",
"/v3/enterprise-admin/license": "/en/enterprise-server/rest/enterprise-admin/license",
"/v3/enterprise-admin/management_console": "/en/enterprise-server/rest/enterprise-admin/management-console",
"/v3/enterprise-admin/management_console": "/en/enterprise-server/rest/enterprise-admin/manage-ghes",
"/v3/enterprise-admin/orgs": "/en/enterprise-server/rest/enterprise-admin/orgs",
"/v3/enterprise-admin/pre_receive_environments": "/en/enterprise-server/rest/enterprise-admin/pre-receive-environments",
"/v3/enterprise-admin/pre_receive_hooks": "/en/enterprise-server/rest/enterprise-admin/pre-receive-hooks",
Expand Down
2 changes: 1 addition & 1 deletion src/github-apps/lib/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"2022-11-28"
]
},
"sha": "a0508cecd18ab26b525527e4ba35bd9c6d725c4f"
"sha": "d97436bb3672e8d985262803de6ab7cafe1c7ff3"
}
37 changes: 32 additions & 5 deletions src/landings/components/CategoryLanding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,37 @@ export const CategoryLanding = () => {
{intro && <Lead data-search="lead">{intro}</Lead>}

<h2 className="py-5">Spotlight</h2>
<div className="d-md-flex d-sm-block">
<CookBookArticleCard image="DeleteMe" spotlight={true} url="#" />
<CookBookArticleCard image="DeleteMe" spotlight={true} url="#" />
<CookBookArticleCard image="DeleteMe" spotlight={true} url="#" />
<div className="d-md-flex d-sm-block col-md-12">
<div className="col-md-4">
<CookBookArticleCard
image={'/assets/images/copilot-landing/generating_unit_tests.png'}
title="Generate unit tests"
description="Copilot Chat can help with generating unit tests for a function."
spotlight={true}
url="/en/copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests"
tags={[]}
/>
</div>
<div className="col-md-4">
<CookBookArticleCard
image={'/assets/images/copilot-landing/improving_code_readability.png'}
title="Improving code readability and maintainability"
description="Learn how to improve your code readability and maintainability."
spotlight={true}
url="/en/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability"
tags={[]}
/>
</div>
<div className="col-md-4">
<CookBookArticleCard
image={'/assets/images/copilot-landing/debugging_invalid_json.png'}
title="Debugging invalid JSON"
description="Copilot can identify and resolve syntax errors or structural issues in JSON data."
spotlight={true}
tags={[]}
url="/en/copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json"
/>
</div>
</div>

<div className="pt-8">
Expand All @@ -110,7 +137,7 @@ export const CategoryLanding = () => {
<li key={index} className="col-md-4 col-sm-12 list-style-none float-left p-4">
<CookBookArticleCard
title={item.title}
description={item.intro}
description={item.intro!}
icon={item.octicon}
tags={[
...(item.industry || []),
Expand Down
58 changes: 24 additions & 34 deletions src/landings/components/CookBookArticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,37 @@ const Icons = {
type IconType = keyof typeof Icons

type Props = {
title?: string
title: string
icon?: IconType
url?: string
description?: string
tags?: string[]
url: string
description: string
tags: string[]
spotlight?: boolean
image?: string
complexity?: string
}

const defaultProps = {
title: 'Article Name',
description:
'Man bun letterpress put a bird on it la croix offal, meh grailed hot chicken kombucha gochujang messenger bag fit before they sold out lyft.',
tags: ['Tag Example', 'Tag Example'],
icon: 'book',
}

function setImage(image: string) {
return (
// <div className="d-flex flex-column flex-align-center">
image ? (
<div
style={{
width: 'max-width',
height: 200,
backgroundColor: 'gray',
marginBottom: 20,
borderRadius: 5,
}}
></div>
) : null
// </div>
)
function setImage(image: string, alt: string) {
return image ? (
<img
src={image}
alt={alt}
style={{
backgroundColor: 'gray',
marginBottom: 20,
borderRadius: 5,
width: '100%',
height: 'auto',
}}
/>
) : null
}
const spotlightClasses = 'd-flex flex-column align-items-center'
export const CookBookArticleCard = ({
title = defaultProps.title,
icon = defaultProps.icon as IconType,
tags = defaultProps.tags,
description = defaultProps.description,
title,
icon,
tags,
description,
image = '',
url,
spotlight = false,
Expand All @@ -86,7 +76,7 @@ export const CookBookArticleCard = ({
style={{ minHeight: 200 }}
className={spotlight ? spotlightClasses : 'd-flex pb-3 border-bottom'}
>
{spotlight ? setImage(image) : null}
{spotlight ? setImage(image, title) : null}
{spotlight
? null
: IconComponent && (
Expand All @@ -104,7 +94,7 @@ export const CookBookArticleCard = ({
{tags.map((tag, index) => (
<Label key={index} variant="accent" sx={{ mr: 1 }} size="small">
{tag}
</Label> //fix this to have unique keys
</Label>
))}
</LabelGroup>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/redirects/lib/static/developer.json
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@
"/enterprise/v3/enterprise-admin/global_webhooks": "/enterprise-server@latest/rest/enterprise-admin#global-webhooks",
"/enterprise/v3/enterprise-admin/ldap": "/enterprise-server@latest/rest/enterprise-admin#ldap",
"/enterprise/v3/enterprise-admin/license": "/enterprise-server@latest/rest/enterprise-admin#license",
"/enterprise/v3/enterprise-admin/management_console": "/enterprise-server@latest/rest/enterprise-admin#management-console",
"/enterprise/v3/enterprise-admin/management_console": "/enterprise-server@latest/rest/enterprise-admin/manage-ghes",
"/enterprise/v3/enterprise-admin/org_pre_receive_hooks": "/enterprise-server@latest/rest/enterprise-admin#organization-pre-receive-hooks",
"/enterprise/v3/enterprise-admin/orgs": "/enterprise-server@latest/rest/enterprise-admin#orgs",
"/enterprise/v3/enterprise-admin/pre_receive_environments": "/enterprise-server@latest/rest/enterprise-admin#pre-receive-environments",
Expand All @@ -1868,7 +1868,7 @@
"/enterprise/v3/enterprise/admin_stats": "/enterprise-server@latest/rest/enterprise-admin#admin-stats",
"/enterprise/v3/enterprise/ldap": "/enterprise-server@latest/rest/enterprise-admin#ldap",
"/enterprise/v3/enterprise/license": "/enterprise-server@latest/rest/enterprise-admin#license",
"/enterprise/v3/enterprise/management_console": "/enterprise-server@latest/rest/enterprise-admin#management-console",
"/enterprise/v3/enterprise/management_console": "/enterprise-server@latest/rest/enterprise-admin/manage-ghes",
"/enterprise/v3/enterprise/orgs": "/enterprise-server@latest/rest/enterprise-admin#orgs",
"/enterprise/v3/enterprise/pre_receive_environments": "/enterprise-server@latest/rest/enterprise-admin#pre-receive-environments",
"/enterprise/v3/enterprise/pre_receive_hooks": "/enterprise-server@latest/rest/enterprise-admin#pre-receive-hooks",
Expand Down Expand Up @@ -3009,7 +3009,7 @@
"/v3/enterprise-admin/global_webhooks": "/enterprise-server@latest/rest/enterprise-admin/global-webhooks",
"/v3/enterprise-admin/ldap": "/enterprise-server@latest/rest/enterprise-admin/ldap",
"/v3/enterprise-admin/license": "/enterprise-server@latest/rest/enterprise-admin/license",
"/v3/enterprise-admin/management_console": "/enterprise-server@latest/rest/enterprise-admin/management-console",
"/v3/enterprise-admin/management_console": "/enterprise-server@latest/rest/enterprise-admin/manage-ghes",
"/v3/enterprise-admin/orgs": "/enterprise-server@latest/rest/enterprise-admin/orgs",
"/v3/enterprise-admin/pre_receive_environments": "/enterprise-server@latest/rest/enterprise-admin/pre-receive-environments",
"/v3/enterprise-admin/pre_receive_hooks": "/enterprise-server@latest/rest/enterprise-admin/pre-receive-hooks",
Expand All @@ -3019,7 +3019,7 @@
"/v3/enterprise/global_webhooks": "/enterprise-server@latest/rest/enterprise-admin/global-webhooks",
"/v3/enterprise/ldap": "/enterprise-server@latest/rest/enterprise-admin/ldap",
"/v3/enterprise/license": "/enterprise-server@latest/rest/enterprise-admin/license",
"/v3/enterprise/management_console": "/enterprise-server@latest/rest/enterprise-admin/management-console",
"/v3/enterprise/management_console": "/enterprise-server@latest/rest/enterprise-admin/manage-ghes",
"/v3/enterprise/org_pre_receive_hooks": "/enterprise-server@latest/rest/enterprise-admin/organization-pre-receive-hooks",
"/v3/enterprise/orgs": "/enterprise-server@latest/rest/enterprise-admin/orgs",
"/v3/enterprise/pre_receive_environments": "/enterprise-server@latest/rest/enterprise-admin/pre-receive-environments",
Expand Down
Loading

0 comments on commit 958eba5

Please sign in to comment.