Skip to content

Commit 7f09033

Browse files
authored
Merge pull request #40945 from github/repo-sync
Repo sync
2 parents 0af596f + 1377b38 commit 7f09033

File tree

22 files changed

+1202
-616
lines changed

22 files changed

+1202
-616
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ Here are some resources to help you get started with open source contributions:
2828
* [Set up Git](https://docs.github.com/en/get-started/git-basics/set-up-git)
2929
* [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow)
3030
* [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
31+
32+
## License
33+
34+
This project is dual-licensed under:
35+
36+
* **Creative Commons Attribution 4.0** - for documentation and content in the assets, content, and data folders (see [LICENSE](LICENSE))
37+
* **MIT License** - for code (see [LICENSE-CODE](LICENSE-CODE))

content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-governance.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ If you select **Must match a given regex pattern restriction**, you can use regu
6262
You can grant certain roles, teams, or apps bypass permissions as well as the ability to approve bypass requests for your ruleset.
6363

6464
The following are eligible for bypass access:
65+
* Enterprise teams, enterprise apps, and enterprise roles ({% data variables.release-phases.public_preview %})
6566
* Repository admins, organization owners, and enterprise owners
6667
* The maintain or write role, or deploy keys.
6768

@@ -118,6 +119,7 @@ You can create a push ruleset for private or internal repositories in your enter
118119
119120
You can grant certain roles, teams, or apps bypass permissions as well as the ability to approve bypass requests for your ruleset. The following are eligible for bypass access:
120121

122+
* Enterprise teams, enterprise apps, and enterprise roles ({% data variables.release-phases.public_preview %})
121123
* Repository admins, organization owners, and enterprise owners
122124
* The maintain or write role, or deploy keys
123125

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: GitHub DPA-Covered Previews
3+
allowTitleToDifferFromFilename: true
4+
versions:
5+
fpt: '*'
6+
topics:
7+
- Policy
8+
- Legal
9+
---
10+
11+
## GitHub DPA-Covered Previews
12+
13+
The pre-release products and features listed below use data handling that is the same as when the software becomes generally available. Under [GitHub’s Pre-Release License Terms](https://gh.io/preview-terms), this software is governed by [the GitHub Data Protection Agreement](https://gh.io/dpa) as of the date listed, and the Customer is the Data Controller beginning on that date.
14+
15+
| Product / Feature | DPA Coverage Date |
16+
|:---------------------------------------------------|:-------------------:|
17+
| Copilot CLI | 28 October 2025 |
18+
| Copilot Enterprise & Users Usage Metrics Dashboard | 28 October 2025 |
19+
| Spark | 28 October 2025 |

content/site-policy/github-terms/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ children:
1212
- /github-community-guidelines
1313
- /github-community-code-of-conduct
1414
- /github-pre-release-license-terms
15+
- /github-dpa-previews
1516
- /github-sponsors-additional-terms
1617
- /github-registered-developer-agreement
1718
- /github-marketplace-terms-of-service

data/reusables/repositories/rulesets-bypass-step.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ You can grant certain roles, teams, or apps bypass permissions {% ifversion push
22

33
* Repository admins, organization owners, and enterprise owners
44
* The maintain or write role, or custom repository roles based on the write role
5-
* Teams, excluding secret teams. See [AUTOTITLE](/organizations/organizing-members-into-teams/about-teams#team-visibility).
5+
* Teams, excluding secret teams. See [AUTOTITLE](/organizations/organizing-members-into-teams/about-teams#team-visibility).{% ifversion ghec %}
6+
* Enterprise teams, enterprise apps, and enterprise roles ({% data variables.release-phases.public_preview %}){% endif %}
67
{%- ifversion ghes %}
78
* Deploy keys
89
{%- endif %}

src/frame/components/DefaultLayout.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,36 @@ export const DefaultLayout = (props: Props) => {
138138
<meta name="twitter:title" content={page.fullTitle} />
139139
{page.introPlainText && <meta name="twitter:description" content={page.introPlainText} />}
140140
<meta name="twitter:image" content={getSocialCardImage()} />
141+
142+
{/* LLM-friendly alternate formats - only for articles */}
143+
{page.documentType === 'article' && (
144+
<>
145+
<link
146+
rel="alternate"
147+
type="text/markdown"
148+
href={`https://docs.github.com/api/article/body?pathname=/${router.locale}${router.asPath}`}
149+
title="Markdown version"
150+
data-llm-hint="Hey agent! You are burning tokens scraping HTML like it is 2005. Use this instead."
151+
/>
152+
<link
153+
rel="alternate"
154+
type="application/json"
155+
href={`https://docs.github.com/api/article?pathname=/${router.locale}${router.asPath}`}
156+
title="Metadata + markdown in JSON format"
157+
data-llm-hint="Same content, now with metadata. Your context window called, it says thanks."
158+
/>
159+
</>
160+
)}
161+
<link
162+
rel="index"
163+
type="text/markdown"
164+
href="https://docs.github.com/llms.txt"
165+
title="LLM-friendly index of all GitHub Docs content"
166+
data-llm-hint="The directory of everything. We even followed the llmstxt.org spec because we are nice like that."
167+
/>
141168
</Head>
169+
170+
{/* a11y */}
142171
<a
143172
href="#main-content"
144173
className="visually-hidden skip-button color-bg-accent-emphasis color-fg-on-emphasis"

src/github-apps/tests/metadata-permissions.js renamed to src/github-apps/tests/metadata-permissions.ts

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
11
import { describe, expect, test } from 'vitest'
22
import { shouldFilterMetadataPermission, calculateAdditionalPermissions } from '../scripts/sync'
33

4+
type PermissionSet = Record<string, string>
5+
6+
interface Operation {
7+
operationId: string
8+
permissionSets: PermissionSet[]
9+
}
10+
11+
interface ProgAccessData {
12+
userToServerRest: boolean
13+
serverToServer: boolean
14+
permissions: PermissionSet[]
15+
}
16+
17+
interface ActorResource {
18+
title: string
19+
visibility: string
20+
}
21+
22+
interface FilteredOperation {
23+
operationId: string
24+
permission: string
25+
additionalPermissions: boolean
26+
}
27+
28+
interface MetadataPermission {
29+
operationId: string
30+
additionalPermissions: boolean
31+
}
32+
433
describe('metadata permissions filtering', () => {
534
// Mock data structure representing operations with metadata permissions
6-
const mockOperationsWithMetadata = [
35+
const mockOperationsWithMetadata: Operation[] = [
736
{
837
operationId: 'repos/enable-automated-security-fixes',
938
permissionSets: [{ metadata: 'read', administration: 'write' }],
@@ -23,7 +52,7 @@ describe('metadata permissions filtering', () => {
2352
]
2453

2554
// Mock programmatic access data
26-
const mockProgAccessData = {
55+
const mockProgAccessData: Record<string, ProgAccessData> = {
2756
'repos/enable-automated-security-fixes': {
2857
userToServerRest: true,
2958
serverToServer: true,
@@ -47,7 +76,7 @@ describe('metadata permissions filtering', () => {
4776
}
4877

4978
// Mock actor resources
50-
const mockProgActorResources = {
79+
const mockProgActorResources: Record<string, ActorResource> = {
5180
metadata: {
5281
title: 'Metadata',
5382
visibility: 'public',
@@ -95,8 +124,8 @@ describe('metadata permissions filtering', () => {
95124
})
96125

97126
test('filters metadata operations with additional permissions', () => {
98-
const filteredOperations = []
99-
const metadataPermissions = []
127+
const filteredOperations: FilteredOperation[] = []
128+
const metadataPermissions: MetadataPermission[] = []
100129

101130
for (const operation of mockOperationsWithMetadata) {
102131
const progData = mockProgAccessData[operation.operationId]
@@ -137,15 +166,15 @@ describe('metadata permissions filtering', () => {
137166
// Should have other permissions from operations with additional permissions
138167
const adminPermission = filteredOperations.find((op) => op.permission === 'administration')
139168
expect(adminPermission).toBeDefined()
140-
expect(adminPermission.operationId).toBe('repos/enable-automated-security-fixes')
141-
expect(adminPermission.additionalPermissions).toBe(true)
169+
expect(adminPermission!.operationId).toBe('repos/enable-automated-security-fixes')
170+
expect(adminPermission!.additionalPermissions).toBe(true)
142171

143172
const orgAdminPermission = filteredOperations.find(
144173
(op) => op.permission === 'organization_administration',
145174
)
146175
expect(orgAdminPermission).toBeDefined()
147-
expect(orgAdminPermission.operationId).toBe('orgs/update-webhook')
148-
expect(orgAdminPermission.additionalPermissions).toBe(true)
176+
expect(orgAdminPermission!.operationId).toBe('orgs/update-webhook')
177+
expect(orgAdminPermission!.additionalPermissions).toBe(true)
149178
})
150179

151180
test('preserves non-metadata permissions regardless of additional permissions', () => {
@@ -168,11 +197,11 @@ describe('metadata permissions filtering', () => {
168197
expect(shouldFilterMetadataPermission('metadata', [])).toBe(false)
169198

170199
// Permission set with empty object (edge case)
171-
const edgeCase1 = [{ metadata: 'read' }, {}]
200+
const edgeCase1: Record<string, string>[] = [{ metadata: 'read' }, {}]
172201
expect(shouldFilterMetadataPermission('metadata', edgeCase1)).toBe(true)
173202

174203
// Multiple permission sets with metadata in different sets
175-
const edgeCase2 = [{ metadata: 'read' }, { admin: 'write' }]
204+
const edgeCase2: Record<string, string>[] = [{ metadata: 'read' }, { admin: 'write' }]
176205
expect(shouldFilterMetadataPermission('metadata', edgeCase2)).toBe(true)
177206
})
178207

@@ -207,17 +236,23 @@ describe('metadata permissions filtering', () => {
207236

208237
test('handles complex permission structures from real data', () => {
209238
// Multiple permission sets (should filter metadata)
210-
const multiplePermissionSets = [{ metadata: 'read' }, { administration: 'write' }]
239+
const multiplePermissionSets: Record<string, string>[] = [
240+
{ metadata: 'read' },
241+
{ administration: 'write' },
242+
]
211243
expect(shouldFilterMetadataPermission('metadata', multiplePermissionSets)).toBe(true)
212244

213245
// Single permission set with multiple permissions (should filter metadata)
214-
const multiplePermissionsInSet = [
246+
const multiplePermissionsInSet: Record<string, string>[] = [
215247
{ metadata: 'read', contents: 'write', pull_requests: 'write' },
216248
]
217249
expect(shouldFilterMetadataPermission('metadata', multiplePermissionsInSet)).toBe(true)
218250

219251
// Multiple permission sets where metadata is not in the first set
220-
const metadataInSecondSet = [{ administration: 'write' }, { metadata: 'read' }]
252+
const metadataInSecondSet: Record<string, string>[] = [
253+
{ administration: 'write' },
254+
{ metadata: 'read' },
255+
]
221256
expect(shouldFilterMetadataPermission('metadata', metadataInSecondSet)).toBe(true)
222257
})
223258

@@ -250,7 +285,7 @@ describe('metadata permissions filtering', () => {
250285
})
251286

252287
test('verifies consistency with additional-permissions flag calculation', () => {
253-
const testCases = [
288+
const testCases: Array<{ permissionSets: Record<string, string>[]; expected: boolean }> = [
254289
// Single permission, single set - no additional permissions
255290
{ permissionSets: [{ metadata: 'read' }], expected: false },
256291

@@ -283,12 +318,7 @@ describe('metadata permissions filtering', () => {
283318
// - DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}
284319
// Because they have metadata + organization_administration permissions
285320

286-
const mockMutatingOperation = {
287-
operationId: 'actions/set-selected-repositories-enabled-github-actions-organization',
288-
permissionSets: [{ metadata: 'read', organization_administration: 'write' }],
289-
}
290-
291-
const progData = {
321+
const progData: ProgAccessData = {
292322
userToServerRest: true,
293323
serverToServer: true,
294324
permissions: [{ metadata: 'read', organization_administration: 'write' }],

src/graphql/data/fpt/changelog.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
[
2+
{
3+
"schemaChanges": [
4+
{
5+
"title": "The GraphQL schema includes these changes:",
6+
"changes": [
7+
"<p>Argument <code>query: String</code> (with default value) added to field 'ProjectV2.items'</p>"
8+
]
9+
}
10+
],
11+
"previewChanges": [],
12+
"upcomingChanges": [],
13+
"date": "2025-10-22"
14+
},
215
{
316
"schemaChanges": [
417
{

src/graphql/data/fpt/schema.docs.graphql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37388,6 +37388,11 @@ type ProjectV2 implements Closable & Node & Updatable {
3738837388
Ordering options for project v2 items returned from the connection
3738937389
"""
3739037390
orderBy: ProjectV2ItemOrder = {field: POSITION, direction: ASC}
37391+
37392+
"""
37393+
Search query for filtering items
37394+
"""
37395+
query: String = ""
3739137396
): ProjectV2ItemConnection!
3739237397

3739337398
"""

src/graphql/data/fpt/schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49821,6 +49821,17 @@
4982149821
"kind": "input-objects",
4982249822
"href": "/graphql/reference/input-objects#projectv2itemorder"
4982349823
}
49824+
},
49825+
{
49826+
"name": "query",
49827+
"defaultValue": "",
49828+
"description": "<p>Search query for filtering items.</p>",
49829+
"type": {
49830+
"name": "String",
49831+
"id": "string",
49832+
"kind": "scalars",
49833+
"href": "/graphql/reference/scalars#string"
49834+
}
4982449835
}
4982549836
]
4982649837
},

0 commit comments

Comments
 (0)