Skip to content

Commit cc8f1fa

Browse files
authored
Merge pull request github#35034 from github/repo-sync
Repo sync
2 parents 2c02eb5 + f335417 commit cc8f1fa

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/orphaned-files-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ permissions:
2424
contents: read
2525

2626
jobs:
27-
orphaned-assets-check:
27+
orphaned-files-check:
2828
if: ${{ github.repository == 'github/docs-internal' }}
2929
runs-on: ubuntu-latest
3030
steps:

src/content-render/scripts/reusables-cli/find/unused.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@ export function findUnused({ absolute }: { absolute: boolean }) {
2424
const liquidTokens = getLiquidTokens(fileContents)
2525
for (const token of liquidTokens) {
2626
const { args, name } = token
27-
if (name === 'data' && args.startsWith('reusables.')) {
28-
const reusableName = path.join('data', ...args.split('.')) + '.md'
27+
if (
28+
(name === 'data' || name === 'indented_data_reference') &&
29+
args.startsWith('reusables.')
30+
) {
31+
const reusableName = path.join('data', ...args.split(' ')[0].split('.')) + '.md'
2932
// Special cases where we don't want them to count as reusables. It's an example in a how-to doc
30-
if (reusableName.includes('foo/bar.md') || reusableName.includes('your-reusable-name.md')) {
33+
if (
34+
reusableName.includes('foo/bar.md') ||
35+
reusableName.includes('foo/par.md') ||
36+
reusableName.includes('your-reusable-name.md')
37+
) {
3138
continue
3239
}
3340
const reusablePath = resolveReusablePath(reusableName)

src/content-render/scripts/reusables-cli/shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export function getAllReusablesFilePaths(): string[] {
105105
walk(reusablesDirectory, {
106106
includeBasePath: true,
107107
directories: false,
108+
ignore: ['**/README.md', 'enterprise_deprecation/**'],
108109
}),
109110
)
110111
}

0 commit comments

Comments
 (0)