Skip to content

Commit

Permalink
Don't display the GraphQL API rate limit information on the About scr…
Browse files Browse the repository at this point in the history
…een if it's not available
  • Loading branch information
johntopleyons committed Apr 4, 2023
1 parent 996030e commit 561e6bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webapp/views/about.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
</ul>
</nav>

<% unless rate_limit.nil? %>
<section id="rate-limit">
<h3>GitHub GraphQL API Rate Limit</h3>
<p><%=pluralise(rate_limit.remaining, 'point', 'points') %> remaining out of <%=pluralise(rate_limit.limit, 'point', 'points') %> limit</p>
<p>Resets <%=d rate_limit.reset_at %></p>
</section>
<% end %>
<section id="version-info">
<h3>Version Information</h3>
<p>Branch: <a href="https://github.com/ONSdigital/<%=h repo_name%>/tree/<%=h branch %>"><%=h branch %></a></p>
Expand Down

0 comments on commit 561e6bd

Please sign in to comment.