Skip to content

Commit

Permalink
Fix monthly announcement hostname (#2013)
Browse files Browse the repository at this point in the history
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
  • Loading branch information
david-a-wheeler authored Jul 31, 2023
1 parent 4e4d825 commit 18d44b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/mailers/report_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def report_monthly_announcement(
@month_display = month_display
@last_stat_in_prev_month = last_stat_in_prev_month
@last_stat_in_prev_prev_month = last_stat_in_prev_prev_month
@hostname = ENV.fetch('PUBLIC_HOSTNAME', 'localhost')
set_standard_headers
I18n.with_locale(I18n.default_locale) do
mail(
Expand Down
4 changes: 2 additions & 2 deletions app/views/report_mailer/report_monthly_announcement.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Here are the projects that first achieved a
@projects[level].each do |project|
new_achievements = true
%>
<li><a href="https://bestpractices.coreinfrastructure.org/projects/<%= project.id %>"><%= project.name %> at <%= project.achieved_passing_at %></a>
<li><a href="https://<%= @hostname %>/projects/<%= project.id %>"><%= project.name %> at <%= project.achieved_passing_at %></a>
<%
end # each
%>
Expand All @@ -65,4 +65,4 @@ end
<p>
Do you know a project that doesn't have a badge yet?
Please suggest to them that they
<a href="https://bestpractices.coreinfrastructure.org/">get a badge now</a>!
<a href="https://<%= @hostname %>/">get a badge now</a>!
4 changes: 2 additions & 2 deletions app/views/report_mailer/report_monthly_announcement.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ a <%= t("projects.form_early.level.#{level}") %> badge in <%= @month_display %>:
new_achievements = true -%>
* <%= project.name %>
at <%= project.achieved_passing_at %>
https://bestpractices.coreinfrastructure.org/projects/<%= project.id %>
https://<%= @hostname %>/projects/<%= project.id %>
<%
end # loop over projects
%>
Expand All @@ -60,4 +60,4 @@ end

Do you know a project that doesn't have a badge yet?
Please suggest to them that they get a badge now, by visiting:
https://bestpractices.coreinfrastructure.org
https://<%= @hostname %>

0 comments on commit 18d44b2

Please sign in to comment.