Skip to content

Commit f744179

Browse files
authored
Scope developer docs drift verification (#113)
1 parent 50d1fd4 commit f744179

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/developer-docs-agent.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
drift_checks: |
4646
[
4747
{
48-
"command": "git diff --exit-code",
49-
"description": "Generated package outputs are committed after build"
48+
"command": "git diff --exit-code -- . ':(top,exclude)README.md' ':(top,glob,exclude)docs/**' ':(top,glob,exclude)plugins/**/README.md'",
49+
"description": "Generated package outputs outside developer documentation are committed after build"
5050
}
5151
]
5252
prompt: |

tests/docs-agent-workflows.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ const workflows = [
4747
runKind: true,
4848
revision: docsAgentRevision,
4949
writablePaths: "README.md,docs/**,plugins/**/README.md",
50+
driftCheck: "git diff --exit-code -- . ':(top,exclude)README.md' ':(top,glob,exclude)docs/**' ':(top,glob,exclude)plugins/**/README.md'",
5051
},
5152
{
5253
path: ".github/workflows/skills-agent.yml",
5354
audience: "skills",
5455
runKind: false,
5556
revision: "main",
5657
writablePaths: "skills/**,plugins/**/skills/**,plugins/**/README.md",
58+
driftCheck: "git diff --exit-code",
5759
},
5860
]
5961

@@ -81,7 +83,7 @@ for (const workflow of workflows) {
8183
assert.match(source, /pnpm build/)
8284
assert.match(source, /pnpm verify/)
8385
assert.match(source, /validation_dependencies: npm install --global pnpm@10\.8\.1/)
84-
assert.match(source, /git diff --exit-code/)
86+
assert.ok(source.includes(`"command": "${workflow.driftCheck}"`), `${workflow.path} must use its scoped drift check`)
8587
assert.match(source, /permissions:\n contents: write\n pull-requests: write\n issues: write/)
8688
assert.match(source, /OPENAI_API_KEY: \$\{\{ secrets\.OPENAI_API_KEY \}\}/)
8789
assert.match(source, /EXTERNAL_PACKAGE_SOURCE_POLICY: \$\{\{ secrets\.EXTERNAL_PACKAGE_SOURCE_POLICY \}\}/)

0 commit comments

Comments
 (0)