Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@


## Documentation
- [ ] No Docs Needed:
- [ ] **No Docs Needed (skips all doc checks below)**
- [ ] No CLI Docs Needed (skip check for `docs/development/reference/cli-reference.mdx`)
- [ ] No Python SDK Docs Needed (skip check for `docs/development/reference/python-sdk/`)
- [ ] No General Docs Needed (skip check for general docs changes)

If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.
If this PR adds a new feature or changes existing behavior, make sure the relevant documentation is updated. If docs are not needed for a specific area, check the corresponding box above and explain why.
61 changes: 52 additions & 9 deletions .github/workflows/docs-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,72 @@ jobs:
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
if (/\[x\].*no docs needed/i.test(context.payload.pull_request.body || '')) {
const body = context.payload.pull_request.body || '';

if (/\[x\].*no docs needed/i.test(body)) {
core.info('🟡 "No Docs Needed" checked — skipping docs enforcement.');
return;
}

if (context.payload.pull_request.user.login === 'renovate[bot]') {
core.info('🤖 Renovate PR detected — skipping docs enforcement.');
return;
}


const noCliDocs = /\[x\].*no cli docs needed/i.test(body);
const noSdkDocs = /\[x\].*no python sdk docs needed/i.test(body);
const noGeneralDocs = /\[x\].*no general docs needed/i.test(body);

const filenames = (await github.rest.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
})).data.map(f => f.filename);

if (filenames.some(f => f.startsWith('docs/stable/'))) {
core.setFailed('❌ Changes to "stable" documentation are not allowed. Please make changes in the "development" directory instead.');
return;
}

if (filenames.some(f => /\.mdx?$/.test(f))) {
core.info('✅ Docs updated.');
} else {
core.setFailed('❌ No docs changes found and "No Docs Needed" not checked.');

const errors = [];

// 1. CLI changes require CLI reference doc update
if (filenames.some(f => f.startsWith('apps/agentstack-cli/'))) {
if (noCliDocs) {
core.info('🟡 "No CLI Docs Needed" checked — skipping CLI docs check.');
} else if (!filenames.some(f => f === 'docs/development/reference/cli-reference.mdx')) {
errors.push('❌ Changes in apps/agentstack-cli require an update to docs/development/reference/cli-reference.mdx.');
} else {
core.info('✅ CLI reference docs updated.');
}
}

// 2. Python SDK changes require Python SDK reference docs update
if (filenames.some(f => f.startsWith('apps/agentstack-sdk-py/'))) {
if (noSdkDocs) {
core.info('🟡 "No Python SDK Docs Needed" checked — skipping Python SDK docs check.');
} else if (!filenames.some(f => f.startsWith('docs/development/reference/python-sdk/'))) {
errors.push('❌ Changes in apps/agentstack-sdk-py require updates in docs/development/reference/python-sdk/.');
} else {
core.info('✅ Python SDK reference docs updated.');
}
}

// 3. Other apps/ changes require general docs update (outside reference/)
if (filenames.some(f =>
f.startsWith('apps/') &&
!f.startsWith('apps/agentstack-cli/') &&
!f.startsWith('apps/agentstack-sdk-py/')
)) {
if (noGeneralDocs) {
core.info('🟡 "No General Docs Needed" checked — skipping general docs check.');
} else if (!filenames.some(f => f.startsWith('docs/development') && !f.startsWith('docs/development/reference/'))) {
errors.push('❌ Changes in apps/ require docs updates outside of the reference subfolder.');
} else {
core.info('✅ Docs updated for other apps changes.');
}
}

if (errors.length > 0) {
core.setFailed(errors.join('\n'));
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ There are two documentation folders: `docs/stable` and `docs/development`. Due t

All PRs **must** either include corresponding documentation in `docs/development`, or include `[x] No Docs Needed` in the PR description. This is checked by GitHub Actions.

Special care needs to be taken with the `docs/development/reference/cli-reference.mdx` file, which is automatically generated. Use `mise run agentstack-cli:docs` to regenerate this file when modifying the CLI interface.
Special care needs to be taken with the `docs/development/reference/` folder, as its contents are automatically generated. Use `mise run agentstack-cli:docs` to regenerate the CLI reference when modifying the CLI interface. Use `mise run agentstack-sdk-py:docs` to regenerate the Python SDK reference when making any changes to it; Additionally, modify the corresponding SDK reference generating scripts in `apps/agentstack-sdk-py/docs` and the docs/docs.json file whenever you change the package import structure to reflect those changes.

Try to follow this structure:

Expand Down
3 changes: 3 additions & 0 deletions apps/agentstack-cli/src/agentstack_cli/async_typer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def __rich_console__(self, *args, **kwargs) -> RenderResult:

Markdown.elements["heading_open"] = _LeftAlignedHeading

class test:
pass


@contextmanager
def create_table(*args, no_wrap: bool = True, **kwargs) -> Iterator[Table]:
Expand Down
Loading
Loading