Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow reply on Gitlab buffer #375

Merged
merged 122 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
e3d7dfe
trim trailing slash from custom URLs
harrisoncramer Feb 26, 2024
438d126
Updated .github/CONTRIBUTING.md
harrisoncramer Feb 26, 2024
d29bd0b
Updated .github/ISSUE_TEMPLATE/bug_report.md
harrisoncramer Feb 26, 2024
a6401d9
Feat: Improve discussion tree toggling (#192)
jakubbortlik Feb 27, 2024
d985d71
Fix Multi Line Issues (Large Refactor) (#197)
harrisoncramer Feb 27, 2024
8859c47
Fix: location provider (#198)
harrisoncramer Feb 28, 2024
00e3e24
fix: add nil check for diffview performance issue (#199)
harrisoncramer Feb 28, 2024
8937783
Fix: Switch Tabs During Comment Creation (#200)
harrisoncramer Feb 28, 2024
7a3e761
Fix: Check if file is modified (#201)
harrisoncramer Feb 28, 2024
4c4f4b5
Fix: Off by 1 Error in Old Sha (#202)
harrisoncramer Feb 28, 2024
2010c24
Fix: Rebuild Diagnostics + Signs (#203)
harrisoncramer Mar 2, 2024
f6ada57
Fixes Off-By-One Issue w/ New SHA (#205)
harrisoncramer Mar 2, 2024
949e076
Fix: Reviewer Jump (#206)
harrisoncramer Mar 3, 2024
816338f
Merge branch 'main' into develop
harrisoncramer Mar 3, 2024
e6cc34c
Fix Typo In Settings Check (#209)
harrisoncramer Mar 3, 2024
d5ad0ea
fix: Calculate new line in ranged comment after all hunks correctly (…
harrisoncramer Mar 4, 2024
ca35faa
fix: range in new SHA (#212)
harrisoncramer Mar 4, 2024
6288ab5
Merge branch 'main' into develop
harrisoncramer Mar 4, 2024
1bf75e2
fix: address mIssing get_lines function (#224)
harrisoncramer Mar 26, 2024
6016624
fix: diagnostic creation for comments on deleted lines (#226)
harrisoncramer Mar 28, 2024
3e9b155
feat: Allow insecure https connection to Gitlab (#229)
harrisoncramer Mar 29, 2024
6b4fba3
Merge branch 'main' into develop
harrisoncramer Apr 3, 2024
f55852f
Merge branch 'main' into develop
harrisoncramer Apr 3, 2024
8b4ccaf
fix: remove esc keybinding (#240)
harrisoncramer Apr 4, 2024
61291a3
Removes backup register option (#242)
harrisoncramer Apr 4, 2024
09d5c55
fix: update go-gitlab and fix label code (#243)
harrisoncramer Apr 6, 2024
081ad8f
feat: enable pipeline command on main/master (#244)
harrisoncramer Apr 7, 2024
b00b168
Expose Gitlab Data via API (#235)
harrisoncramer Apr 8, 2024
db90a36
fix: line code fix (#245)
harrisoncramer Apr 8, 2024
3852084
Merge branch 'main' into develop
harrisoncramer Apr 8, 2024
bce50d0
feat: add squash and remove source branch (#230)
jakubbortlik Apr 8, 2024
50cded6
Fix: Treat INFO.labels as a table not as a string (#250)
jakubbortlik Apr 8, 2024
330c012
merged main
harrisoncramer Apr 8, 2024
77a6d92
feat: ssh remote url can have custom port (#248)
sunfuze Apr 9, 2024
2d59ac6
feat: Allow saving popup contents to temp_registers when quitting (#238)
jakubbortlik Apr 9, 2024
cc689a1
fix: Autocommand causes exit() to be called twice (#252)
jakubbortlik Apr 10, 2024
6d15f23
feat: Add keymap to copy node URL to clipboard (#253)
jakubbortlik Apr 10, 2024
77c64ae
merged main
harrisoncramer Apr 10, 2024
48a03c6
fix: do not colorize output if no info is provided (#255)
harrisoncramer Apr 10, 2024
d92bc09
Merge branch 'main' into develop
harrisoncramer Apr 10, 2024
9bdd077
feat: Copy web url of MR to clipboard (#258)
jakubbortlik Apr 11, 2024
9ab1a7a
Merge branch 'main' into develop
harrisoncramer Apr 12, 2024
7d76187
fix: Jumping to wrong buffer (#261)
harrisoncramer Apr 12, 2024
540986a
Fix: Go to last line and show warning when diagnostic is past the end…
jakubbortlik Apr 14, 2024
5df7bb3
fix: Get recent pipeline through other means (#266)
harrisoncramer Apr 14, 2024
15a02cb
feat: Add keymaps and linewise actions to layouts (#265)
jakubbortlik Apr 15, 2024
a2c79c3
ix: File comments don't have line number information (#268)
jakubbortlik Apr 16, 2024
442dea1
feat: add authentication provider setting (#270)
patrickpichler Apr 19, 2024
7aba653
Merge branch 'main' into develop
harrisoncramer Apr 19, 2024
f604c94
feat: Create and Manage Reviews (Draft Notes) (#264)
harrisoncramer Apr 19, 2024
e71e848
feat: 272 feature allow mr selection within neovim (#273)
harrisoncramer Apr 20, 2024
adc20bf
Fixes no draft notes, winbar issue (#275)
harrisoncramer Apr 20, 2024
1ecbf35
Merge branch 'main' into develop
harrisoncramer Apr 20, 2024
2c2d0eb
Fix: Restore focus (#277)
harrisoncramer Apr 20, 2024
9ec134d
fix: draft note edits + reply keybinding (#279)
harrisoncramer Apr 21, 2024
681c29e
Feat: Check feature branch is up-to-date on remote (#278)
jakubbortlik Apr 21, 2024
fa16905
feat: wrap CLI commands, toggle draft/live mode (#280)
harrisoncramer Apr 22, 2024
8affee7
fix: Update readme w/ correct packer installation (#285)
harrisoncramer Apr 22, 2024
9c22fd1
fix: non-existent buffer comments (#284)
harrisoncramer Apr 22, 2024
7a6e9c2
Merge branch 'main' into develop
harrisoncramer Apr 22, 2024
8a546af
Feat: Make toggle_draft_mode available outside discussion tree (#281)
jakubbortlik Apr 23, 2024
80fbcee
feat: allow refreshing discussion data (#288)
harrisoncramer Apr 23, 2024
8382d1f
Always refresh discussion data for discussion view toggle
harrisoncramer Apr 23, 2024
fcd8dbc
feat: support draft note replies (#290)
harrisoncramer Apr 24, 2024
475b950
remove print note
harrisoncramer Apr 24, 2024
81d7f0c
Fix: Use base_sha for calculating diff hunks (#291)
jakubbortlik Apr 24, 2024
85737e9
fix: Use backticks in code suggestions (#292)
jakubbortlik Apr 25, 2024
0115c58
Merge branch 'main' into develop
harrisoncramer Apr 28, 2024
3592d9e
Fix: Copy node url to clipboard (#295)
jakubbortlik May 5, 2024
a8b82b1
Fix: List remote branches for merge targets (#293)
jakubbortlik May 5, 2024
3dabc55
fix: consider remote branches (#297)
levouh May 5, 2024
2c7d983
Fix: Save popup contents to temp_registers (#294)
jakubbortlik May 5, 2024
75e5536
Fix: Ranged comment signs not showing (#305)
jakubbortlik Jun 10, 2024
3dd51aa
merged back main
harrisoncramer Jun 10, 2024
654e1fa
Merge branch 'main' into develop
harrisoncramer Jun 10, 2024
25ce496
remove print!
harrisoncramer Jun 11, 2024
5d17493
Fix docs: choose_merge_request's open_reviewer default value is true …
eclbg Jun 19, 2024
ac1edb9
Fix: Only set autocommands for select popups (#315)
jakubbortlik Jun 20, 2024
a32b610
Docs: Small iprovements to README and docs
jakubbortlik Jun 24, 2024
82fe076
Merge pull request #320 from jakubbortlik/docs-improvements
jakubbortlik Jun 24, 2024
f1ec78a
Feat: Add branch info to choose_merge_request menu (#318)
jakubbortlik Jun 26, 2024
3a73329
Chore: Add heart emoji (#323)
jakubbortlik Jul 2, 2024
8c648be
Feat: Add highlight for mentions (#324)
jakubbortlik Jul 5, 2024
ea55de7
Fix: Do Not Error w/Out Buffer Content (#325)
harrisoncramer Jul 5, 2024
1eed7a8
Fix diagnostic position when sha changes (#299)
jakubbortlik Jul 6, 2024
85dc29c
Fix: Remove API calls on Discussion Close (#328)
harrisoncramer Jul 6, 2024
cc8172a
Merge branch 'main' into develop
harrisoncramer Jul 6, 2024
29ca058
Remove root node type (#329)
harrisoncramer Jul 6, 2024
abd442d
Fix: Cycle create_mr popups when create_mr.fork is disabled (#335)
jakubbortlik Jul 28, 2024
4f03332
Merge branch 'main' into develop
harrisoncramer Jul 28, 2024
e269d23
Feat: Add default keymaps (#331)
jakubbortlik Aug 8, 2024
076647a
Feat: Customize discussion tree chevrons (#339)
c0r73x Aug 8, 2024
221a3fa
Fix: Discussion tree highlighting (#342)
jakubbortlik Aug 9, 2024
e127ac6
feat: add filtering when choosing merge requests (#346)
chardskarth Aug 16, 2024
15d66f7
feat: Add healthcheck (#345)
harrisoncramer Aug 17, 2024
1e3af0c
refactor: Move to gomock (#349)
harrisoncramer Aug 18, 2024
3e88d17
Merge branch 'main' into develop
harrisoncramer Aug 18, 2024
6f4053e
Fix: Error with removed config fields (#351)
jakubbortlik Aug 19, 2024
4589ea5
feat: Make remote configurable (#348)
harrisoncramer Aug 23, 2024
070d207
Convert port to number
harrisoncramer Aug 23, 2024
9c46394
Feat: Accept count with commenting keybindings (#353)
jakubbortlik Sep 5, 2024
db91972
Feat: Enable always jumping to discussion tree (#352)
jakubbortlik Sep 5, 2024
9aa5586
Merge branch 'main' into develop
harrisoncramer Sep 5, 2024
8d1d351
fix: Makes help popup not editable and close it on BufLeave (#355)
EpiCanard Sep 5, 2024
6df467c
Refactor: Splitting Up Go Interfaces (#354)
harrisoncramer Sep 5, 2024
a02de36
fix: Fixes MR selection if there are multiple targets (#357)
harrisoncramer Sep 7, 2024
cd05bd9
Merge branch 'main' into develop
harrisoncramer Sep 7, 2024
b3c5dfd
feat: Improve MR selection (#359)
harrisoncramer Sep 7, 2024
48d9112
feat: select MR by username (#360)
harrisoncramer Sep 8, 2024
e711bc1
Merge branch 'main' into develop
harrisoncramer Sep 8, 2024
d4faec4
Merge branch 'main' into develop
harrisoncramer Sep 9, 2024
9f963d5
Refactor: Add Payload Validators + Middleware In Go Code (#366)
harrisoncramer Sep 12, 2024
4f0826a
fix: format of date when MR was closed or merged (#367)
jakubbortlik Sep 13, 2024
9ce109c
fix: Add better checks for leaving comments (#369)
harrisoncramer Sep 13, 2024
7b5d1cb
Updated lua/gitlab/actions/comment.lua
harrisoncramer Sep 13, 2024
1c99943
fix: regex support for http credentials embedded in remote url (#372)
niderhoff Sep 14, 2024
ad7b866
fix: Comment on single line selects two lines (#371)
jakubbortlik Sep 14, 2024
4826c41
fix: Fix broken shutdown handler (#373)
harrisoncramer Sep 14, 2024
c6570b0
Merge branch 'main' into develop
harrisoncramer Sep 14, 2024
17cf9b9
move out ping handler
harrisoncramer Sep 14, 2024
778a4c4
Fixed reply (leaving comment on gitlab buffer)
harrisoncramer Sep 15, 2024
50bf8b2
Merge branch 'main' into fix-reply
harrisoncramer Sep 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions cmd/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,14 @@ func CreateRouter(gitlabClient *Client, projectInfo *ProjectInfo, s *shutdownSer
withMethodCheck(http.MethodPost),
))

m.Handle("/ping", http.HandlerFunc(pingHandler))
m.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintln(w, "pong")
})

return LoggingServer{handler: m}
}

/* Used to check whether the server has started yet */
func pingHandler(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintln(w, "pong")
}

/* checkServer pings the server repeatedly for 1 full second after startup in order to notify the plugin that the server is ready */
func checkServer(port int) error {
for i := 0; i < 10; i++ {
Expand Down
5 changes: 3 additions & 2 deletions lua/gitlab/actions/comment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ end
---@field ranged boolean
---@field unlinked boolean
---@field discussion_id string|nil
---@field reply boolean|nil

---This function sets up the layout and popups needed to create a comment, note and
---multi-line comment. It also sets up the basic keybindings for switching between
Expand All @@ -172,7 +173,7 @@ M.create_comment_layout = function(opts)

-- Check that Diffview is the current view
local view = diffview_lib.get_current_view()
if view == nil then
if view == nil and not opts.reply then
u.notify("Comments should be left in the reviewer pane", vim.log.levels.ERROR)
return
end
Expand All @@ -186,7 +187,7 @@ M.create_comment_layout = function(opts)

-- Check that we are hovering over the code
local filetype = vim.bo[0].filetype
if filetype == "DiffviewFiles" or filetype == "gitlab" then
if not opts.reply and (filetype == "DiffviewFiles" or filetype == "gitlab") then
u.notify(
"Comments can only be left on the code. To leave unlinked comments, use gitlab.create_note() instead",
vim.log.levels.ERROR
Expand Down
12 changes: 10 additions & 2 deletions lua/gitlab/actions/discussions/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,16 @@ M.reply = function(tree)
local discussion_id = tostring(discussion_node.id)
local comment = require("gitlab.actions.comment")
local unlinked = tree.bufnr == M.unlinked_bufnr
local layout = comment.create_comment_layout({ ranged = false, discussion_id = discussion_id, unlinked = unlinked })
layout:mount()
local layout = comment.create_comment_layout({
ranged = false,
discussion_id = discussion_id,
unlinked = unlinked,
reply = true,
})

if layout then
layout:mount()
end
end

-- This function (settings.keymaps.discussion_tree.delete_comment) will trigger a popup prompting you to delete the current comment
Expand Down
Loading