Skip to content

Commit 36127cc

Browse files
authored
Merge pull request #44328 from github/repo-sync
Repo sync
2 parents f063510 + f6d1e72 commit 36127cc

17 files changed

Lines changed: 1929 additions & 385 deletions

File tree

content/copilot/reference/copilot-billing/models-and-pricing.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ Anthropic models include a cache write cost in addition to cached input.
6868
[^5]: {% data variables.copilot.copilot_gemini_25_pro %} and {% data variables.copilot.copilot_gemini_31_pro %} pricing applies to prompts with ≤200K tokens.
6969
[^6]: {% data variables.copilot.copilot_gemini_3_flash %} has no long-context surcharge.
7070

71-
### xAI
72-
73-
| Model | Release status | Category | Input | Cached input | Output |
74-
| --- | --- | --- | ---: | ---: | ---: |
75-
| {% for entry in tables.copilot.models-and-pricing %}{% if entry.provider == "xai" %} |
76-
| {{ entry.model }} | {{ entry.release_status }} | {{ entry.category }} | {{ entry.input }} | {{ entry.cached_input }} | {{ entry.output }} |
77-
| {% endif %}{% endfor %} |
78-
7971
### Fine-tuned ({% data variables.product.github %})
8072

8173
| Model | Release status | Category | Input | Cached input | Output |

data/reusables/copilot/github-app-preview-note.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

