Skip to content

Commit f7a10ee

Browse files
authored
Merge pull request #44239 from github/repo-sync
Repo sync
2 parents c552ebe + c14b5a3 commit f7a10ee

11 files changed

Lines changed: 452 additions & 15 deletions

File tree

.github/workflows/link-check-internal.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
required: true
1616
default: 'en'
1717
create_copilot_issue:
18-
description: 'Create a Copilot-assigned issue with the top 5 redirects to fix'
18+
description: 'Create a Copilot-assigned issue with the top 10 redirects to fix'
1919
type: boolean
2020
required: false
2121
default: false
@@ -127,7 +127,7 @@ jobs:
127127
128128
const report = JSON.parse(fs.readFileSync(reportFile, 'utf8'))
129129
const allRedirectGroups = report.groups.filter(g => g.isWarning)
130-
const redirectGroups = allRedirectGroups.slice(0, 5)
130+
const redirectGroups = allRedirectGroups.slice(0, 10)
131131
132132
if (redirectGroups.length === 0) {
133133
core.info('No redirect groups found, skipping Copilot issue.')
@@ -142,24 +142,30 @@ jobs:
142142
return `| \`${g.target}\` | \`${redirectTarget}\` | \`${file}\` | ${lines} |`
143143
}).join('\n')
144144
145-
const actionRunUrl = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
146-
const hasMore = allRedirectGroups.length > redirectGroups.length
147-
const countLine = hasMore
148-
? `These are the first ${redirectGroups.length} of ${allRedirectGroups.length} redirects found. The full list is available in the [workflow run artifacts](${actionRunUrl}).`
149-
: `These are the first ${redirectGroups.length} of ${allRedirectGroups.length} redirects found.`
145+
const artifactsUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts`
150146
151-
const body = [
147+
const bodyLines = [
152148
'Copilot please fix the redirected internal links listed in the table below. All changes should be made within the `github/docs-internal` repository. For each entry, open the source file and replace the **Current Link** with the **Update To** path.',
153149
'When all changes are made, open a pull request in `github/docs-internal` with the fixes. The pull request description should reference this issue to create a link between them. When the pull request is open, leave a comment on this issue with a link to it.',
154150
'',
155-
countLine,
151+
`These are the first ${redirectGroups.length} of ${allRedirectGroups.length} redirects found.`,
156152
'',
157153
'## Redirects to fix',
158154
'',
159155
'| Current Link | Update To | File | Line(s) |',
160156
'|---|---|---|---|',
161157
tableRows,
162-
].join('\n')
158+
]
159+
160+
const MAX_ISSUE_BODY_LENGTH = 65536
161+
const artifactNote = `\n\n> [!NOTE]\n> The report was truncated because it exceeded the issue body length limit. [View the complete redirect report in the workflow artifacts](${artifactsUrl}).`
162+
163+
let body = bodyLines.join('\n')
164+
if (body.length > MAX_ISSUE_BODY_LENGTH) {
165+
const truncatedLength = MAX_ISSUE_BODY_LENGTH - artifactNote.length
166+
const lastNewline = body.lastIndexOf('\n', truncatedLength)
167+
body = body.slice(0, lastNewline > 0 ? lastNewline : truncatedLength) + artifactNote
168+
}
163169
164170
// Use the REST API with agent_assignment to properly trigger Copilot cloud agent.
165171
// See: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/start-copilot-sessions#using-the-rest-api
@@ -173,7 +179,7 @@ jobs:
173179
agent_assignment: {
174180
target_repo: 'github/docs-internal',
175181
base_branch: 'main',
176-
custom_instructions: 'For each entry in the table, open the source file in the github/docs-internal repository and replace the Current Link with the Update To path. When all changes are made, open a pull request in github/docs-internal with the fixes. The pull request description should reference this issue to create a link between them. When the pull request is open, leave a comment on this issue with a link to it.',
182+
custom_instructions: 'For each entry in the table, open the source file in the github/docs-internal repository and replace the Current Link with the Update To path. When all changes are made, open a pull request in github/docs-internal with the fixes. When the pull request is open, leave a comment on this issue with a link to it.',
177183
},
178184
})
179185

.github/workflows/sync-llms-txt.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ jobs:
8080
REPO="github/docs-internal"
8181
if gh api "repos/$REPO/git/ref/heads/$BRANCH" --jq '.object.sha' > /dev/null 2>&1; then
8282
echo "Branch $BRANCH exists, fetching"
83-
git fetch origin "$BRANCH"
83+
git -c url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf="https://github.com/" \
84+
fetch origin "$BRANCH"
8485
git checkout "$BRANCH"
8586
else
8687
echo "Branch $BRANCH does not exist, creating from main"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ---------------------------------------------------------------
1111
# To update the sha:
1212
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
13-
FROM ghcr.io/github/gh-base-image/gh-base-noble:20260501-222137-g8063ecb13@sha256:9c650d5e53cbf6c95951373d197ede7955329ef695f5fc6fb8a1c56a8e3b817f AS base
13+
FROM ghcr.io/github/gh-base-image/gh-base-noble:20260505-222701-gb8f4d82d0@sha256:e5ee5190511450a452713144fb1dcd957535ec7c68705efa48b3d2cbb9871b0d AS base
1414

1515
# Install curl for Node install and determining the early access branch
1616
# Install git for cloning docs-early-access & translations repos

content/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/viewing-people-in-your-enterprise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ You may be able to view the email addresses for members of your enterprise on ei
109109

110110
* If you verify a domain for your enterprise, you can view members' email addresses for the verified domain. For more information, see [AUTOTITLE](/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise).
111111

112+
> [!NOTE]
113+
> Email addresses for verified domains are not returned in a guaranteed order. If a member has email addresses for multiple verified domains, old or stale email addresses may remain after an IdP change. The list of verified domain email addresses cannot reliably identify the member's canonical or current corporate email address.
114+
112115
* If you don't use {% data variables.product.prodname_emus %}, and you also don't configure SAML single sign-on (SSO), members access your enterprise's resources on {% data variables.product.github %} solely using a personal account. {% data reusables.saml.personal-accounts-determine-email-visibility %}
113116

114117
If you use {% data variables.product.prodname_emus %}, verify a domain, or configure SAML SSO for your enterprise, you may be able to view the email addresses in one or more of the following ways.
@@ -119,6 +122,8 @@ If you use {% data variables.product.prodname_emus %}, verify a domain, or confi
119122
* `GitHub com saml name`: The `NameID` from the user's linked SAML identity, which is typically the user's email address (for more information, see [AUTOTITLE](/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference))
120123
* `GitHub com verified domain emails`: Email addresses for any verified domains (for more information, see [AUTOTITLE](/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise))
121124

125+
The `GitHub com verified domain emails` value is unordered. Emails may be returned in a non-deterministic order, and you cannot request priority, sorting, or filtering for the user's current email address.
126+
122127
For more information, see [AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/exporting-membership-information-for-your-enterprise).
123128
{% data reusables.saml.use-api-to-get-externalidentity %}
124129

content/admin/managing-iam/reconfiguring-iam-for-enterprise-managed-users/migrating-your-enterprise-to-a-new-identity-provider-or-tenant.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ If you don't already have single sign-on recovery codes for your enterprise, dow
7474

7575
1. Use a recovery code to sign into {% data variables.product.prodname_dotcom %} as the setup user, whose username is your enterprise's shortcode suffixed with `_admin`. For more information about the setup user, see [AUTOTITLE](/admin/identity-and-access-management/understanding-iam-for-enterprises/getting-started-with-enterprise-managed-users).
7676
1. Disable authentication for your enterprise. For more information, see [AUTOTITLE](/admin/identity-and-access-management/configuring-authentication-for-enterprise-managed-users/disabling-authentication-for-enterprise-managed-users#disabling-authentication).
77-
1. Wait up to an hour for {% data variables.product.github %} to suspend your enterprise's members, delete the linked SCIM identities, and delete the SCIM-provisioned IdP groups.
77+
1. Wait for {% data variables.product.github %} to suspend your enterprise's members, delete the linked SCIM identities, and delete the SCIM-provisioned IdP groups.
78+
79+
> [!NOTE]
80+
> * After you disable authentication, GitHub runs multiple background tasks which must complete before you continue with the remaining steps in this article. For large enterprises, this can take several hours or even days.
81+
> * To confirm completion, go to the authentication settings page for your enterprise (Enterprise settings → Authentication security). While the tasks are still running, the "Enable OIDC configuration" or "Add SAML configuration" button will be disabled, and you’ll see a warning like “Previous SAML provider is being removed.”
7882
7983
### 5. Validate suspension of your enterprise's members
8084

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
1. Use the GraphQL API to retrieve the `ExternalIdentity` for each member. For more information, see [AUTOTITLE](/graphql/overview/about-the-graphql-api) and [AUTOTITLE](/graphql/reference/objects#externalidentity) in the GraphQL API documentation.
2+
3+
> [!NOTE]
4+
> Access to external identities depends on whether SAML is configured at the organization or enterprise level. Organization-level external identities are available to organization owners, organization owner {% data variables.product.pat_generic_plural %} with the `read:org` or `admin:org` scope, and {% data variables.product.prodname_github_app %} installation tokens with read or write access to members when the app is installed on the organization. Enterprise-level external identities require an enterprise owner {% data variables.product.pat_generic %} with the `read:enterprise` or `admin:enterprise` scope. {% data variables.product.prodname_github_apps %} cannot access enterprise-level external identities, including enterprise-level SAML identities for {% data variables.product.prodname_ghe_cloud %} with personal user accounts.

src/audit-logs/lib/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import path from 'path'
22

33
import { readCompressedJsonFileFallback } from '@/frame/lib/read-json-file'
44
import { getOpenApiVersion } from '@/versions/lib/all-versions'
5+
import { supported as supportedGhesReleases } from '@/versions/lib/enterprise-server-releases'
56
import findPage from '@/frame/lib/find-page'
67
import type { Context, Page } from '@/types'
78
import type {
@@ -300,6 +301,7 @@ export async function filterAndUpdateGhesDataByAllowlistValues({
300301
auditLogPage,
301302
titleContext,
302303
globalFields = [],
304+
supportedGhesVersions = supportedGhesReleases,
303305
}: {
304306
eventsToCheck: RawAuditLogEventT[]
305307
allowListValue: string
@@ -308,9 +310,17 @@ export async function filterAndUpdateGhesDataByAllowlistValues({
308310
auditLogPage: string
309311
titleContext?: TitleResolutionContext
310312
globalFields?: string[]
313+
supportedGhesVersions?: string[]
311314
}) {
312315
if (!currentGhesEvents) currentGhesEvents = {}
313316

317+
// Upstream `audit-log-allowlists/data/schema.json` lags docs's deprecation
318+
// schedule, so events still list `ghes` keys for versions we've already
319+
// dropped from `supported` in `enterprise-server-releases.ts`. Without this
320+
// filter, the nightly sync would re-add `src/audit-logs/data/ghes-X.Y/`
321+
// dirs for those deprecated versions. See docs-engineering#6562.
322+
const supportedGhesVersionSet = new Set(supportedGhesVersions)
323+
314324
const seenByGhesVersion = new Map()
315325
for (const [ghesVersion, events] of Object.entries(currentGhesEvents)) {
316326
if (!events[auditLogPage]) continue
@@ -320,6 +330,7 @@ export async function filterAndUpdateGhesDataByAllowlistValues({
320330

321331
for (const event of eventsToCheck) {
322332
for (const ghesVersion of Object.keys(event.ghes)) {
333+
if (!supportedGhesVersionSet.has(ghesVersion)) continue
323334
const ghesVersionAllowlists = event.ghes[ghesVersion]._allowlists
324335
const fullGhesVersion = `ghes-${ghesVersion}`
325336

src/audit-logs/tests/unit/filter-events.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,50 @@ describe('audit log event filtering', () => {
223223
appendedDescriptions: {},
224224
},
225225
auditLogPage,
226+
supportedGhesVersions: ['3.10', '3.11', '3.12'],
226227
})
227228
const getActions = (version: string) =>
228229
currentEvents[version][auditLogPage].map((event) => event.action)
229230
expect(getActions('ghes-3.10').includes('repo.create')).toBe(true)
230231
expect(getActions('ghes-3.11').includes('repo.create')).toBe(true)
231232
expect(auditLogPage in currentEvents['ghes-3.12']).toBeFalsy()
232233
})
234+
235+
test('ghes skips versions not in the supported list', async () => {
236+
const eventsToProcess: RawAuditLogEventT[] = [
237+
{
238+
action: 'repo.create',
239+
description: 'repo was created',
240+
docs_reference_links: '',
241+
_allowlists: [],
242+
ghes: {
243+
'3.14': {
244+
_allowlists: ['user'],
245+
},
246+
'3.15': {
247+
_allowlists: ['user'],
248+
},
249+
},
250+
},
251+
]
252+
253+
const currentEvents: VersionedAuditLogData = {}
254+
const auditLogPage = 'user'
255+
256+
await filterAndUpdateGhesDataByAllowlistValues({
257+
eventsToCheck: eventsToProcess,
258+
allowListValue: 'user',
259+
currentGhesEvents: currentEvents,
260+
pipelineConfig: {
261+
sha: '',
262+
appendedDescriptions: {},
263+
},
264+
auditLogPage,
265+
supportedGhesVersions: ['3.15'],
266+
})
267+
expect(currentEvents['ghes-3.14']).toBeUndefined()
268+
expect(currentEvents['ghes-3.15'][auditLogPage].map((event) => event.action)).toContain(
269+
'repo.create',
270+
)
271+
})
233272
})

src/graphql/data/ghec/schema.docs.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69460,7 +69460,7 @@ type User implements Actor & Agentic & Node & PackageOwner & ProfileOwner & Proj
6946069460
): Organization
6946169461

6946269462
"""
69463-
Verified email addresses that match verified domains for a specified organization the user is a member of.
69463+
Verified email addresses that match verified domains for a specified organization the user is a member of. Results are unordered. There is no way to specify ordering, priority, or filtering, and this field should not be used to determine a user's canonical or current corporate email in multi-domain contexts.
6946469464
"""
6946569465
organizationVerifiedDomainEmails(
6946669466
"""

0 commit comments

Comments
 (0)