Skip to content

Commit

Permalink
chore(docs): auto-generate vimdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem-J-an authored and noortw01 committed Jan 6, 2025
1 parent de0d03d commit 7540ab8
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 49 deletions.
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,25 @@ For all available config options see:
```vimL
:AdoPure [ load ] [ context | threads ] [ opts ]
[ open ] [ quickfix | thread_picker | new_thread | existing_thread ] [ opts ]
[ submit ] [ comment | vote | thread_status ] [ opts ]
[ submit ] [ comment | vote | thread_status | delete_comment | edit_comment ] [ opts ]
```

command | subcommand | description
-- | -- | --
load | <i> | Loads specified argument into state.
<i> | context | Load open pull requests; prompt user to pick one.
<i> | threads | Fetch comment threads from Azure DevOps.
open | <i> | Opens specified argument in the editor.
<i> | quickfix | Open comment threads in quickfix window.
<i> | thread_picker | Open a picker with all comment threads.
<i> | new_thread | Opens a window to write a comment on code selection.
<i> | existing_thread | Opens a window with an existing comment thread.
submit | <i> | Submits specified argument to Azure DevOps.
<i> | comment | Submit new comment or reply; must be in new_thread or existing_thread window.
<i> | vote | Submit a new vote on the pull request.
<i> | thread_status | Submit a thread_status change; must be in existing_thread window.
command | subcommand | description
--------|-----------------|------------------------------------------------------------------------------
load | <i> | Loads specified argument into state.
<i> | context | Load open pull requests; prompt user to pick one.
<i> | threads | Fetch comment threads from Azure DevOps.
open | <i> | Opens specified argument in the editor.
<i> | quickfix | Open comment threads in quickfix window.
<i> | thread_picker | Open a picker with all comment threads.
<i> | new_thread | Opens a window to write a comment on code selection.
<i> | existing_thread | Opens a window with an existing comment thread.
submit | <i> | Submits specified argument to Azure DevOps.
<i> | comment | Submit new comment or reply; must be in new_thread or existing_thread window.
<i> | vote | Submit a new vote on the pull request.
<i> | thread_status | Submit a thread_status change; must be in existing_thread window.
<i> | delete_comment | Delete one of your own comments; must be in existing_thread window.
<i> | edit_comment | Edit one of your own comments; must be in existing_thread window.

## Suggested keymaps

Expand All @@ -69,6 +71,8 @@ set_keymap("<leader>aoe", "AdoPure open existing_thread")
set_keymap("<leader>asc", "AdoPure submit comment")
set_keymap("<leader>asv", "AdoPure submit vote")
set_keymap("<leader>ast", "AdoPure submit thread_status")
set_keymap("<leader>asd", "AdoPure submit delete_comment")
set_keymap("<leader>ase", "AdoPure submit edit_comment")
```

## Showcase
Expand Down
53 changes: 19 additions & 34 deletions doc/adopure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Table of Contents *adopure.contents*

····································································· |adopure|
························································· |adopure.config.meta|
······························································· |adopure.state|
························································· |adopure.types.state|
················································· |adopure.types.state_manager|
······························································ |adopure.thread|
···························································· |adopure.quickfix|
······················································ |adopure.pickers.thread|
Expand Down Expand Up @@ -46,7 +47,7 @@ Opens specified argument in the editor.
*existing_thread*: Opens a window with an existing comment thread.

>vim
:AdoPure [ submit ] [ comment | vote | thread_status ] [ opts ]
:AdoPure [ submit ] [ comment | vote | thread_status | delete_comment | edit_comment ] [ opts ]
<
Submits specified argument to Azure DevOps.

Expand All @@ -56,6 +57,10 @@ Submits specified argument to Azure DevOps.

*thread_status*: Submit a thread_status change; must be in existing_thread window.

*delete_comment*: Delete one of your own comments; must be in existing_thread window.

*edit_comment*: Edit one of your own comments; must be in existing_thread window.

>vim
:AdoPure [ unload ]
<
Expand Down Expand Up @@ -141,37 +146,18 @@ adopure.Config *adopure.Config*


==============================================================================
*adopure.state*

*AdoState:new*
AdoState:new({repository}, {pull_request})

Parameters: ~
{repository} (adopure.Repository)
{pull_request} (adopure.PullRequest)

Returns: ~
(adopure.AdoState)

See: ~
|adopure.load_state_manager|


AdoState:load_pull_request_threads({_}) *AdoState:load_pull_request_threads*
Fetch comment threads from Azure DevOps.
Comment threads are added upon initialization and when creating new threads with the plugin.
Comment threads created by others, or without the plugin are not automatically loaded.

Parameters: ~
{_} (table)
*adopure.types.state*

==============================================================================
*adopure.types.state_manager*

adopure.StateManager *adopure.StateManager*

Fields: ~
{repository} (adopure.Repository)
{pull_requests} (adopure.PullRequest[])
{state} (adopure.AdoState|nil)
{root_path} (string)


==============================================================================
Expand All @@ -186,44 +172,43 @@ M.new_thread_window({state}, {_}) *M.new_thread_window*
{_} (table)


M.open_thread_window({opts}) *M.open_thread_window*
M.open_thread_window({state}, {opts}) *M.open_thread_window*
Open an existing comment thread in a window.
Can be called if there is an extmark indicating an available comment thread.

Parameters: ~
{opts} (adopure.OpenThreadWindowOpts)
{state} (adopure.AdoState)
{opts} (adopure.OpenThreadWindowOpts)


M.update_thread_status({state}, {_}) *M.update_thread_status*
Update pull request thread status.
Will prompt the user to supply the requested new state.
Can be called in an existing thread window.
@deprecated Migrate to: adopure.AdoState:update_thread({target="update_status"})

Parameters: ~
{state} (adopure.AdoState)
{_} (table)


M.submit_comment({state}, {_}) *M.submit_comment*
Submit a new comment thread or reply to an existing one.
Can be called in a new thread window, or in an existing thread window.

Parameters: ~
{state} (adopure.AdoState)
{_} (table)
{_} (table) @deprecated Migrate to adopure.AdoState:submit_comment(_)


==============================================================================
*adopure.quickfix*

*M.render_quickfix*
M.render_quickfix({pull_request_threads}, {_})
M.render_quickfix({state}, {_}) *M.render_quickfix*
Render pull request threads in quickfix panel.
This allows for a workflow of quickly jumping to various comment threads in the code.

Parameters: ~
{pull_request_threads} (adopure.Thread[])
{_} (table)
{state} (adopure.AdoState)
{_} (table)


==============================================================================
Expand Down

0 comments on commit 7540ab8

Please sign in to comment.