eslint.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,9 @@ export default [
177177
'src/article-api/**/*.{ts,js}',
178178
'src/audit-logs/**/*.{ts,js}',
179179
'src/color-schemes/**/*.{ts,js}',
180-
'src/data-directory/**/*.{ts,js}',
181180
'src/dev-toc/**/*.{ts,js}',
182-
'src/events/**/*.{ts,js}',
181+
'src/events/components/**/*.{ts,js}',
183182
'src/fixtures/**/*.{ts,js}',
184-
'src/frame/**/*.{ts,js}',
185183
'src/github-apps/**/*.{ts,js}',
186184
'src/journeys/**/*.{ts,js}',
187185
'src/languages/**/*.{ts,js}',

package-lock.json

Lines changed: 1864 additions & 341 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
"@opentelemetry/instrumentation-express": "^0.63.0",
181181
"@opentelemetry/instrumentation-http": "^0.215.0",
182182
"@opentelemetry/instrumentation-undici": "^0.25.0",
183-
"@opentelemetry/sdk-node": "^0.215.0",
183+
"@opentelemetry/sdk-node": "^0.218.0",
184184
"@primer/behaviors": "^1.10.2",
185185
"@primer/css": "^21.3.1",
186186
"@primer/live-region-element": "^0.7.2",
@@ -237,7 +237,7 @@
237237
"mdast-util-to-markdown": "2.1.2",
238238
"mdast-util-to-string": "^4.0.0",
239239
"micromark-extension-gfm": "^3.0.0",
240-
"next": "^16.2.3",
240+
"next": "^16.2.6",
241241
"ora": "^9.3.0",
242242
"parse5": "8.0.1",
243243
"quick-lru": "7.0.1",

src/data-directory/lib/get-data.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import { merge, get } from 'lodash-es'
77

88
import languages from '@/languages/lib/languages-server'
99
import { correctTranslatedContentStrings } from '@/languages/lib/correct-translation-content'
10+
import { createLogger } from '@/observability/logger'
11+
12+
const logger = createLogger(import.meta.url)
1013

1114
interface YAMLException extends Error {
1215
mark?: any
@@ -128,7 +131,7 @@ export const getDataByLanguage = memoize((dottedPath: string, langCode: string):
128131
// would have caused a YAMLException
129132
if (langCode !== 'en') {
130133
if (DEBUG_JIT_DATA_READS) {
131-
console.warn(`Unable to parse Yaml in (${langCode}) '${dottedPath}': ${error.message}`)
134+
logger.warn('Unable to parse Yaml in translation', { langCode, dottedPath, error })
132135
}
133136
// Give it one more chance, but use English this time
134137
return getDataByDir(dottedPath, languages.en.dir)
@@ -208,7 +211,7 @@ function getDataByDir(
208211
return content
209212
}
210213
} else {
211-
console.warn(`Unable to find variables Yaml file ${fullPath.join(path.sep)}`)
214+
logger.warn('Unable to find variables Yaml file', { filePath: fullPath.join(path.sep) })
212215
}
213216
return undefined
214217
}
@@ -347,7 +350,7 @@ const getFileContent = (
347350
englishRoot?: string,
348351
): string => {
349352
const filePath = root ? path.join(root, relPath) : relPath
350-
if (DEBUG_JIT_DATA_READS) console.log('READ', filePath)
353+
if (DEBUG_JIT_DATA_READS) logger.info('READ', { filePath })
351354
try {
352355
return fs.readFileSync(filePath, 'utf-8')
353356
} catch (err) {

src/events/lib/hydro.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const { NODE_ENV, HYDRO_SECRET, HYDRO_ENDPOINT } = process.env
1818
const inProd = NODE_ENV === 'production'
1919

2020
if (inProd && (isNil(HYDRO_SECRET) || isNil(HYDRO_ENDPOINT))) {
21-
console.warn(
21+
logger.warn(
2222
'Running in production but HYDRO_SECRET and HYDRO_ENDPOINT environment variables are not set.',
2323
)
2424
}

src/events/middleware.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { createLogger } from '@/observability/logger'
12
import express from 'express'
23
import { omit, without, mapValues } from 'lodash-es'
34
import QuickLRU from 'quick-lru'
@@ -17,6 +18,8 @@ import { DOTCOM_USER_COOKIE_NAME, STAFFONLY_COOKIE_NAME } from '@/frame/lib/cons
1718
import { analyzeComment, getGuessedLanguage } from './lib/analyze-comment'
1819
import { EventType, EventProps, EventPropsByType } from './types'
1920

21+
const logger = createLogger(import.meta.url)
22+
2023
const router = express.Router()
2124
const OMIT_FIELDS = ['type']
2225
const allowedTypes = new Set(without(Object.keys(schemas), 'validation'))
@@ -103,7 +106,7 @@ router.post(
103106
value: omit(body, OMIT_FIELDS),
104107
})
105108
} catch (eventError) {
106-
console.error('Error validating event:', eventError)
109+
logger.error('Error validating event', { error: eventError })
107110
}
108111
}
109112
if (validEvents.length > 0) {
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
import fs from 'fs'
22
import semver from 'semver'
33

4+
import { createLogger } from '@/observability/logger'
5+
const logger = createLogger(import.meta.url)
6+
47
export function checkNodeVersion() {
58
const packageFile = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
69
const { engines } = packageFile
710

811
if (!semver.satisfies(process.version, engines.node)) {
9-
console.error(
10-
`\n\nYou're using Node.js ${process.version.replace(/^v/, '')} but this project requires ${
12+
logger.error(
13+
`You're using Node.js ${process.version.replace(/^v/, '')} but this project requires ${
1114
engines.node
1215
}`,
16+
{ currentVersion: process.version, requiredVersion: engines.node },
1317
)
14-
console.error('Visit nodejs.org to download an installer that meets these requirements.\n\n')
18+
logger.error('Visit nodejs.org to download an installer that meets these requirements.')
1519
process.exit(1)
1620
}
1721
}

src/frame/lib/create-tree.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import fs from 'fs/promises'
33

44
import PageClass from './page'
55
import type { UnversionedTree, Page } from '@/types'
6+
import { createLogger } from '@/observability/logger'
7+
const logger = createLogger(import.meta.url)
68

79
const isProduction = process.env.NODE_ENV === 'production'
810

@@ -50,7 +52,7 @@ export default async function createTree(
5052
originalPath === 'content/early-access' ||
5153
originalPath.startsWith('content/early-access/')
5254
) {
53-
console.warn(`Warning: ${msg}`)
55+
logger.warn(msg, { path: originalPath })
5456
return
5557
}
5658
throw new Error(msg)

0 commit comments

Comments
 (0)