github_actions: Add a GitHub action for notifying if API docs changed.

This commit is contained in:
Vector73
2025-08-15 13:59:15 +00:00
committed by Tim Abbott
parent aeab2fd097
commit 4f65c99a6b
2 changed files with 93 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
name: Check feature level updated
name: API Documentation Update Check
on:
push:
@@ -7,6 +7,9 @@ on:
- "api_docs/**"
workflow_dispatch:
permissions:
contents: read
jobs:
check-feature-level-updated:
runs-on: ubuntu-latest
@@ -22,9 +25,6 @@ jobs:
with:
python-version: "3.x"
- name: Add required permissions
run: chmod +x ./tools/check-feature-level-updated
- name: Run tools/check-feature-level-updated
id: run_check
run: ./tools/check-feature-level-updated >> $GITHUB_OUTPUT
@@ -44,3 +44,37 @@ jobs:
- name: Fail job if feature level not updated in API docs
if: ${{ steps.run_check.outputs.fail == 'true' }}
run: exit 1
notify-if-api-docs-changed:
runs-on: ubuntu-latest
needs: check-feature-level-updated
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Add required permissions
run: chmod +x ./tools/notify-if-api-docs-changed
- name: Run tools/notify-if-api-docs-changed
id: run_check
run: ./tools/notify-if-api-docs-changed >> $GITHUB_OUTPUT
- name: Report status to CZO
if: ${{github.repository == 'zulip/zulip'}}
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_BOT_KEY }}
email: "github-actions-bot@chat.zulip.org"
organization-url: "https://chat.zulip.org"
to: "api documentation"
topic: ${{ steps.run_check.outputs.topic }}
type: "stream"
content: ${{ steps.run_check.outputs.content }}