jasper icon indicating copy to clipboard operation
jasper copied to clipboard

Issues & PRs aren't updating when labels are added/removed

Open gservat opened this issue 5 years ago • 1 comments

Similar to issue #72, it would be good if Jasper would update itself when labels change on issues.

I added a label to an issue that should make it disappear from a stream (as the stream has -label:<label I just added>) but even after a while (and clicking "Load Issues" doesn't seem to help nor restarting streams) the issue is still not showing the tag I added and remains part of the stream.

gservat avatar Apr 04 '19 12:04 gservat

OK i've enabled debugging (touch ~/.config/jasper/.debug) and reloaded Jasper. I think what's happening is that if you have a stream with issues/PRs that contain a certain label and you decide to update the stream filter to filter out said label, then Jasper will send a request to GitHub excluding the label you just added and thus never see the update. The inverse should work fine -- i.e. adding a label to issues/PRs that didn't have the label in question should appear in the stream:

55556844-3c1d9b80-5734-11e9-99fb-c57e7200460d

This is why the issue kept showing up for me as Jasper just wasn't getting any payload back from GitHub so it never got the update for the label that got added. I got around it by removing the -label:WIP from the stream, updating the stream (by pressing period) which made the label change show up, then adding -label:WIP again into the stream. Unfortunately this means that for any existing issues/PRs that do not have the WIP label will never be removed from the stream if I add the WIP label unless I do the same dance. I'm not really sure what to suggest as a fix here except maybe Jasper should request updates for any issues/PRs currently in the stream (regardless of filters) before applying the filters? Although this would increase the number of requests significantly I'd imagine.

gservat avatar Apr 04 '19 13:04 gservat