name: API Documentation Update Check on: push: branches: [main] paths: - "api_docs/**" workflow_dispatch: permissions: contents: read jobs: check-feature-level-updated: runs-on: ubuntu-slim steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" - name: Run tools/check-feature-level-updated id: run_check run: ./tools/check-feature-level-updated >> $GITHUB_OUTPUT - name: Report status to CZO if: ${{ steps.run_check.outputs.fail == 'true' && github.repository == 'zulip/zulip'}} uses: zulip/github-actions-zulip/send-message@f675f2b4eb2a95fae974215476dcb7ad8dfeff6b # v2.0.2 with: api-key: ${{ secrets.ZULIP_BOT_KEY }} email: "github-actions-bot@chat.zulip.org" organization-url: "https://chat.zulip.org" to: "automated testing" topic: ${{ steps.run_check.outputs.topic }} type: "stream" content: ${{ steps.run_check.outputs.content }} - 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-slim # The failure message in tools/check-feature-level-updated says that # its failure skips this job. Update that message if changing this # dependency. needs: check-feature-level-updated steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 persist-credentials: false - name: Set up Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" - name: Run tools/github-changes-contain-file run: ./tools/github-changes-contain-file api_docs/changelog.md - name: Run tools/notify-if-api-docs-changed id: run_check run: ./tools/notify-if-api-docs-changed >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Report status to CZO if: ${{github.repository == 'zulip/zulip'}} uses: zulip/github-actions-zulip/send-message@f675f2b4eb2a95fae974215476dcb7ad8dfeff6b # v2.0.2 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 }}