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 #36295

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
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
96 changes: 95 additions & 1 deletion .github/branch_protection_settings/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,101 @@
"parent": null
}
],
"apps": []
"apps": [
{
"id": 87537,
"client_id": "Iv1.cd3d51f97fa3c962",
"slug": "github-heaven",
"node_id": "MDM6QXBwODc1Mzc=",
"owner": {
"login": "github",
"id": 9919,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github",
"html_url": "https://github.com/github",
"followers_url": "https://api.github.com/users/github/followers",
"following_url": "https://api.github.com/users/github/following{/other_user}",
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
"organizations_url": "https://api.github.com/users/github/orgs",
"repos_url": "https://api.github.com/users/github/repos",
"events_url": "https://api.github.com/users/github/events{/privacy}",
"received_events_url": "https://api.github.com/users/github/received_events",
"type": "Organization",
"user_view_type": "public",
"site_admin": false
},
"name": "GitHub Heaven",
"description": "Heaven operates deployments across the seven kingdoms of GitHub.",
"external_url": "https://heaven.githubapp.com",
"html_url": "https://github.com/apps/github-heaven",
"created_at": "2020-11-04T22:59:24Z",
"updated_at": "2023-09-15T14:16:20Z",
"permissions": {
"actions": "write",
"checks": "read",
"contents": "write",
"deployments": "write",
"emails": "read",
"issues": "write",
"metadata": "read",
"pull_requests": "write",
"statuses": "read",
"workflows": "write"
},
"events": ["push"]
},
{
"id": 87541,
"client_id": "Iv1.4e183513562e11aa",
"slug": "github-heaven-staging",
"node_id": "MDM6QXBwODc1NDE=",
"owner": {
"login": "github",
"id": 9919,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github",
"html_url": "https://github.com/github",
"followers_url": "https://api.github.com/users/github/followers",
"following_url": "https://api.github.com/users/github/following{/other_user}",
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
"organizations_url": "https://api.github.com/users/github/orgs",
"repos_url": "https://api.github.com/users/github/repos",
"events_url": "https://api.github.com/users/github/events{/privacy}",
"received_events_url": "https://api.github.com/users/github/received_events",
"type": "Organization",
"user_view_type": "public",
"site_admin": false
},
"name": "GitHub Heaven (Staging)",
"description": "Staging version of Heaven, GitHub's deployment app.",
"external_url": "https://heaven-pe1-iad.githubapp.com",
"html_url": "https://github.com/apps/github-heaven-staging",
"created_at": "2020-11-05T00:12:16Z",
"updated_at": "2023-09-15T14:16:33Z",
"permissions": {
"actions": "write",
"checks": "read",
"contents": "write",
"deployments": "write",
"emails": "read",
"issues": "write",
"metadata": "read",
"pull_requests": "write",
"repository_hooks": "read",
"statuses": "read",
"workflows": "write"
},
"events": ["push"]
}
]
},
"required_pull_request_reviews": {
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_pull_request_reviews",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ kubectl create secret generic pre-defined-secret \
--namespace=arc-runners \
--from-literal=github_app_id=123456 \
--from-literal=github_app_installation_id=654321 \
--from-literal=github_app_private_key='-----BEGIN RSA PRIVATE KEY-----********'
--from-file=github_app_private_key=private-key.pem
```

In your copy of the [`values.yaml`](https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set/values.yaml) pass the secret name as a reference.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,12 @@ You should also subscribe to webhook events instead of polling the API for data.

You can also stream the audit log in order to view API requests. This can help you troubleshoot integrations that are exceeding the rate limit. For more information, see [AUTOTITLE](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise).

## Timeouts

If {% data variables.product.github %} takes more than 10 seconds to process an API request, {% data variables.product.github %} will terminate the request and you will receive a timeout response and a message reporting that "We couldn't respond to your request in time".

{% data variables.product.github %} reserves the right to change the timeout window to protect the speed and reliability of the API.

You can check the status of the GraphQL API at [githubstatus.com](https://www.githubstatus.com/) to determine whether the timeout is due to a problem with the API. You can also try to simplify your request or try your request later. For example, if you are requesting a large number of objects in a single request, you can try requesting fewer objects split over multiple queries.

{% endif %}
6 changes: 3 additions & 3 deletions data/reusables/actions/azure-vnet-procedures-prereqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ You will use a script to automate configuring your Azure resources.
properties: {
protocol: '*'
sourcePortRange: '*'
destinationPortRange: '*'
destinationPortRange: '443'
sourceAddressPrefix: '*'
access: 'Allow'
priority: 210
Expand Down Expand Up @@ -125,7 +125,7 @@ You will use a script to automate configuring your Azure resources.
properties: {
protocol: '*'
sourcePortRange: '*'
destinationPortRange: '*'
destinationPortRange: '443'
sourceAddressPrefix: '*'
access: 'Allow'
priority: 220
Expand Down Expand Up @@ -207,7 +207,7 @@ You will use a script to automate configuring your Azure resources.
properties: {
protocol: '*'
sourcePortRange: '*'
destinationPortRange: '*'
destinationPortRange: '443'
sourceAddressPrefix: '*'
destinationAddressPrefix: 'Storage'
access: 'Allow'
Expand Down
7 changes: 7 additions & 0 deletions data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,10 @@ domain_edit:
snippet_about: Updating will include the new domain name in all code snippets across GitHub Docs.
learn_more: Learn more
submission_failed: Submission failed. Please try again in a minute.
cookbook_landing:
spotlight: Spotlight
explore_articles: Explore {{ number }} prompt articles
reset_filters: Reset filters
search_articles: Search articles
category: Category
complexity: Complexity
7 changes: 7 additions & 0 deletions src/fixtures/fixtures/data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,10 @@ domain_edit:
snippet_about: Updating will include the new domain name in all code snippets across GitHub Docs.
learn_more: Learn more
submission_failed: Submission failed. Please try again in a minute.
cookbook_landing:
spotlight: Spotlight
explore_articles: Explore {{ number }} prompt articles
reset_filters: Reset filters
search_articles: Search articles
category: Category
complexity: Complexity
1 change: 1 addition & 0 deletions src/frame/components/context/MainContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const DEFAULT_UI_NAMESPACES = [
'support',
'rest',
'domain_edit',
'cookbook_landing',
]

export function addUINamespaces(req: any, ui: UIStrings, namespaces: string[]) {
Expand Down
9 changes: 6 additions & 3 deletions src/landings/components/CategoryLanding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import cx from 'classnames'
import { CookBookArticleCard } from './CookBookArticleCard'
import { CookBookFilter } from './CookBookFilter'

import { useTranslation } from 'src/languages/components/useTranslation'
import { DefaultLayout } from 'src/frame/components/DefaultLayout'
import { ArticleTitle } from 'src/frame/components/article/ArticleTitle'
import { Lead } from 'src/frame/components/ui/Lead'
Expand All @@ -14,6 +14,7 @@ import { Breadcrumbs } from 'src/frame/components/page-header/Breadcrumbs'
import { ArticleCardItems } from 'src/landings/types'

export const CategoryLanding = () => {
const { t } = useTranslation('cookbook_landing')
const router = useRouter()
const { title, intro, tocItems } = useCategoryLandingContext()

Expand Down Expand Up @@ -84,7 +85,7 @@ export const CategoryLanding = () => {
<ArticleTitle>{title}</ArticleTitle>
{intro && <Lead data-search="lead">{intro}</Lead>}

<h2 className="py-5">Spotlight</h2>
<h2 className="py-5">{t('spotlight')}</h2>
<div className="d-md-flex d-sm-block col-md-12">
<div className="col-md-4">
<CookBookArticleCard
Expand Down Expand Up @@ -121,7 +122,9 @@ export const CategoryLanding = () => {
<div className="pt-8">
<div className="py-5 border-bottom">
<div className="pb-3 mr-5 ml-1 float-xl-left">
<h2>Explore {searchResults.length} prompt articles</h2>
<h2>
{t('explore_articles').replace('{{ number }}', searchResults.length.toString())}
</h2>
</div>
<div>
<CookBookFilter
Expand Down
10 changes: 6 additions & 4 deletions src/landings/components/CookBookFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TextInput, ActionMenu, ActionList, Button, Box } from '@primer/react'
import { SearchIcon } from '@primer/octicons-react'
import { useRef, useEffect, useState } from 'react'
import { ArticleCardItems } from '#src/landings/types.ts'
import { useTranslation } from 'src/languages/components/useTranslation'

type Props = {
tokens: ArticleCardItems
Expand All @@ -23,6 +24,7 @@ export const CookBookFilter = ({
'All',
...new Set(tokens.flatMap((item) => item.complexity || [])),
]
const { t } = useTranslation('cookbook_landing')

const [selectedCategory, setSelectedCategory] = useState(0)
const [selectedComplexity, setSelectedComplexity] = useState(0)
Expand Down Expand Up @@ -61,7 +63,7 @@ export const CookBookFilter = ({
leadingVisual={SearchIcon}
className="m-1"
sx={{ minWidth: ['stretch', 'stretch', 'stretch', 'stretch'] }}
placeholder="Search articles"
placeholder={t('search_articles')}
ref={inputRef}
autoComplete="false"
onChange={(e) => {
Expand All @@ -80,7 +82,7 @@ export const CookBookFilter = ({
display: 'inline-block',
}}
>
Category:
{t('category')}:
</Box>{' '}
{categories[selectedCategory]}
</ActionMenu.Button>
Expand All @@ -107,7 +109,7 @@ export const CookBookFilter = ({
display: 'inline-block',
}}
>
Complexity:
{t('complexity')}:
</Box>{' '}
{complexities[selectedComplexity]}
</ActionMenu.Button>
Expand All @@ -127,7 +129,7 @@ export const CookBookFilter = ({
</ActionMenu>

<Button variant="invisible" className="col-md-1 col-sm-2 mt-1" onClick={onResetFilter}>
Reset filters
{t('reset_filters')}
</Button>
</div>
</div>
Expand Down
Loading