Skip to content

Commit

Permalink
Merge pull request github#30197 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Nov 27, 2023
2 parents 6bd5966 + e2b5e39 commit 9cf2d90
Show file tree
Hide file tree
Showing 25 changed files with 17,198 additions and 2,851 deletions.
8 changes: 4 additions & 4 deletions src/content-render/scripts/reconcile-filenames-with-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import walk from 'walk-sync'
import GithubSlugger from 'github-slugger'
import { decode } from 'html-entities'
import frontmatter from '#src/frame/lib/read-frontmatter.js'
import { execSync } from 'child_process'
import { execFileSync } from 'child_process'
import addRedirectToFrontmatter from '#src/redirects/scripts/helpers/add-redirect-to-frontmatter.js'

const slugger = new GithubSlugger()
Expand Down Expand Up @@ -60,13 +60,13 @@ contentFiles.forEach((oldFullPath) => {
const oldContentPath = path.relative(process.cwd(), oldFullPath)
const newContentPath = path.relative(process.cwd(), newFullPath)

const gitStatusOfFile = execSync(`git status --porcelain ${oldContentPath}`).toString()
const gitStatusOfFile = execFileSync('git', ['status', '--porcelain', oldContentPath]).toString()

// if file is untracked, do a regular mv; otherwise do a git mv
if (gitStatusOfFile.includes('??')) {
execSync(`mv ${oldContentPath} ${newContentPath}`)
execFileSync('git', ['mv', oldContentPath, newContentPath])
} else {
execSync(`git mv ${oldContentPath} ${newContentPath}`)
execFileSync('git', ['mv', oldContentPath, newContentPath])
}

// then add the old path to the redirect_from frontmatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3054,6 +3054,17 @@
"additional-permissions": [],
"access": "write"
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"additional-permissions": [
"repository_advisories"
],
"access": "write"
},
{
"category": "repos",
"slug": "list-tag-protection-states-for-a-repository",
Expand Down Expand Up @@ -6664,6 +6675,17 @@
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve",
"additional-permissions": [],
"access": "write"
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"additional-permissions": [
"administration"
],
"access": "read"
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json
Original file line number Diff line number Diff line change
Expand Up @@ -4383,6 +4383,12 @@
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
},
{
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
}
],
"teams": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3790,6 +3790,19 @@
"server-to-server": true,
"additional-permissions": []
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"access": "write",
"user-to-server": true,
"server-to-server": true,
"additional-permissions": [
"repository_advisories"
]
},
{
"category": "repos",
"slug": "list-tag-protection-states-for-a-repository",
Expand Down Expand Up @@ -8153,6 +8166,19 @@
"user-to-server": true,
"server-to-server": true,
"additional-permissions": []
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"access": "read",
"user-to-server": true,
"server-to-server": true,
"additional-permissions": [
"administration"
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3981,6 +3981,12 @@
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
},
{
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
}
],
"teams": [
Expand Down
6 changes: 6 additions & 0 deletions src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4449,6 +4449,12 @@
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
},
{
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
}
],
"teams": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3712,6 +3712,17 @@
"additional-permissions": [],
"access": "write"
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"additional-permissions": [
"repository_advisories"
],
"access": "write"
},
{
"category": "repos",
"slug": "list-tag-protection-states-for-a-repository",
Expand Down Expand Up @@ -7344,6 +7355,17 @@
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve",
"additional-permissions": [],
"access": "write"
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"additional-permissions": [
"administration"
],
"access": "read"
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json
Original file line number Diff line number Diff line change
Expand Up @@ -4743,6 +4743,12 @@
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
},
{
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
}
],
"teams": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4584,6 +4584,19 @@
"server-to-server": true,
"additional-permissions": []
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"access": "write",
"user-to-server": true,
"server-to-server": true,
"additional-permissions": [
"repository_advisories"
]
},
{
"category": "repos",
"slug": "list-tag-protection-states-for-a-repository",
Expand Down Expand Up @@ -8973,6 +8986,19 @@
"user-to-server": true,
"server-to-server": true,
"additional-permissions": []
},
{
"category": "security-advisories",
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks",
"access": "read",
"user-to-server": true,
"server-to-server": true,
"additional-permissions": [
"administration"
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4341,6 +4341,12 @@
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
},
{
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
}
],
"teams": [
Expand Down
6 changes: 6 additions & 0 deletions src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4809,6 +4809,12 @@
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
},
{
"slug": "create-a-temporary-private-fork",
"subcategory": "repository-advisories",
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
}
],
"teams": [
Expand Down
2 changes: 1 addition & 1 deletion src/github-apps/lib/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"2022-11-28"
]
},
"sha": "2a7dd8505dc86e70d7a321400d9278f58ca3f3ff"
"sha": "cb2192d6332d6a5d3870ecaaa337dbe49621f573"
}
Loading

0 comments on commit 9cf2d90

Please sign in to comment.