scope autocomplete from commit history #9

Open
opened 2026-03-24 02:00:32 +01:00 by phundrak · 0 comments
Owner

Users should be able to autocomplete the scope of their commit from the commit history of their repository.

By default, the scopes will look into the past hundred commit for scopes to auto-suggest and will use a combination of recency and frequency to best suggest scopes, using this formula:

S_R = 1.0 - \frac{n}{depth}
\\
S_F = \sum_{n = 1}^{100}{c(n)\text{ if }c_s(n)=s}
\\
S = W_R S_R+W_F S_F

With:

  • S_R the recency score and W_R the recency weight
  • S_F the frequency score and W_F the frequency weight
  • n the depth of a commit and its scope
  • c(n) the commit at depth n and c_s(n) the scope of the commit at depth n
  • s the scope whose score we are computing
Users should be able to autocomplete the scope of their commit from the commit history of their repository. By default, the scopes will look into the past hundred commit for scopes to auto-suggest and will use a combination of recency and frequency to best suggest scopes, using this formula: ```math S_R = 1.0 - \frac{n}{depth} \\ S_F = \sum_{n = 1}^{100}{c(n)\text{ if }c_s(n)=s} \\ S = W_R S_R+W_F S_F ``` With: - $S_R$ the recency score and $W_R$ the recency weight - $S_F$ the frequency score and $W_F$ the frequency weight - $n$ the depth of a commit and its scope - $c(n)$ the commit at depth $n$ and $c_s(n)$ the scope of the commit at depth $n$ - $s$ the scope whose score we are computing
phundrak added the Kind/Feature
Priority
High
2
labels 2026-03-24 02:00:32 +01:00
phundrak added this to the v1.2 project 2026-03-24 02:00:32 +01:00
phundrak added a new dependency 2026-03-24 02:01:00 +01:00
Sign in to join this conversation.