Skip to content

Commit

Permalink
use short circuit
Browse files Browse the repository at this point in the history
Co-authored-by: Tristan Knight <[email protected]>
  • Loading branch information
wd60622 and tris203 authored Feb 5, 2025
1 parent 5e1b722 commit 223662c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/octo/pickers/telescope/provider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1213,12 +1213,11 @@ function M.notifications(opts)
end

local endpoint = "/notifications"
opts.prompt_title = "Github Notifications"
if opts.repo then
local owner, name = utils.split_repo(opts.repo)
endpoint = string.format("/repos/%s/%s/notifications", owner, name)
opts.prompt_title = string.format("%s Notifications", opts.repo)
end
opts.prompt_title = opts.repo and string.format("%s Notifications", opts.repo) or "Github Notifications"

opts.preview_title = ""
opts.results_title = ""
Expand Down

0 comments on commit 223662c

Please sign in to comment.