Skip to content

docs: move the README notes to docs/configuration.md, and fix three bugs - #85

Merged
petertriho merged 6 commits into
mainfrom
docs/configuration
Oct 22, 2026
Merged

petertriho merged 6 commits into
mainfrom
docs/configuration

Conversation

@petertriho

Copy link
Copy Markdown
Owner

Moves the notes from the README to docs/configuration.md, corrects the docs that were wrong, and documents behavior that no doc described. It also fixes three bugs that were found while reading the code for the docs.

Changes

  • README: the README keeps the features, the requirements, the installation, the setup, and the default config. It is now 275 lines, down from 358. A list links to each section of docs/configuration.md.
  • docs/configuration.md: the notes on trigger actions, trailers, filtering, sorting, and hosted instances, rewritten. New sections:
    • Format and sort items: the four format functions, the item fields of each capability, sort_by, and the default sort orders.
    • Filetypes: "*" and compound filetypes.
    • Remotes and SSH aliases: remotes, enableRemoteUrlRewrites, ssh_aliases, gh repo set-default, and Octo buffers.
    • GitHub CLI, GitLab CLI, and curl: when cmp-git uses curl, and how the results are different.
    • Troubleshooting: a checklist for when no items show, vim.g.cmp_git_debug, and the cache for each buffer.
  • CONTRIBUTING.md: how to test the newest cached nightly with scripts/nightly-cache.sh latest, as the Neovim nightly job does.

Doc corrections

  • GitHub mentions are not "curl only". They use gh api since 73f6b7f (2023).
  • The github.issues.filter comment listed subscribed and repos. 40725f6 removed these values.
  • The README defaults did not show ssh_aliases, which c1f76bf added.
  • "All source functions take an optional config table" is false since b414e48.
  • The hosted instances example had no closing ).
  • The sort.lua comment named the field author_email. The field is author_mail.

Bug fixes

Each fix is a separate commit with regression tests. The new tests fail on the old code.

  • a503fea fix: keep the GitHub issue and pull request caches separate:
    • The combined action put the cached issue list in its result, and then added the pull requests to that list. As a result, the issue cache also got the pull requests, and github_issues returned them.
    • A cache hit returned only the issue cache. It gave the correct result only because of this mixed cache.
    • The pull request job was made before the issues were known. On a pull request cache hit, the result had no issues.
    • The action now builds a new list, and requests the pull requests only after the issues are known.
  • b7a3f50 fix: remove pull requests from the GitHub issues that curl gets: the REST issues endpoint also returns pull requests, so # showed each pull request two times. The issues request now removes the items that have a pull_request field. The pull requests use part of the page, so curl can give fewer issues than limit. docs/configuration.md tells this.
  • fc8f7df fix: show the commit author, not the committer: author_name and author_mail came from %cn and %ce. They now come from %aN and %aE, as the trailer identities do. The documentation window now says "Authored by NAME (EMAIL), committed on DATE" in place of "Commited by". The date is still the commit date.

Validation (local)

  • make ci exits 0 in the default shell (Neovim 0.12.6) and with Neovim v0.13.0-nightly+1cfebe9 from PATH.
  • make test passes in the nvim-0_12_0 shell.
  • make test passes on each fix commit.
  • The three new tests fail without their fixes.

The README now has only the features, the requirements, the
installation, the setup, and the default config. The notes on trigger
actions, trailers, filtering, sorting, and hosted instances move to
docs/configuration.md, and the README links to each section.

docs/configuration.md also documents behavior that no doc described:
the format functions and item fields, sort_by, filetypes, remotes and
ssh_aliases, gh repo set-default, Octo buffers, the differences between
the CLIs and curl, the debug log, and the cache for each buffer.

These docs were wrong:
- GitHub mentions are not curl only. They use gh api since 73f6b7f.
- The GitHub issue filter has no subscribed or repos value since
  40725f6.
- The default config did not show ssh_aliases, added in c1f76bf.
- The source functions take no config table since b414e48.
- The hosted instances example had no closing parenthesis.
The Neovim nightly job tests the newest overlay commit that is in the
cache, not the locked one. CONTRIBUTING.md now gives the commands that
run the same test locally with scripts/nightly-cache.sh latest.
The comment listed author_email, but the commit field is author_mail,
so sort_by = "author_email" gives no sortText.
The issues and pull requests action put the cached issue list in its
result, and then added the pull requests to that list. As a result,
the issue cache also got the pull requests, and github_issues then
returned them. A cache hit returned only the issue cache, which gave
the correct result only because of this mixed cache.

The pull request job was also made before the issues were known. On a
pull request cache hit, the callback ran at once without the issues.

The action now builds a new list from the two results, and requests the
pull requests only after the issues are known.
The REST issues endpoint also returns pull requests, with a
pull_request field. gh issue list does not. With curl, # showed each
pull request two times: as an issue and as a pull request.

The issues request now removes the items that have a pull_request
field. Because the pull requests use part of the page, curl can give
fewer issues than limit. docs/configuration.md tells this.
The author_name and author_mail fields came from %cn and %ce, which
are the committer. After a rebase or a cherry-pick by another person,
the commit documentation showed that person as the author.

The fields now come from %aN and %aE, so they respect the mailmap, as
the trailer identities do. The documentation now says "Authored by
<name> (<email>), committed on <date>" in place of "Commited by". The
date is still the commit date.
@petertriho
petertriho merged commit b5dcec0 into main Oct 22, 2026
5 checks passed
@petertriho
petertriho deleted the docs/configuration branch October 22, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant