Skip to content

Docs Impact Monitor #85

Docs Impact Monitor

Docs Impact Monitor #85

Workflow file for this run

name: Docs Impact Monitor
on:
workflow_dispatch:
inputs:
lookback_hours:
description: 'Hours to look back for workflow runs (default: 6)'
required: false
default: '6'
create_prs:
description: 'Create PRs with doc fixes (true/false)'
required: false
default: 'true'
repository_dispatch:
types: [release-notes-published]
schedule:
- cron: '30 1,7,13,19 * * *' # Every 6 hours
permissions:
contents: write
issues: write
actions: write
jobs:
# -----------------------------------------------------------------------
# Sui docs monitor
# -----------------------------------------------------------------------
sui-docs:
name: Sui Docs Monitor
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r scripts/requirements.txt
- name: Run Sui docs monitor
id: sui
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCS_MONITOR_PAT: ${{ secrets.DOCS_MONITOR_PAT }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_RELEASE_NOTES_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_NOTES_CHANNEL_ID }}
MONITORED_REPO: MystenLabs/sui
MONITORED_WORKFLOW: release-notes-monitor.yml
SCAN_MODE: workflow_runs
DOCS_LLMS_URL: https://docs.sui.io/llms.txt
DOCS_BASE_URL: https://docs.sui.io
DOCS_REPO: MystenLabs/sui
DOCS_REPO_PATH_PREFIX: docs/content
LOOKBACK_HOURS: ${{ inputs.lookback_hours || '6' }}
THIS_REPO: ${{ github.repository }}
CREATE_PRS: ${{ inputs.create_prs || 'true' }}
FORK_OWNER: ${{ vars.FORK_OWNER || secrets.FORK_OWNER }}
run: python scripts/monitor.py
- name: Persist state
if: always()
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add state/
if git diff --cached --quiet; then
echo "No state changes to commit"
else
git pull --rebase origin main || true
git commit -m "chore: update processed PRs state (sui-docs)"
git push || echo "Push failed — state will be retried next run"
fi
# -----------------------------------------------------------------------
# Move book monitor (Sui PRs that affect Move language docs)
# -----------------------------------------------------------------------
move-book:
name: Move Book Monitor
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r scripts/requirements.txt
- name: Run Move book monitor
id: move-book
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCS_MONITOR_PAT: ${{ secrets.DOCS_MONITOR_PAT }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_RELEASE_NOTES_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_NOTES_CHANNEL_ID }}
MONITORED_REPO: MystenLabs/sui
MONITORED_WORKFLOW: release-notes-monitor.yml
SCAN_MODE: workflow_runs
DOCS_LLMS_URL: https://move-book.com/llms.txt
DOCS_BASE_URL: https://move-book.com
DOCS_REPO: MystenLabs/move-book
DOCS_REPO_PATH_PREFIX: book
LOOKBACK_HOURS: ${{ inputs.lookback_hours || '6' }}
THIS_REPO: ${{ github.repository }}
CREATE_PRS: ${{ inputs.create_prs || 'true' }}
FORK_OWNER: ${{ vars.FORK_OWNER || secrets.FORK_OWNER }}
run: python scripts/monitor.py
- name: Persist state
if: always()
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add state/
if git diff --cached --quiet; then
echo "No state changes to commit"
else
git pull --rebase origin main || true
git commit -m "chore: update processed PRs state (move-book)"
git push || echo "Push failed — state will be retried next run"
fi
# -----------------------------------------------------------------------
# Walrus docs monitor
# -----------------------------------------------------------------------
walrus-docs:
name: Walrus Docs Monitor
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r scripts/requirements.txt
- name: Run Walrus docs monitor
id: walrus
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCS_MONITOR_PAT: ${{ secrets.DOCS_MONITOR_PAT }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_RELEASE_NOTES_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_NOTES_CHANNEL_ID }}
MONITORED_REPO: MystenLabs/walrus
MONITORED_WORKFLOW: release-notes.yml
SCAN_MODE: merged_prs
DOCS_LLMS_URL: https://docs.wal.app/llms.txt
DOCS_BASE_URL: https://docs.wal.app
DOCS_REPO: MystenLabs/walrus
DOCS_REPO_PATH_PREFIX: docs/content
LOOKBACK_HOURS: ${{ inputs.lookback_hours || '6' }}
THIS_REPO: ${{ github.repository }}
CREATE_PRS: ${{ inputs.create_prs || 'true' }}
FORK_OWNER: ${{ vars.FORK_OWNER || secrets.FORK_OWNER }}
run: python scripts/monitor.py
- name: Persist state
if: always()
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add state/
if git diff --cached --quiet; then
echo "No state changes to commit"
else
git pull --rebase origin main || true
git commit -m "chore: update processed PRs state (walrus-docs)"
git push || echo "Push failed — state will be retried next run"
fi
# -----------------------------------------------------------------------
# Seal docs monitor
# -----------------------------------------------------------------------
seal-docs:
name: Seal Docs Monitor
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r scripts/requirements.txt
- name: Run Seal docs monitor
id: seal
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCS_MONITOR_PAT: ${{ secrets.DOCS_MONITOR_PAT }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_RELEASE_NOTES_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_NOTES_CHANNEL_ID }}
MONITORED_REPO: MystenLabs/seal
SCAN_MODE: merged_prs
DOCS_LLMS_URL: https://seal-docs.wal.app/llms.txt
DOCS_BASE_URL: https://seal-docs.wal.app
DOCS_REPO: MystenLabs/seal
DOCS_REPO_PATH_PREFIX: docs/content
LOOKBACK_HOURS: ${{ inputs.lookback_hours || '6' }}
THIS_REPO: ${{ github.repository }}
CREATE_PRS: ${{ inputs.create_prs || 'true' }}
FORK_OWNER: ${{ vars.FORK_OWNER || secrets.FORK_OWNER }}
run: python scripts/monitor.py
- name: Persist state
if: always()
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add state/
if git diff --cached --quiet; then
echo "No state changes to commit"
else
git pull --rebase origin main || true
git commit -m "chore: update processed PRs state (seal-docs)"
git push || echo "Push failed — state will be retried next run"
fi
# -----------------------------------------------------------------------
# SuiNS docs monitor
# -----------------------------------------------------------------------
suins-docs:
name: SuiNS Docs Monitor
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r scripts/requirements.txt
- name: Run SuiNS docs monitor
id: suins
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCS_MONITOR_PAT: ${{ secrets.DOCS_MONITOR_PAT }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_RELEASE_NOTES_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_NOTES_CHANNEL_ID }}
MONITORED_REPO: MystenLabs/suins-contracts
SCAN_MODE: merged_prs
DOCS_LLMS_URL: https://docs.suins.io/llms.txt
DOCS_BASE_URL: https://docs.suins.io
DOCS_REPO: MystenLabs/suins-contracts
DOCS_REPO_PATH_PREFIX: documentation/content
LOOKBACK_HOURS: ${{ inputs.lookback_hours || '6' }}
THIS_REPO: ${{ github.repository }}
CREATE_PRS: ${{ inputs.create_prs || 'true' }}
FORK_OWNER: ${{ vars.FORK_OWNER || secrets.FORK_OWNER }}
run: python scripts/monitor.py
- name: Persist state
if: always()
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add state/
if git diff --cached --quiet; then
echo "No state changes to commit"
else
git pull --rebase origin main || true
git commit -m "chore: update processed PRs state (suins-docs)"
git push || echo "Push failed — state will be retried next run"
fi