Skip to content

Commit

Permalink
List issues via a pagination-expanding proxy
Browse files Browse the repository at this point in the history
Previously we were just missing any issues that didn't happen to
paginate on the first page.
illicitonion committed Nov 25, 2023
1 parent 3068dac commit 82ef15c
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -27,6 +27,9 @@ tree = "https://github.com/CodeYourFuture/curriculum/tree/main/"
edit = "https://github.com/CodeYourFuture/curriculum/edit/main/"
root = "curriculum"
orgapi = "https://api.github.com/repos/CodeYourFuture/"
# We use a proxy which concatenates paginated responses, otherwise we miss results.
# Daniel is currently hosting this code https://github.com/illicitonion/github-issue-proxy but we should work out a long-term maintainable solution to this problem.
issuesorgapi = "https://github-issue-proxy.illicitonion.com/repos/CodeYourFuture/"

[markup]
[markup.tableOfContents]
2 changes: 1 addition & 1 deletion layouts/partials/issues.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ $repo := .Params.backlog }}
{{ $issues := print .Site.Params.orgapi $repo "/issues?per_page=100&state=open&direction=asc&type=issue" }}
{{ $issuesUrl := print .Site.Params.issuesorgapi $repo "/issues?per_page=100&state=open&direction=asc&type=issue" }}
{{ $filter := .Params.backlog_filter }}
{{ $currentPath := .Page.RelPermalink }}
<!-- api call -->

0 comments on commit 82ef15c

Please sign in to comment.