vladkens / ghstats

🤩📈 Self-hosted dashboard for tracking GitHub repos traffic history longer than 14 days.
MIT License
121 stars 2 forks source link

[Bug] Filters order is important? #18

Open t0mmili opened 1 day ago

t0mmili commented 1 day ago

Hi @vladkens,

Just tested v0.6.0, filtering to be specific. Either I found a bug or didn't understood docs or docs require clarification.

Test case 1 GHS_FILTER=t0mmili/*,!t0mmili/taiko-ci OK. Shows all my public repos except taiko-ci.

Test case 2 GHS_FILTER=!t0mmili/taiko-ci,t0mmili/* WRONG. Shows all my public repos, including other orgs I'm part of.

Test case 3 GHS_FILTER=t0mmili/*,!fork OK. Shows all my public repos except forks.

Test case 4 GHS_FILTER=!fork,t0mmili/* WRONG. Shows all my public repos, including other orgs I'm part of.

So, generally, it looks like negations should be placed in the end. Please clarify, what's the situation here.

vladkens commented 1 day ago

Hi, @t0mmili. Order shouldn't have relevance. I added test here and it passed

t0mmili commented 17 hours ago

I did further digging. First, I compiled app locally and tried above test cases. Order is not relevant 😮 Next I went back to original test, which was done with docker image running behind reverse proxy. It still fails when negation is first...

I will try to inspect this further and leave some updates here.

t0mmili commented 15 hours ago

@vladkens problem solved!

Previously my GHS_FILTER value didn't have quotations. This is correct and works ok:

    environment:
      GHS_FILTER: "!fork,t0mmili/*"