CodeTriage
CodeTriage copied to clipboard
Subscribe to a Language
Sign up to receive a random issue from a random repo from a specified language
We may need a new thing in addition to RepoSubscriptions to store this since a language isn't a repo. Also need a way of adding these issues to the daily email.
cc @DanielleSucher
I'd like to work on this feature, and would appreciate some input on the best way to integrate a LanguageSubscription model.
I started playing around with some modifications to the Active Record associations in an attempt to loosen the coupling between the models. I got about this far: https://github.com/mrgilman/codetriage/commit/59bc934dad253a499d4c2c125b1c2489df76cf07
This change causes one test failure (https://github.com/codetriage/codetriage/blob/master/test/unit/repo_subscriptions_test.rb#L83) because user.issue_assignments returns issue_assignments with nil repo_subscription_id when the association doesn't go through repo_subscriptions. I'm not sure if that's a problem, or is just a case where the test needs to be fixed.
Does this seem like the best approach? The other option I can think of, which seems really icky to me, is to create a polymorphic relationship where an issue_assignment belongs_to a subscription with a type of repo or language.
:+1: this looks great. Will eventually need to layer over some of the issue assigning logic that lives here https://github.com/codetriage/codetriage/blob/master/app/models/repo_subscription.rb#L58-L69. Will likely move that into an object that takes in some parameters and returns an issue so it can be used with repo and language subscriptions.
For the failing test we should make it more specific:
user.issue_assignments.where("repo_subscription_id is not null").count
The previous behavior it was relying on (all issue assignments generate repo subscriptions) will be a false assumption once this gets merged in.
Thanks for working on this :heart: sorry for the delay in getting back to you, i'm building a house :house_with_garden: :smile:
Neat! I haven't had a chance to work on this, so I'm extra delighted that you're taking a crack at it!
Has this gotten anywhere yet? I'd love to see this functionality happen!
(I am not unaware of the irony of grave-digging an issue in the CodeTriage repo :) )
Hi @schneems, Now that users can save their favorites languages in their profile on codetriage, I could select a random language based of their preference then find a random repo and finally a random issue belong to it. What do you think? I'll be able to work on it.
+1 for this feauture, it gives you a chance to get to know the broader aspects of a language (f.e. ruby is more than rails).
Hi, I tried working on this feature at #361. It's mostly done and with some test. Any thoughts? @schneems
Is this still to be implemented? The previous PR #361 didn't get any traction and was closed due to staleness.