diff --git a/app/models/project.rb b/app/models/project.rb index 9f4be40..f3c92c7 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,6 +431,11 @@ def fetch_issue_stats puts "Error fetching issues for #{url}" end + def language + return unless repository.present? + repository['language'] + end + def issue_stats i = read_attribute(:issues_stats) || {} JSON.parse(i.to_json, object_class: OpenStruct) diff --git a/app/views/issues/_issue.html.erb b/app/views/issues/_issue.html.erb index 39716e2..5eab361 100644 --- a/app/views/issues/_issue.html.erb +++ b/app/views/issues/_issue.html.erb @@ -10,7 +10,11 @@
- Project: <%= link_to issue.project.to_s, project_url(issue.project) %>
+ Project: <%= link_to issue.project.to_s, project_url(issue.project) %>
+ <% if issue.project.language%>
+ (<%= issue.project.language %>)
+ <% end %>
+
Opened by <%= issue.user %> <%= time_ago_in_words(issue.created_at) %> ago
- <%= pluralize issue.comments_count, 'comment' %>