From b62c0c8d9c22ae7fc9ee200733f8312efa6dbced Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 20 Feb 2023 08:12:59 +0100 Subject: docs: fix typos (#21961) Co-authored-by: Ben Morgan --- .github/workflows/api-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index fa8a7dbca0..af0397c7cb 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -44,7 +44,7 @@ jobs: sudo apt-get update sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - - name: Setup git config + - name: Set up git config run: | git config --global user.name 'marvim' git config --global user.email 'marvim@users.noreply.github.com' -- cgit From 599cf6f60c1d4e88ad950063a2c3dcf357cef9f8 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 24 May 2023 00:14:42 +0200 Subject: ci: remove api-docs-check workflow Having a workflow that creates a PR with the necessary changes on master is redundant as this check is enforced for each PR anyway. --- .github/workflows/api-docs.yml | 42 +++--------------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index af0397c7cb..f083d32fce 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,23 +1,11 @@ -# Autogenerate the API docs on new commit to important branches -# Also work as a check for PR's to not forget committing their doc changes -# called from api-docs-check.yml +# Check if any PR needs to run the autogenerate script name: Autogenerate API docs on: - push: + pull_request: paths: - 'src/nvim/api/*.[ch]' - 'runtime/lua/**.lua' - 'runtime/doc/**' - branches: - - 'master' - - 'release-[0-9]+.[0-9]+' - workflow_dispatch: - workflow_call: - inputs: - check_only: - type: boolean - default: false - required: false jobs: regen-api-docs: @@ -25,50 +13,26 @@ jobs: permissions: contents: write pull-requests: write - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: rhysd/action-setup-vim@v1 with: neovim: true version: nightly - uses: actions/checkout@v3 - with: - # Fetch depth 0 is required if called through workflow_call. In order - # to create a PR we need to access other branches, which requires a - # full clone. - fetch-depth: 0 - - name: Install dependencies run: | sudo apt-get update sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - - name: Set up git config - run: | - git config --global user.name 'marvim' - git config --global user.email 'marvim@users.noreply.github.com' - - - run: printf 'DOC_BRANCH=marvim/api-doc-update/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV - - name: Generate docs id: docs run: | - git checkout -b ${DOC_BRANCH} python3 scripts/gen_vimdoc.py printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && inputs.check_only }} + if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes" echo "The doc generation produces the following changes:" git diff --color --exit-code - - - name: Automatic PR - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && !inputs.check_only }} - run: | - git add -u - git commit -m 'docs: regenerate [skip ci]' - git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${DOC_BRANCH} - gh pr create --draft --fill --base ${GITHUB_REF#refs/heads/} --head ${DOC_BRANCH} || true -- cgit From fd089c8e50c211d7beae15dbc9492ae5a1a5f2e2 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 26 Jul 2023 09:50:54 +0100 Subject: feat(lua): typing for vim.fn.* (#24473) Problem: No LSP information for `vim.fn.*` Solution: Add meta file for `vim.fn.*`. --- .github/workflows/api-docs.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index f083d32fce..432e91306c 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,14 +1,15 @@ # Check if any PR needs to run the autogenerate script -name: Autogenerate API docs +name: Autogenerate API docs and types on: pull_request: paths: - 'src/nvim/api/*.[ch]' + - 'src/nvim/eval.lua' - 'runtime/lua/**.lua' - 'runtime/doc/**' jobs: - regen-api-docs: + regen-api-docs-and-types: runs-on: ubuntu-latest permissions: contents: write @@ -28,11 +29,13 @@ jobs: id: docs run: | python3 scripts/gen_vimdoc.py + ./scripts/gen_vimfn_types.lua printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | - echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes" + echo "Job failed, run ./scripts/gen_vimdoc.py and/or ./scripts/gen_vimfn_types.lua" + echo "and commit your doc changes" echo "The doc generation produces the following changes:" git diff --color --exit-code -- cgit From 42333ea98dfcd2994ee128a3467dfe68205154cd Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 28 Jul 2023 14:48:41 +0100 Subject: feat(docs): generate builtin.txt (#24493) - eval.lua is now the source of truth. - Formatting is much more consistent. - Fixed Lua type generation for polymorphic functions (get(), etc). - Removed "Overview" section from builtin.txt - Can generate this if we really want it. - Moved functions from sign.txt and testing.txt into builtin.txt. - Removed the *timer* *timers* tags since libuv timers via vim.uv should be preferred. - Removed the temp-file-name tag from tempname() - Moved lueval() from lua.txt to builtin.txt. * Fix indent * fixup! * fixup! fixup! * fixup! better tag formatting * fixup: revert changes no longer needed * fixup! CI --------- Co-authored-by: zeertzjq --- .github/workflows/api-docs.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 432e91306c..c6c2d8c658 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -29,7 +29,6 @@ jobs: id: docs run: | python3 scripts/gen_vimdoc.py - ./scripts/gen_vimfn_types.lua printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes -- cgit From 48d533272e57e91e4d14c93b26d4922957f40cd7 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 1 Aug 2023 14:20:44 +0100 Subject: feat(lua-types): types for vim.api.* (#24523) --- .github/workflows/api-docs.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index c6c2d8c658..d337e558db 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -23,8 +23,13 @@ jobs: - name: Install dependencies run: | sudo apt-get update + ./.github/scripts/install_deps.sh sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack + - name: Build metadata + run: | + make api-metadata + - name: Generate docs id: docs run: | -- cgit From 2234b84a1b85832667ad4a23fd5dee0bd1c92b72 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 17 Aug 2023 11:14:58 +0100 Subject: docs(generators): bake into cmake --- .github/workflows/api-docs.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index d337e558db..1648e7703e 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -26,14 +26,10 @@ jobs: ./.github/scripts/install_deps.sh sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - - name: Build metadata - run: | - make api-metadata - - name: Generate docs id: docs run: | - python3 scripts/gen_vimdoc.py + make doc printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - name: FAIL, PR has not committed doc changes -- cgit From cf7d37ad13c74461e6a05a72123ba44676e6106c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:51:40 +0000 Subject: ci: bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/api-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 1648e7703e..d776733b58 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -19,7 +19,7 @@ jobs: with: neovim: true version: nightly - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt-get update -- cgit From e0d97d264f83d45472e6cdd1051893db1083eefb Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:12:38 -0700 Subject: build: use built nvim artifact to generate eval files (#25875) In cases where the generated files depend on changes to Nvim itself, generating the files with an older version of Nvim will fail because those changes are not present in the older version. For example, if a new option is added then the generator script should be run with the version of Nvim that contains the new option, or else the generation will fail. Co-authored-by: dundargoc --- .github/workflows/api-docs.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index d776733b58..cb72daf9ad 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -15,19 +15,14 @@ jobs: contents: write pull-requests: write steps: - - uses: rhysd/action-setup-vim@v1 - with: - neovim: true - version: nightly - uses: actions/checkout@v4 - name: Install dependencies run: | - sudo apt-get update ./.github/scripts/install_deps.sh - sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack + sudo apt-get install -y doxygen python3-msgpack + - uses: ./.github/actions/cache - name: Generate docs - id: docs run: | make doc printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT @@ -35,7 +30,6 @@ jobs: - name: FAIL, PR has not committed doc changes if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | - echo "Job failed, run ./scripts/gen_vimdoc.py and/or ./scripts/gen_vimfn_types.lua" - echo "and commit your doc changes" + echo "Job failed, run 'make doc' and commit your doc changes." echo "The doc generation produces the following changes:" git diff --color --exit-code -- cgit From b2ca768196af87b93c90e315747d166f5d8d931c Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 11 Nov 2023 12:50:48 +0100 Subject: ci: skip api-doc workflow on draft PRs Checking the documentation generation is mostly useful towards the end of a pull request like with the lintcommit workflow. --- .github/workflows/api-docs.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index cb72daf9ad..2cecd2af6d 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -2,6 +2,7 @@ name: Autogenerate API docs and types on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'src/nvim/api/*.[ch]' - 'src/nvim/eval.lua' @@ -11,6 +12,7 @@ on: jobs: regen-api-docs-and-types: runs-on: ubuntu-latest + if: github.event.pull_request.draft == false permissions: contents: write pull-requests: write -- cgit From 5b765fcab42308cd4d97a4c37da0c2b1cdb3514d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 11:35:19 +0100 Subject: ci: fix api-docs workflow `git diff-index` only works for tracked files, and unchanged documentation files counts as untracked when shallow cloning. --- .github/workflows/api-docs.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to '.github/workflows/api-docs.yml') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 2cecd2af6d..6f8fe107d2 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -27,11 +27,8 @@ jobs: - name: Generate docs run: | make doc - printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - - - name: FAIL, PR has not committed doc changes - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} - run: | - echo "Job failed, run 'make doc' and commit your doc changes." - echo "The doc generation produces the following changes:" - git diff --color --exit-code + if [ -n "$(git status --porcelain)" ]; then + echo "::error::Job failed, run 'make doc' and commit your doc changes." + echo "::error::The doc generation produces the following changes:" + git diff --color --exit-code + fi -- cgit