-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Willem Jan Noort
committed
Jun 24, 2024
1 parent
59bc16e
commit da628ee
Showing
5 changed files
with
234 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: lemmy-help | ||
|
||
on: [push] | ||
|
||
env: | ||
PLUGIN_NAME: adopure | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
name: emmylua to vimdoc | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Generating help | ||
run: | | ||
curl -Lq https://github.com/numToStr/lemmy-help/releases/latest/download/lemmy-help-x86_64-unknown-linux-gnu.tar.gz | tar xz | ||
./lemmy-help [args] <path> > doc/${{env.PLUGIN_NAME}}.txt | ||
- name: Commit | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: ${{ github.head_ref }} | ||
commit_message: "chore(docs): auto-generate vimdoc" | ||
file_pattern: doc/*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Release Please | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
release-type: simple | ||
package-name: AdoPure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
============================================================================== | ||
Table of Contents *adopure* | ||
|
||
····································································· |adopure| | ||
························································· |adopure.config.meta| | ||
|
||
============================================================================== | ||
*adopure* | ||
|
||
The plugin provides an opinionated worfklow to interact with Azure DevOps Pull Requests. | ||
|
||
M.ado_pure({opts}) *M.ado_pure* | ||
Main nvim command line entry point of the plugin. | ||
Intended to be called using the command: AdoPure. | ||
The command is autocompleting when used in neovim command line. Valid options include: | ||
|
||
:AdoPure [ load ] [ context | threads ] [ opts ] | ||
Loads specified into state. | ||
|
||
*context*: load open pull requests; prompt user to pick one. | ||
Note: Subsequent commands will operate on the chosen PR. | ||
|
||
*threads*: Fetch comment threads from Azure DevOps. | ||
|
||
|
||
:AdoPure [ open ] [ quickfix | thread_picker | new_thread | existing_thread ] [ opts ] | ||
Opens specified in the editor. | ||
|
||
*quickfix*: Open comment threads in quickfix window. | ||
|
||
*thread_picker*: Open a picker with all comment threads. | ||
Supports filtering like so: | ||
:AdoPure open thread_picker {thread_filters={'hide_system', 'hide_closed'}} | ||
|
||
*new_thread*: Opens a window to write a comment on code selection. | ||
|
||
*existing_thread*: Opens a window with an existing comment thread. | ||
|
||
|
||
:AdoPure [ submit ] [ comment | vote | thread_status ] [ opts ] | ||
Submits specified to Azure DevOps. | ||
|
||
*comment*: Submit new comment or reply; must be in new_thread or existing_thread window. | ||
|
||
*vote*: Submit a new vote on the pull request. | ||
|
||
*thread_status*: Submit a thread_status change; must be in existing_thread window. | ||
|
||
Note: If no arguments args provided, the user will be prompted. | ||
|
||
Parameters: ~ | ||
{opts} (table) provided by neovim user command context. | ||
|
||
Usage: ~ | ||
>lua | ||
vim.cmd(':AdoPure load context {}') | ||
< | ||
|
||
|
||
M.load_state_manager() *M.load_state_manager* | ||
Initialize state_manager, contains repository and all open pull requests. | ||
If not using the vim command line interface, call this first. | ||
|
||
Returns: ~ | ||
(adopure.StateManager) | ||
|
||
|
||
M.get_loaded_state() *M.get_loaded_state* | ||
Return state of the plugin; raises if no pull request has been loaded into context. | ||
If not using the vim command line interface, call this to get state required for the other commands. | ||
|
||
Returns: ~ | ||
(adopure.AdoState) | ||
|
||
|
||
============================================================================== | ||
*adopure.config.meta* | ||
|
||
adopure.Highlights *adopure.Highlights* | ||
The plugin is configured by setting vim.g.adopure. | ||
|
||
`@type adopure.Config | ||
vim.g.adopure = { pat_token = secret_value } | ||
|
||
|
||
|
||
Fields: ~ | ||
{active?} (string) Highlight for lines with active comments. | ||
{active_sign?} (string) Highlight for sign indicating active comments. | ||
{inactive?} (string) Highlight for lines with inactive comments. | ||
{inactive_sign?} (string) Highlight for sign indicating in active comments. | ||
|
||
|
||
adopure.Config *adopure.Config* | ||
|
||
Fields: ~ | ||
{pat_token?} (string) Personal Access Token to acess Azure DevOps. | ||
{hl_groups?} (adopure.Highlights) Highlight groups to apply. | ||
{preferred_remotes?} (string[]) List with preferred remotes to extract Azure DevOps context from. | ||
|
||
|
||
vim:tw=78:ts=8:noet:ft=help:norl: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters