lvoytek / discourse-triage

Application to keep track of updates on a Discourse server
GNU General Public License v3.0
4 stars 3 forks source link

Filter by subcategories #21

Closed s-makin closed 1 year ago

s-makin commented 1 year ago

The ability to filter by subcategories as well as tags would be really useful for some teams. For example:

https://discourse.ubuntu.com/c/server/cloud-init/54

Is in the server category, but the cloud-init subcategory

cpaelzer commented 1 year ago

This is actually already supported, the readme outlines e.g. dsctriage -c 'general discussions/microk8s' -s https://discuss.kubernetes.io and it works fine.

But whatever I do I can not get the same working on https://discourse.ubuntu.com I'd expect the above to be dsctriage --fullurls -s https://discourse.ubuntu.com -c "Server/cloud-init" or a lower/upper case variation thereof. But I can't get this or any other subcategory listed at https://discourse.ubuntu.com/categories working.

OTOH the fact that https://discourse.ubuntu.com/categories lists cloud-init suggests it is a sub-category and not a tag. I see in https://discourse.ubuntu.com/t/about-the-cloud-init-category/17865.json that it should be category id 54.

So the question IMHO is more "What do we need to pass to dsctriage to get this selected?"

lvoytek commented 1 year ago

Looks like the problem is with discourse.ubuntu.com. In https://discourse.ubuntu.com/categories.json?include_subcategories=true none of the categories contain a subcategory_list array such as with https://discuss.kubernetes.io/categories.json?include_subcategories=true. I can work around this though using the subcategory_ids array