mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-10 02:30:39 +01:00
* Let pull requests that only change human-facing docs skip the test suites (GST-1951) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Quote the docs test list in the docs lane so shellcheck passes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Keep the Windows smoke check green on docs-only pull requests and update the workflow contract tests Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Keep the merged test check when the base gained a reader of a changed doc, hold the land policy key until a release reads it, and register two more docs reader tests Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Check links in untracked docs and docs with quoted or spaced names, and report an undecodable anchor instead of crashing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Point the flaky-exception anchor back at its section and test the link checker's exit codes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
34 lines
1.6 KiB
YAML
34 lines
1.6 KiB
YAML
name: docs-scope
|
|
description: >-
|
|
R81 (docs/pregate.md#docs-only). Classify a pull request's merge commit against its first parent with the base
|
|
branch's bin/gstack-docs-only. The caller checks out the merge ref with fetch-depth 2 and sets up Bun. A base without
|
|
the classifier, a classifier error or a crash all read as not docs-only, so the full suites run.
|
|
outputs:
|
|
docs_only:
|
|
description: true only when every changed path is human docs
|
|
value: ${{ steps.scope.outputs.docs_only }}
|
|
tests:
|
|
description: space-separated docs lane tests (tests that read docs by directory)
|
|
value: ${{ steps.scope.outputs.tests }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
ref: ${{ github.event.pull_request.base.sha }}
|
|
path: .docs-scope-base
|
|
persist-credentials: false
|
|
- id: scope
|
|
shell: bash
|
|
run: |
|
|
set -u
|
|
if [ "$GITHUB_EVENT_NAME" != pull_request ] || [ ! -f .docs-scope-base/bin/gstack-docs-only ]; then
|
|
echo "DOCS_ONLY: no (event $GITHUB_EVENT_NAME, or the base branch has no gstack-docs-only yet)"
|
|
echo 'docs_only=false' >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
code=0
|
|
bun --no-env-file --config=/dev/null .docs-scope-base/bin/gstack-docs-only --repo "$GITHUB_WORKSPACE" --base HEAD^1 --head HEAD --github-output "$GITHUB_OUTPUT" || code=$?
|
|
if [ "$code" -gt 1 ]; then echo "::warning::gstack-docs-only exited $code; the full suites run (docs/troubleshooting.md#docs-only-error)"; fi
|
|
exit 0
|