aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2022-03-21 11:41:19 -0400
committerGitHub <noreply@github.com>2022-03-21 11:41:19 -0400
commit0c02e8a62b1570be15db01d45969d2759a7f37bf (patch)
tree9cc3cd37d1cc46b4902f22744559a2160ccb1f36
parent50f3bb7e57163b16fee4c38620aec9e749dcb256 (diff)
parent91914010252a1f5c8a3358d09c3be92f30585ee3 (diff)
downloadrneovim-0c02e8a62b1570be15db01d45969d2759a7f37bf.tar.gz
rneovim-0c02e8a62b1570be15db01d45969d2759a7f37bf.tar.bz2
rneovim-0c02e8a62b1570be15db01d45969d2759a7f37bf.zip
Merge pull request #17768 from muniter/jl-genvimdoc-ci
-rw-r--r--.github/workflows/api-docs-check.yml17
-rw-r--r--.github/workflows/api-docs.yml15
2 files changed, 32 insertions, 0 deletions
diff --git a/.github/workflows/api-docs-check.yml b/.github/workflows/api-docs-check.yml
new file mode 100644
index 0000000000..8ae6e6ff92
--- /dev/null
+++ b/.github/workflows/api-docs-check.yml
@@ -0,0 +1,17 @@
+name: Missing API docs
+on:
+ pull_request:
+ types: [opened, synchronize, reopened, ready_for_review]
+ branches-ignore:
+ - 'marvim/api-doc-update**'
+ paths:
+ - 'src/nvim/api/*.[ch]'
+ - 'src/nvim/**.lua'
+ - 'runtime/lua/**.lua'
+
+jobs:
+ call-regen-api-docs:
+ if: github.event.pull_request.draft == false
+ uses: ./.github/workflows/api-docs.yml
+ with:
+ check_only: true
diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml
index 39d85e967d..36ac087c4a 100644
--- a/.github/workflows/api-docs.yml
+++ b/.github/workflows/api-docs.yml
@@ -1,3 +1,6 @@
+# Autogenerate the API docs on new commit to important branches
+# Also work as a check for PR's to not forget commiting their doc changes
+# called from api-docs-check.yml
name: Autogenerate API docs
on:
push:
@@ -9,6 +12,12 @@ on:
- 'master'
- 'release-[0-9]+.[0-9]+'
workflow_dispatch:
+ workflow_call:
+ inputs:
+ check_only:
+ type: boolean
+ default: false
+ required: false
jobs:
regen-api-docs:
@@ -44,6 +53,12 @@ jobs:
python3 scripts/gen_vimdoc.py
printf '::set-output name=UPDATED_DOCS::%s\n' $([ -z "$(git diff)" ]; echo $?)
+ - name: FAIL, PR has not commited doc changes
+ if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && inputs.check_only }}
+ run: |
+ echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes"
+ exit 1
+
- name: Automatic PR
if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }}
run: |