add branch name to payload
A second try at adding branch name to payload #19 . This time with 5-second cache to reduce calls to systemlist, hopefully resolving #26 .
Still learning vimscript. @ErikBjare @johan-bjareholt , let me know if I can improve anything.
@johan-bjareholt I think this will work. I update the branch async, but the branch is still sent with the rest of the data. I think this is preferred over sending it in a separate heartbeat?
@johan-bjareholt , do you want to have something added to the README about how to access the data through the query-api? Like so:
afk_events = query_bucket(find_bucket("aw-watcher-afk_"));
editor_events = query_bucket(find_bucket("aw-watcher-vim_"));
editor_events = filter_period_intersect(editor_events, filter_keyvals(afk_events, "status", ["not-afk"]));
merged_events = merge_events_by_keys(editor_events, ["branch"]);
RETURN = sort_by_duration(merged_events);
do you want to have something added to the README about how to access the data through the query-api?
@FilipHarald That would be nice :)
@FilipHarald This is pretty stale already but I'd love to get this merged, any chance you would continue with this ?
@varac it helps a little bit now that I know that someone needs it :) I will see what I can do. No promises though!
@johan-bjareholt I made a second try now.
Also, instead of doing N/A for when not a git-repo, I'm just splitting the tag completely.