-
Notifications
You must be signed in to change notification settings - Fork 41
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
Feat: Adds More Information to Summary Panel #100
Feat: Adds More Information to Summary Panel #100
Conversation
@@ -47,6 +47,33 @@ M.press_enter = function() | |||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<CR>", false, true, true), "n", false) | |||
end | |||
|
|||
M.offset_to_seconds = function(offset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this works in other timezones, it works perfectly for EST.
Basically we get the time from the MR, get the user's current timezone offset, convert that to seconds, and then add/subtract those seconds from the time of the MR (which is UTC). We then reconvert that numeric value back into a readable string.
Parsing dates in Lua is difficult without any external dependencies!
Adds new info panel to the summary view to give users more information about the current merge request:
This panel can be configured to be visible either underneath (default) the description, or to the left. Users can also turn it on or off, and configure which fields are displayed in it.