aw-watcher-vim icon indicating copy to clipboard operation
aw-watcher-vim copied to clipboard

add branch name to payload

Open FilipHarald opened this issue 3 years ago • 7 comments

A second try at adding branch name to payload #19 . This time with 5-second cache to reduce calls to systemlist, hopefully resolving #26 .

FilipHarald avatar May 15 '22 17:05 FilipHarald

Still learning vimscript. @ErikBjare @johan-bjareholt , let me know if I can improve anything.

FilipHarald avatar May 15 '22 18:05 FilipHarald

@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?

FilipHarald avatar May 21 '22 09:05 FilipHarald

@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);

FilipHarald avatar May 21 '22 09:05 FilipHarald

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 :)

ErikBjare avatar May 24 '22 14:05 ErikBjare

@FilipHarald This is pretty stale already but I'd love to get this merged, any chance you would continue with this ?

varac avatar Feb 06 '23 19:02 varac

@varac it helps a little bit now that I know that someone needs it :) I will see what I can do. No promises though!

FilipHarald avatar Feb 07 '23 07:02 FilipHarald

@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.

FilipHarald avatar Jun 17 '23 15:06 FilipHarald