Skip to content

Commit 7922319

Browse files
authored
Merge pull request #46035 from github/repo-sync
Repo sync
2 parents dce7a9e + a1e26f1 commit 7922319

31 files changed

Lines changed: 464 additions & 262 deletions

File tree

‎content/copilot/concepts/agents/cloud-agent/about-cloud-agent.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,4 @@ Try the [Expand your team with {% data variables.copilot.copilot_cloud_agent %}]
171171
* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent) how-to articles
172172
* [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-custom-agents)
173173
* [AUTOTITLE](/copilot/responsible-use/agents)
174+
* [AUTOTITLE](/copilot/concepts/agents/about-github-agentic-workflows) for recurring repository automation that you want to version with your code and run in {% data variables.product.prodname_actions %}

‎package-lock.json‎

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

‎package.json‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@
297297
"cross-env": "^10.1.0",
298298
"csv-parse": "7.0.0",
299299
"domhandler": "^5.0.3",
300-
"escape-string-regexp": "5.0.0",
301300
"eslint": "^9.39.3",
302301
"eslint-config-prettier": "^10.1.8",
303302
"eslint-import-resolver-typescript": "^4.4.4",
@@ -319,22 +318,19 @@
319318
"husky": "^9.1.7",
320319
"is-svg": "6.0.0",
321320
"jiti": "^2.6.1",
322-
"json-schema-merge-allof": "^0.8.1",
323321
"lint-staged": "^17.0.4",
324322
"lowdb": "7.0.1",
325323
"markdownlint": "^0.34.0",
326324
"markdownlint-rule-helpers": "^0.25.0",
327325
"markdownlint-rule-search-replace": "^1.2.0",
328326
"mdast-util-gfm": "^3.1.0",
329327
"micromark-extension-gfm": "^3.0.0",
330-
"mkdirp": "^3.0.1",
331328
"mockdate": "^3.0.5",
332329
"nock": "^14.0.11",
333330
"nodemon": "3.1.10",
334331
"ora": "^9.3.0",
335332
"patch-package": "^8.0.1",
336333
"prettier": "^3.8.1",
337-
"rimraf": "^6.1.3",
338334
"sass": "^1.97.3",
339335
"start-server-and-test": "^3.0.0",
340336
"typescript": "^6.0.2",

‎src/audit-logs/lib/deduplicate.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { existsSync } from 'fs'
2-
import { writeFile } from 'fs/promises'
3-
import { mkdirp } from 'mkdirp'
2+
import { mkdir, writeFile } from 'fs/promises'
43
import path from 'path'
54

