Jiseoup/showmycodePublic
EN|KO
  • 코드
  • 커밋
  • 풀 리퀘스트
← 목록으로

feat: make commits and pulls page size configurable via env vars

JiseoupJiseoup · 2026년 5월 4일0698347

변경된 파일4개+10 -4

변경된 파일

+10 -4 · 4개

@@ -6,7 +6,7 @@ import { formatDate } from "@/lib/utils";
import { getDictionary, type Locale } from "@/lib/i18n.server";
import { BranchSelector } from "@/components/BranchSelector";
-const PER_PAGE = 50;
+const PER_PAGE = Number(process.env.COMMITS_PER_PAGE) || 50;
type Props = {
params: Promise<{ lang: string; owner: string; repo: string }>;
@@ -4,7 +4,7 @@ import { getPulls } from "@/lib/github";
import { formatDate } from "@/lib/utils";
import { getDictionary, type Locale } from "@/lib/i18n.server";
-const PER_PAGE = 30;
+const PER_PAGE = Number(process.env.PULLS_PER_PAGE) || 30;
type Props = {
params: Promise<{ lang: string; owner: string; repo: string }>;
@@ -11,6 +11,12 @@ GITHUB_REPOS=
# File tree default expansion depth (0 = all collapsed, 1 = root expanded, etc.)
FILE_TREE_DEPTH=0
+# Number of commits per page on the commits list (default: 50, GitHub API max: 100).
+COMMITS_PER_PAGE=50
+
+# Number of pull requests per page on the pulls list (default: 30, GitHub API max: 100).
+PULLS_PER_PAGE=30
+
# Access token for the share link (e.g. a long random string)
# Share URL: https://your-domain.com/?token=<SHARE_TOKEN>
# Leave empty to block all access.
@@ -55,9 +55,9 @@ All pages are under `app/[lang]/` for internationalization (KO/EN). `proxy.ts` (
```
/[lang]/ → Repository listing
/[lang]/repository/[owner]/[repo]/ → File tree + code viewer
-/[lang]/repository/[owner]/[repo]/commits/ → Commit history (paginated, 50/page)
+/[lang]/repository/[owner]/[repo]/commits/ → Commit history (paginated, default 50/page; configurable via COMMITS_PER_PAGE)
/[lang]/repository/[owner]/[repo]/commits/[sha] → Commit detail (files changed + diff)
-/[lang]/repository/[owner]/[repo]/pulls/ → Pull request list (paginated, 30/page)
+/[lang]/repository/[owner]/[repo]/pulls/ → Pull request list (paginated, default 30/page; configurable via PULLS_PER_PAGE)
/[lang]/repository/[owner]/[repo]/pulls/[number] → PR detail (Overview / Commits / Files changed tabs)
```