CodeTriage icon indicating copy to clipboard operation
CodeTriage copied to clipboard

Subscribe to a Language

Open schneems opened this issue 12 years ago • 8 comments

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

schneems avatar May 05 '13 18:05 schneems

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.

mrgilman avatar Nov 15 '13 18:11 mrgilman

:+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:

schneems avatar Nov 17 '13 17:11 schneems

Neat! I haven't had a chance to work on this, so I'm extra delighted that you're taking a crack at it!

DanielleSucher avatar Nov 17 '13 22:11 DanielleSucher

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 :) )

joepie91 avatar Apr 19 '14 17:04 joepie91

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.

axlos avatar Feb 22 '15 23:02 axlos

+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).

nysthee avatar Jun 20 '15 16:06 nysthee

Hi, I tried working on this feature at #361. It's mostly done and with some test. Any thoughts? @schneems

jacarandang avatar Jul 02 '15 04:07 jacarandang

Is this still to be implemented? The previous PR #361 didn't get any traction and was closed due to staleness.

samihibrahim avatar Aug 27 '19 15:08 samihibrahim