diff --git a/.github/workflows/api-docs-check.yml b/.github/workflows/api-docs-check.yml index f76c035de4079b..6c5292cc16e942 100644 --- a/.github/workflows/api-docs-check.yml +++ b/.github/workflows/api-docs-check.yml @@ -1,6 +1,6 @@ name: Missing API docs on: - pull_request: + pull_request_target: types: [opened, synchronize, reopened, ready_for_review] branches-ignore: - 'marvim/api-doc-update**' @@ -18,3 +18,6 @@ jobs: uses: ./.github/workflows/api-docs.yml with: check_only: true + # The 'pull_request_target' event has $GITHUB_SHA as the last commit of + # the PR base branch (neovim/master), we need the actual PR branch HEAD + ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index ce8ed7996a67bd..9ae88bf88477ec 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -18,6 +18,10 @@ on: type: boolean default: false required: false + ref: + type: string + default: '' + required: true jobs: regen-api-docs: @@ -31,6 +35,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 + ref: ${{ inputs.ref || env.GITHUB_SHA }} - name: Install dependencies run: | diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 7c669e3c9daddf..a4cdac6514a085 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3492,9 +3492,9 @@ nvim_del_augroup_by_id({id}) *nvim_del_augroup_by_id()* To get a group id one can use |nvim_get_autocmds()|. - NOTE: behavior differs from |augroup-delete|. When deleting a - group, autocommands contained in this group will also be - deleted and cleared. This group will no longer exist. + NOTE: behavior really differs from |augroup-delete|. When + deleting a group, autocommands contained in this group will + also be deleted and cleared. This group will no longer exist. Parameters: ~ {id} Integer The id of the group. @@ -3592,7 +3592,7 @@ nvim_get_autocmds({*opts}) *nvim_get_autocmds()* • group_name (string): the autocommand group name. • desc (string): the autocommand description. • event (string): the autocommand event. - • command (string): the autocommand command. + • the command (string): the autocommand command. • once (boolean): whether the autocommand is only run once. • pattern (string): the autocommand pattern. If the diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index 30a5d60c399d5a..89146c8a334dfc 100644 --- a/src/nvim/api/autocmd.c +++ b/src/nvim/api/autocmd.c @@ -67,7 +67,7 @@ static int64_t next_autocmd_id = 1; /// - group_name (string): the autocommand group name. /// - desc (string): the autocommand description. /// - event (string): the autocommand event. -/// - command (string): the autocommand command. +/// - the command (string): the autocommand command. /// - once (boolean): whether the autocommand is only run once. /// - pattern (string): the autocommand pattern. /// If the autocommand is buffer local |autocmd-buffer-local|: @@ -706,7 +706,7 @@ Integer nvim_create_augroup(uint64_t channel_id, String name, Dict(create_augrou /// /// To get a group id one can use |nvim_get_autocmds()|. /// -/// NOTE: behavior differs from |augroup-delete|. When deleting a group, autocommands contained in +/// NOTE: behavior really differs from |augroup-delete|. When deleting a group, autocommands contained in /// this group will also be deleted and cleared. This group will no longer exist. /// @param id Integer The id of the group. /// @see |nvim_del_augroup_by_name()|