65
import type {
@@ -79,7 +78,7 @@ export async function writeDeduplicatedAuditLogData(
7978

8079
const sharedDir = path.join(AUDIT_LOG_DATA_DIR, 'shared')
8180
if (!existsSync(sharedDir)) {
82-
await mkdirp(sharedDir)
81+
await mkdir(sharedDir, { recursive: true })
8382
}
8483

8584
await writeFile(path.join(sharedDir, 'entries.json'), JSON.stringify(entriesPool))

‎src/audit-logs/scripts/sync.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
//
44
// Requires GITHUB_TOKEN.
55
import { existsSync } from 'fs'
6-
import { readFile, writeFile } from 'fs/promises'
7-
import { mkdirp } from 'mkdirp'
6+
import { mkdir, readFile, writeFile } from 'fs/promises'
87
import path from 'path'
98

109
import { filterByAllowlistValues, filterAndUpdateGhesDataByAllowlistValues } from '../lib/index'
@@ -190,7 +189,7 @@ async function main() {
190189
const auditLogVersionDirPath = path.join(AUDIT_LOG_DATA_DIR, version)
191190

192191
if (!existsSync(auditLogVersionDirPath)) {
193-
await mkdirp(auditLogVersionDirPath)
192+
await mkdir(auditLogVersionDirPath, { recursive: true })
194193
}
195194

196195
for (const page of Object.values(AUDIT_LOG_PAGES)) {

‎src/automated-pipelines/lib/update-markdown.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import walk from 'walk-sync'
22
import { existsSync, lstatSync, unlinkSync } from 'fs'
33
import path from 'path'
4-
import { readFile, writeFile, readdir } from 'fs/promises'
4+
import { mkdir, rm, readFile, writeFile, readdir } from 'fs/promises'
55
import matter from '@gr2m/gray-matter'
6-
import { rimraf } from 'rimraf'
7-
import { mkdirp } from 'mkdirp'
86
import { difference, isEqual } from 'lodash-es'
97

108
import { allVersions } from '@/versions/lib/all-versions'
@@ -212,7 +210,7 @@ async function updateDirectory(
212210
const initialDirectoryListing = await getDirectoryInfo(directory)
213211
if (initialDirectoryListing.directoryContents.length === 0 && !rootDirectoryOnly) {
214212
logger.info('Removing empty directory', { directory })
215-
await rimraf(directory)
213+
await rm(directory, { recursive: true, force: true })
216214
return
217215
}
218216

@@ -526,7 +524,7 @@ function isRootIndexFile(indexFile: string): boolean {
526524

527525
async function createDirectory(targetDirectory: string): Promise<void> {
528526
if (!existsSync(targetDirectory)) {
529-
await mkdirp(targetDirectory)
527+
await mkdir(targetDirectory, { recursive: true })
530528
}
531529
}
532530

‎src/automated-pipelines/tests/update-markdown.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { tmpdir } from 'os'
22
import { cp, rm, readFile } from 'fs/promises'
3-
import { existsSync } from 'fs'
3+
import { existsSync, mkdirSync } from 'fs'
44
import path from 'path'
55

66
import { afterAll, beforeAll, describe, expect, test } from 'vitest'
7-
import { mkdirp } from 'mkdirp'
87
import matter from '@gr2m/gray-matter'
98
import type { FrontmatterVersions } from '@/types'
109

@@ -77,7 +76,7 @@ describe('automated content directory updates', () => {
7776
// structure and contents after running updateContentDirectory.
7877
beforeAll(async () => {
7978
process.env.TEST_OS_ROOT_DIR = tempDirectory
80-
mkdirp.sync(`${tempContentDirectory}`)
79+
mkdirSync(`${tempContentDirectory}`, { recursive: true })
8180
await cp('src/automated-pipelines/tests/fixtures/content', tempContentDirectory, {
8281
recursive: true,
8382
})

‎src/codeql-cli/scripts/sync.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { readFile, writeFile, copyFile } from 'fs/promises'
1+
import { mkdir, rm, readFile, writeFile, copyFile } from 'fs/promises'
22
import { existsSync } from 'fs'
33
import walk from 'walk-sync'
4-
import { mkdirp } from 'mkdirp'
54
import { execFileSync, execSync } from 'child_process'
65
import path from 'path'
76
import matter from '@gr2m/gray-matter'
8-
import { rimraf } from 'rimraf'
97

108
import { updateContentDirectory } from '../../automated-pipelines/lib/update-markdown'
119
import { convertContentToDocs } from './convert-markdown-for-docs'
@@ -72,8 +70,8 @@ async function setupEnvironment() {
7270
)
7371
}
7472

75-
await rimraf(TEMP_DIRECTORY)
76-
await mkdirp(TEMP_DIRECTORY)
73+
await rm(TEMP_DIRECTORY, { recursive: true, force: true })
74+
await mkdir(TEMP_DIRECTORY, { recursive: true })
7775
}
7876

7977
async function rstToMarkdown(rstSourceDirectory: string) {

‎src/content-linter/lib/linting-rules/code-annotation-comment-spacing.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const codeAnnotationCommentSpacing = {
5252
if (restOfLine.startsWith(' ') && restOfLine.length > 1 && restOfLine[1] === ' ') {
5353
const lineNumber: number = token.lineNumber + index + 1
5454
const fixedLine: string = line.replace(
55-
new RegExp(`^(\\s*${commentChar.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})\\s+`),
55+
new RegExp(`^(\\s*${RegExp.escape(commentChar)})\\s+`),
5656
`$1 `,
5757
)
5858

‎src/content-linter/lib/linting-rules/link-quotation.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { addError, filterTokens } from 'markdownlint-rule-helpers'
22
import { getRange, quotePrecedesLinkOpen } from '../helpers/utils'
3-
import { escapeRegExp } from 'lodash-es'
43
import type { RuleParams, RuleErrorCallback, MarkdownToken, Rule } from '../../types'
54

65
export const linkQuotation: Rule = {
@@ -21,11 +20,11 @@ export const linkQuotation: Rule = {
2120
if (child.type === 'link_open' && quotePrecedesLinkOpen(previous_child.content || '')) {
2221
if (!child.attrs) continue
2322
inLinkWithPrecedingQuotes = true
24-
linkUrl = escapeRegExp(child.attrs[0][1])
23+
linkUrl = RegExp.escape(child.attrs[0][1])
2524
} else if (inLinkWithPrecedingQuotes && child.type === 'text') {
26-
content.push(escapeRegExp((child.content || '').trim()))
25+
content.push(RegExp.escape((child.content || '').trim()))
2726
} else if (inLinkWithPrecedingQuotes && child.type === 'code_inline') {
28-
content.push(`\`${escapeRegExp((child.content || '').trim())}\``)
27+
content.push(`\`${RegExp.escape((child.content || '').trim())}\``)
2928
} else if (child.type === 'link_close') {
3029
const title = content.join(' ')
3130
const regex = new RegExp(`"\\[${title}\\]\\(${linkUrl}\\)({%.*%})?(!|\\.|\\?|,)?"`)

0 commit comments

Comments
 (0)