CodeTriage
CodeTriage copied to clipboard
Store labels in the db.
The primary key of repo, label, issue will allow fast filtering of issues matching a label in a repo. This is the most email used for sending emails.
This is progress towards #498
Could we use a postgres array for this? The upside would be less to worry about, the downside is that it would be harder to query all issues against a specific tag. what do you think @prathamesh-sonpatki ?
We can split this into tables, labels and issue_labels.
labels will have name and repo_id.
issue_labels will have label_id, issue_id and repo_id.
Then we will be able to show all issues for a particular label, query them and do all sorts of things.
@schneems My first thought was postgres arrays but it depends on how we want to query the data. We should looks back at #498 first and decide what queries we want to support.
@prathamesh-sonpatki I don't know what queries that split will get us over the current situation. It will save a couple of bytes (maybe not actually because of the extra table) but I don't see any benefit over that.
I think there's probably a use case for searching for issue labels cross-repo, e.g. language:ruby label:help-wanted. This PR could support that with a new index. I think PG arrays are a red herring.
@kevincox Can you rebase?