Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Configuration for Semanic Prs Github App
# https://github.com/Ezard/semantic-prs
enabled: true
titleOnly: true
5 changes: 5 additions & 0 deletions lua/coderabbit/cli.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function M.review(opts, callbacks)
local stderr_chunks = {}
local cfg = config.get()
local timer = nil
local timed_out = false

local job_id = vim.fn.jobstart(cmd, {
cwd = vim.fn.getcwd(),
Expand Down Expand Up @@ -79,6 +80,9 @@ function M.review(opts, callbacks)
if timer then
vim.fn.timer_stop(timer)
end
if timed_out then
return
end
local stderr = table.concat(stderr_chunks, "\n")
vim.schedule(function()
if callbacks.on_exit then
Expand All @@ -90,6 +94,7 @@ function M.review(opts, callbacks)

if job_id > 0 and cfg.cli.timeout > 0 then
timer = vim.fn.timer_start(cfg.cli.timeout, function()
timed_out = true
vim.fn.jobstop(job_id)
vim.schedule(function()
if callbacks.on_exit then
Expand Down
Loading