refactor(forge): rename auto_close to close
Problem: `auto_close` is verbose given it's already namespaced under `forge.` in the config table. Solution: Rename to `close` in config defaults, class annotation, `refresh()` usage, and vimdoc.
This commit is contained in:
parent
6e385db3c7
commit
3d50c423ed
3 changed files with 6 additions and 6 deletions
|
|
@ -1500,7 +1500,7 @@ Configuration: ~
|
|||
>lua
|
||||
vim.g.pending = {
|
||||
forge = {
|
||||
auto_close = false,
|
||||
close = false,
|
||||
warn_missing_cli = true,
|
||||
github = {
|
||||
icon = '',
|
||||
|
|
@ -1522,7 +1522,7 @@ Configuration: ~
|
|||
<
|
||||
|
||||
Top-level fields: ~
|
||||
{auto_close} (boolean, default: false) When true, tasks linked to
|
||||
{close} (boolean, default: false) When true, tasks linked to
|
||||
closed/merged remote issues are automatically marked
|
||||
done on buffer open.
|
||||
{warn_missing_cli} (boolean, default: true) When true, warns once per
|
||||
|
|
@ -1550,7 +1550,7 @@ than 5 minutes are re-fetched asynchronously. The buffer renders immediately
|
|||
with cached data and updates extmarks when the fetch completes.
|
||||
|
||||
State pull: ~
|
||||
Requires `forge.auto_close = true`. After fetching, if the remote issue/PR
|
||||
Requires `forge.close = true`. After fetching, if the remote issue/PR
|
||||
is closed or merged and the local task is pending/wip/blocked, the task is
|
||||
automatically marked as done. Disabled by default. One-way: local status
|
||||
changes do not push back to the forge.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
---@field shorthand? string
|
||||
|
||||
---@class pending.ForgeConfig
|
||||
---@field auto_close? boolean
|
||||
---@field close? boolean
|
||||
---@field warn_missing_cli? boolean
|
||||
---@field [string] pending.ForgeInstanceConfig
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ local defaults = {
|
|||
},
|
||||
sync = {},
|
||||
forge = {
|
||||
auto_close = false,
|
||||
close = false,
|
||||
warn_missing_cli = true,
|
||||
github = {
|
||||
icon = '',
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ function M.refresh(s)
|
|||
any_fetched = true
|
||||
local forge_cfg = config.get().forge or {}
|
||||
if
|
||||
forge_cfg.auto_close
|
||||
forge_cfg.close
|
||||
and (cache.state == 'closed' or cache.state == 'merged')
|
||||
and (task.status == 'pending' or task.status == 'wip' or task.status == 'blocked')
|
||||
then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue