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
|
>lua
|
||||||
vim.g.pending = {
|
vim.g.pending = {
|
||||||
forge = {
|
forge = {
|
||||||
auto_close = false,
|
close = false,
|
||||||
warn_missing_cli = true,
|
warn_missing_cli = true,
|
||||||
github = {
|
github = {
|
||||||
icon = '',
|
icon = '',
|
||||||
|
|
@ -1522,7 +1522,7 @@ Configuration: ~
|
||||||
<
|
<
|
||||||
|
|
||||||
Top-level fields: ~
|
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
|
closed/merged remote issues are automatically marked
|
||||||
done on buffer open.
|
done on buffer open.
|
||||||
{warn_missing_cli} (boolean, default: true) When true, warns once per
|
{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.
|
with cached data and updates extmarks when the fetch completes.
|
||||||
|
|
||||||
State pull: ~
|
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
|
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
|
automatically marked as done. Disabled by default. One-way: local status
|
||||||
changes do not push back to the forge.
|
changes do not push back to the forge.
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
---@field shorthand? string
|
---@field shorthand? string
|
||||||
|
|
||||||
---@class pending.ForgeConfig
|
---@class pending.ForgeConfig
|
||||||
---@field auto_close? boolean
|
---@field close? boolean
|
||||||
---@field warn_missing_cli? boolean
|
---@field warn_missing_cli? boolean
|
||||||
---@field [string] pending.ForgeInstanceConfig
|
---@field [string] pending.ForgeInstanceConfig
|
||||||
|
|
||||||
|
|
@ -154,7 +154,7 @@ local defaults = {
|
||||||
},
|
},
|
||||||
sync = {},
|
sync = {},
|
||||||
forge = {
|
forge = {
|
||||||
auto_close = false,
|
close = false,
|
||||||
warn_missing_cli = true,
|
warn_missing_cli = true,
|
||||||
github = {
|
github = {
|
||||||
icon = '',
|
icon = '',
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ function M.refresh(s)
|
||||||
any_fetched = true
|
any_fetched = true
|
||||||
local forge_cfg = config.get().forge or {}
|
local forge_cfg = config.get().forge or {}
|
||||||
if
|
if
|
||||||
forge_cfg.auto_close
|
forge_cfg.close
|
||||||
and (cache.state == 'closed' or cache.state == 'merged')
|
and (cache.state == 'closed' or cache.state == 'merged')
|
||||||
and (task.status == 'pending' or task.status == 'wip' or task.status == 'blocked')
|
and (task.status == 'pending' or task.status == 'wip' or task.status == 'blocked')
|
||||||
then
|
then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue