diff --git a/resources/migrations/20180330143004-pr-data-activity-feed.down.sql b/resources/migrations/20180412143511-update-activity-feed-with-claims.down.sql similarity index 100% rename from resources/migrations/20180330143004-pr-data-activity-feed.down.sql rename to resources/migrations/20180412143511-update-activity-feed-with-claims.down.sql diff --git a/resources/migrations/20180330143004-pr-data-activity-feed.up.sql b/resources/migrations/20180412143511-update-activity-feed-with-claims.up.sql similarity index 94% rename from resources/migrations/20180330143004-pr-data-activity-feed.up.sql rename to resources/migrations/20180412143511-update-activity-feed-with-claims.up.sql index 38a0cf8..34cdf7c 100644 --- a/resources/migrations/20180330143004-pr-data-activity-feed.up.sql +++ b/resources/migrations/20180412143511-update-activity-feed-with-claims.up.sql @@ -7,6 +7,7 @@ CREATE VIEW "public"."claims_view" AS SELECT i.title AS issue_title, p.title AS pr_title, -- added p.pr_number AS pr_number, -- added p.pr_id AS pr_id, -- added + i.issue_id AS issue_id, -- added COALESCE(u.name, u.login) AS user_name, u.avatar_url AS user_avatar_url, i.payout_receipt, @@ -39,6 +40,7 @@ CREATE VIEW "public"."activity_feed_view" AS -- altered claims_view.pr_number, -- added claims_view.pr_id, -- added claims_view.issue_number, + claims_view.issue_id, -- added claims_view.user_name, claims_view.user_avatar_url, claims_view.balance_eth, @@ -59,6 +61,7 @@ UNION claims_view.pr_number, -- added claims_view.pr_id, -- added claims_view.issue_number, + claims_view.issue_id, -- added claims_view.user_name, claims_view.user_avatar_url, claims_view.balance_eth, @@ -78,6 +81,7 @@ UNION claims_view.pr_number, -- added claims_view.pr_id, -- added claims_view.issue_number, + claims_view.issue_id, -- added claims_view.user_name, claims_view.user_avatar_url, claims_view.balance_eth, diff --git a/resources/sql/queries.sql b/resources/sql/queries.sql index ef40b5f..75d73e4 100644 --- a/resources/sql/queries.sql +++ b/resources/sql/queries.sql @@ -599,6 +599,7 @@ SELECT pr_title, pr_id, issue_number, + issue_id, user_name, user_avatar_url, balance_eth, diff --git a/src/cljs/commiteth/subscriptions.cljs b/src/cljs/commiteth/subscriptions.cljs index 24ffbb7..c6aaf57 100644 --- a/src/cljs/commiteth/subscriptions.cljs +++ b/src/cljs/commiteth/subscriptions.cljs @@ -62,8 +62,8 @@ (map (fn [bounty] (let [matching-claims (filter (fn [claim] - (= (:issue-number claim) - (:issue-number bounty))) + (= (:issue-id claim) + (:issue-id bounty))) activity-feed)] (assoc bounty :claims matching-claims)))))] {:items items