Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Commit

Permalink
Adding words counters in view for issues and pr
Browse files Browse the repository at this point in the history
  • Loading branch information
carlogilmar committed Sep 22, 2019
1 parent 90aee86 commit edc26fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/spawnfest_web/live/repo_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ defmodule SpawnfestWeb.RepoLive do
RepoView.render("index.html", assigns)
end

def mount(session, socket) do
def mount(_session, socket) do
Endpoint.subscribe("repo_live_view")
{:ok, socket}
end

def handle_info(
%{
event: "show_analysis",
payload: %{repo: {url_repo, branches, branch, github_repo, issues, prs, contributors}}
payload: %{repo:
{url_repo, branches, branch, github_repo,
issues, prs, contributors, issues_words, prs_words}}
},
socket
) do
Expand All @@ -31,6 +33,8 @@ defmodule SpawnfestWeb.RepoLive do
|> assign(:issues, issues)
|> assign(:prs, prs)
|> assign(:contributors, contributors)
|> assign(:issues_words, issues_words)
|> assign(:prs_words, prs_words)

{:noreply, socket}
end
Expand Down

0 comments on commit edc26fb

Please sign in to comment.