mirror of
https://github.com/debpalash/VoiceStudio.git
synced 2026-12-04 17:38:17 +00:00
Bumps [actions/github-script](https://github.com/actions/github-script) from 7.1.0 to 9.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/f28e40c7f34bde8b3046d885e986cb6290c5673b...3a2844b7e9c422d3c10d287c895573f7108da1b3)
---
updated-dependencies:
- dependency-name: actions/github-script
dependency-version: 9.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 8c2977f4da)
131 lines
4.7 KiB
YAML
131 lines
4.7 KiB
YAML
# Docs drift — relevant PR checks plus daily checks with one rolling issue.
|
|
#
|
|
# docs/features.yaml is the canonical inventory; scripts/check-docs-drift.py
|
|
# diffs it against README.md, docs/, and the engine registries. On drift the
|
|
# scheduled/manual job updates (or creates) ONE `docs-drift` issue — no issue
|
|
# spam — and closes it automatically when the check is clean again.
|
|
#
|
|
# Scheduled documentation-link and structure audit.
|
|
# Spec: docs/competitive-analysis.md Spec 9a / parity program Wave 0.1.
|
|
# Rolling-issue pattern adapted from Patter (MIT).
|
|
|
|
name: docs-drift
|
|
|
|
on:
|
|
schedule:
|
|
# Daily 03:30 UTC — after most merges, before EU morning triage.
|
|
- cron: "30 3 * * *"
|
|
workflow_dispatch:
|
|
# A documentation-only pull request skips the runtime suite, so the inventory
|
|
# check would otherwise never see the edits most likely to break it. Run it
|
|
# directly for the files it reads; the rolling issue is only touched by the
|
|
# scheduled and manual runs.
|
|
pull_request:
|
|
paths:
|
|
- "docs/features.yaml"
|
|
- "docs/**"
|
|
- "README.md"
|
|
- "scripts/check-docs-drift.py"
|
|
- ".github/workflows/docs-drift.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pull-request:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install checker deps
|
|
run: pip install "pyyaml==6.0.3"
|
|
|
|
- name: Check inventory vs README/docs/registries
|
|
run: python scripts/check-docs-drift.py
|
|
|
|
drift:
|
|
if: github.event_name != 'pull_request'
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install checker deps
|
|
run: pip install "pyyaml==6.0.3"
|
|
|
|
- name: Check inventory vs README/docs/registries
|
|
id: drift
|
|
continue-on-error: true
|
|
run: python scripts/check-docs-drift.py --output drift-report.md
|
|
|
|
- name: Update rolling docs-drift issue
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
DRIFT_OUTCOME: ${{ steps.drift.outcome }}
|
|
with:
|
|
script: |
|
|
const fs = require('fs');
|
|
const drifted = process.env.DRIFT_OUTCOME === 'failure';
|
|
const { owner, repo } = context.repo;
|
|
const label = 'docs-drift';
|
|
|
|
const open = await github.rest.issues.listForRepo({
|
|
owner, repo, state: 'open', labels: label, per_page: 5,
|
|
});
|
|
|
|
if (drifted) {
|
|
let body = '';
|
|
try {
|
|
body = fs.readFileSync('drift-report.md', 'utf8');
|
|
} catch {
|
|
body = '# Docs drift report\n\nThe checker failed before writing a report — see the workflow run logs.';
|
|
}
|
|
body += `\n\n---\n_Last checked by [run ${context.runId}](https://github.com/${owner}/${repo}/actions/runs/${context.runId})._\n`;
|
|
|
|
if (open.data.length > 0) {
|
|
await github.rest.issues.update({
|
|
owner, repo, issue_number: open.data[0].number, body,
|
|
});
|
|
core.info(`Updated rolling issue #${open.data[0].number}`);
|
|
} else {
|
|
const created = await github.rest.issues.create({
|
|
owner, repo,
|
|
title: 'docs-drift: feature inventory vs docs mismatch',
|
|
body,
|
|
labels: [label, 'documentation'],
|
|
});
|
|
core.info(`Created rolling issue #${created.data.number}`);
|
|
}
|
|
} else {
|
|
for (const issue of open.data) {
|
|
await github.rest.issues.createComment({
|
|
owner, repo, issue_number: issue.number,
|
|
body: 'Drift resolved — nightly check is clean again. Closing automatically.',
|
|
});
|
|
await github.rest.issues.update({
|
|
owner, repo, issue_number: issue.number, state: 'closed',
|
|
});
|
|
core.info(`Closed rolling issue #${issue.number}`);
|
|
}
|
|
}
|
|
|
|
- name: Surface drift as a failed run
|
|
if: steps.drift.outcome == 'failure'
|
|
run: |
|
|
echo "Docs drift detected — see the checker output above; scheduled/manual runs also update the rolling issue."
|
|
exit 1
|