Skip to content

Conversation

@taek2222
Copy link

@taek2222 taek2222 commented Jan 22, 2026

#️⃣ 이슈 번호

#9


🛠️ 작업 내용

  • 리뷰 리마인더 시스템 도입했습니다. JS랑 YML 워크플로우 모듈화해서 추후 변경에 용이하도록 두었습니다.
  • 또한 주석으로 수정 용이하도록 작성했습니다.

Summary by CodeRabbit

  • 작업
    • 개발 워크플로우 개선을 위해 12시간 이상 리뷰 대기 중인 풀 리퀘스트를 자동으로 감지하고 Slack으로 알림을 보내는 자동화 시스템 추가

✏️ Tip: You can customize this high-level summary in your review settings.

@taek2222 taek2222 self-assigned this Jan 22, 2026
@taek2222 taek2222 added the ✨ Feat 새로운 기능이나 기능 개선 추가 label Jan 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

GitHub Actions 워크플로우와 스크립트를 추가하여 12시간 이상 검토 대기 중인 PR에 대한 Slack 알림을 자동으로 전송합니다. GitHub 사용자를 Slack ID로 매핑하고 정해진 일정(KST 14:00)에 실행됩니다.

Changes

Cohort / File(s) 설명
검토 알림 스크립트
\.github/scripts/review-reminder\.js
12시간 이상 검토 대기 중인 오픈 PR을 조회하고, GitHub 사용자를 Slack ID로 매핑한 후, 포맷된 메시지를 Slack 웹훅으로 전송하는 Node.js 스크립트 추가
GitHub Actions 워크플로우
\.github/workflows/common-slack-review-reminder\.yml
매일 KST 14:00(UTC 05:00)에 실행되도록 예약된 워크플로우 추가; 리뷰 알림 스크립트 실행

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub<br/>(Scheduled)
    participant WF as Workflow<br/>(github-script)
    participant Script as review-reminder.js
    participant GHAPI as GitHub API
    participant Map as User Mapping
    participant Slack as Slack Webhook

    GH->>WF: Trigger (매일 14:00 KST)
    WF->>Script: Execute script
    Script->>GHAPI: Fetch open PRs
    GHAPI-->>Script: Return PR list
    Script->>Script: Filter (age >= 12h)
    Script->>Map: Map reviewers & author
    Map-->>Script: Slack IDs
    Script->>Script: Build message payload
    Script->>Slack: POST formatted message
    Slack-->>Script: 200 OK
    Script-->>WF: Complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • [Feat] 리뷰 리마인더 시스템 도입 backend#64: 동일한 검토 알림 기능 구현 — 12시간 이상 대기 중인 PR 확인, 작성자/검토자를 Slack 멘션으로 매핑하고 웹훅을 통해 게시하는 스크립트 및 KST 14:00 스케줄 워크플로우 포함

Suggested labels

🔧 Chore

Suggested reviewers

  • etama123
  • oungsi2000

Poem

🐰 Twelve hours have passed, time to remind,
GitHub and Slack in sync we find,
A message hops through the webhook's door,
Reviewers alerted, delays no more! 📬✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 풀 리퀘스트의 주요 변경 사항을 명확하게 설명하고 있습니다. 리뷰 리마인더 시스템 도입이 이번 PR의 핵심 목표이며, 제목이 이를 정확하게 반영하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/scripts/review-reminder.js:
- Around line 25-31: The current call to github.rest.pulls.list returns only the
first page (30 PRs); replace it with github.paginate to fetch all open PRs: call
github.paginate with github.rest.pulls.list and the same params (owner:
context.repo.owner, repo: context.repo.repo, state: 'open', sort: 'created',
direction: 'asc') and collect the returned array into the variable used as prs
so downstream logic iterates over all PRs instead of just the first page.
🧹 Nitpick comments (2)
.github/scripts/review-reminder.js (1)

36-40: Draft PR은 리마인더 대상에서 제외하는 것이 안전합니다.

초안 PR까지 알림 대상에 포함되면 노이즈가 커질 수 있어 pr.draft는 건너뛰는 걸 권장합니다.

♻️ 제안 수정
         for (const pr of prs) {
+            if (pr.draft) continue;
             const createdDate = new Date(pr.created_at);
             const diffTime = now - createdDate; // PR 생성 시간 차이 (ms)
.github/workflows/common-slack-review-reminder.yml (1)

9-12: 권한을 명시해 실행 실패를 방지하세요.

조직 기본 권한이 제한된 경우 PR 조회가 실패할 수 있으므로 contents: read, pull-requests: read를 명시하는 편이 안전합니다.

🔧 제안 수정
 jobs:
   remind:
+    permissions:
+      contents: read
+      pull-requests: read
     runs-on: ubuntu-latest

Comment on lines +25 to +31
const {data: prs} = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open', // 오픈 PR
sort: 'created', // 정렬 기준
direction: 'asc' // 오름차순
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cd /tmp/repo && find . -name "review-reminder.js" -type f 2>/dev/null | head -5

Repository: festabook/kotlin-multiplatform

Length of output: 133


🏁 Script executed:

cd /tmp/repo && cat -n ".github/scripts/review-reminder.js" | head -50

Repository: festabook/kotlin-multiplatform

Length of output: 133


🏁 Script executed:

cd /tmp/repo && cat -n ".github/scripts/review-reminder.js" | sed -n '20,40p'

Repository: festabook/kotlin-multiplatform

Length of output: 133


🌐 Web query:

Octokit github.rest.pulls.list pagination default page size limit

💡 Result:

Short answer: Octokit (REST) follows the GitHub REST API defaults — 30 items per page by default and you can set per_page up to 100. Some endpoints have additional limits/notes (e.g. certain PR file lists/commit lists have their own total caps). [1][2][3]

Sources:

  • GitHub REST API pagination (default 30, per_page up to 100). [1]
  • octokit/plugin-paginate-rest README (notes: per_page defaults to 30, max 100). [2]
  • Octokit REST endpoint docs showing per_page parameter (max 100). [3]

🌐 Web query:

Octokit github.paginate method usage pulls.list

💡 Result:

Use octokit.paginate to iterate all pages of the pulls.list endpoint and (optionally) map each page to items you want. Example patterns:

Node / JavaScript (modern @octokit/rest/@octokit/core + plugin-paginate-rest)

  • return all pull objects:
    const pulls = await octokit.paginate("GET /repos/{owner}/{repo}/pulls", { owner, repo, per_page: 100 });
  • stream/map only needed fields (reduces memory):
    const titles = await octokit.paginate(
    "GET /repos/{owner}/{repo}/pulls",
    { owner, repo, per_page: 100 },
    response => response.data.map(p => ({ number: p.number, title: p.title }))
    );

If using octokit.rest convenience method (same effect):
const pulls = await octokit.paginate(octokit.rest.pulls.list, { owner, repo, per_page: 100 });

Notes:

  • Use per_page up to 100 to reduce requests.
  • octokit.paginate only paginates "List ..." endpoints that return Link headers; otherwise it behaves like a single request. [1][2][3]

Sources:
[1] octokit/plugin-paginate-rest.js (paginate() docs).
[2] octokit.rest.pulls.list — Octokit REST docs.
[3] octokit.js / REST examples (pulls.list) documentation.


🏁 Script executed:

git ls-files | grep -i "review-reminder"

Repository: festabook/kotlin-multiplatform

Length of output: 159


🏁 Script executed:

find . -name "review-reminder.js" -type f 2>/dev/null

Repository: festabook/kotlin-multiplatform

Length of output: 110


🏁 Script executed:

git log --oneline --all -- "*review-reminder*" | head -5

Repository: festabook/kotlin-multiplatform

Length of output: 110


🏁 Script executed:

cat -n .github/scripts/review-reminder.js | head -60

Repository: festabook/kotlin-multiplatform

Length of output: 2455


🏁 Script executed:

cat -n .github/scripts/review-reminder.js | sed -n '20,45p'

Repository: festabook/kotlin-multiplatform

Length of output: 1118


🏁 Script executed:

cat -n .github/scripts/review-reminder.js | sed -n '1,100p' | tail -50

Repository: festabook/kotlin-multiplatform

Length of output: 2043


🏁 Script executed:

# Check if github.paginate is available/used elsewhere in the codebase
rg "github\.paginate" --type js

Repository: festabook/kotlin-multiplatform

Length of output: 222


🏁 Script executed:

# Check if there are any other calls to github.rest.pulls in this or similar files
rg "github\.rest\.pulls" --type js -B 2 -A 5

Repository: festabook/kotlin-multiplatform

Length of output: 222


🏁 Script executed:

rg "paginate" .github/scripts/

Repository: festabook/kotlin-multiplatform

Length of output: 56


🏁 Script executed:

rg "github\.rest\.pulls" .github/scripts/

Repository: festabook/kotlin-multiplatform

Length of output: 167


🏁 Script executed:

cat .github/scripts/review-reminder.js

Repository: festabook/kotlin-multiplatform

Length of output: 3888


오픈 PR 조회가 기본 페이지 크기(30개)로 제한되어 일부 누락 가능합니다.

github.rest.pulls.list는 페이지 매김 없이 호출하면 기본적으로 첫 번째 페이지(30개 항목)만 반환합니다. 저장소에 30개 이상의 오픈 PR이 있으면 나머지 PR에 대한 리마인더가 전송되지 않습니다. 모든 PR을 조회하려면 github.paginate를 사용하세요.

🔧 제안 수정
-        const {data: prs} = await github.rest.pulls.list({
+        const prs = await github.paginate(github.rest.pulls.list, {
             owner: context.repo.owner,
             repo: context.repo.repo,
             state: 'open',             // 오픈 PR
             sort: 'created',           // 정렬 기준
-            direction: 'asc'          // 오름차순
+            direction: 'asc',          // 오름차순
+            per_page: 100
         });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const {data: prs} = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open', // 오픈 PR
sort: 'created', // 정렬 기준
direction: 'asc' // 오름차순
});
const prs = await github.paginate(github.rest.pulls.list, {
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open', // 오픈 PR
sort: 'created', // 정렬 기준
direction: 'asc', // 오름차순
per_page: 100
});
🤖 Prompt for AI Agents
In @.github/scripts/review-reminder.js around lines 25 - 31, The current call to
github.rest.pulls.list returns only the first page (30 PRs); replace it with
github.paginate to fetch all open PRs: call github.paginate with
github.rest.pulls.list and the same params (owner: context.repo.owner, repo:
context.repo.repo, state: 'open', sort: 'created', direction: 'asc') and collect
the returned array into the variable used as prs so downstream logic iterates
over all PRs instead of just the first page.

Copy link
Contributor

@parkjiminnnn parkjiminnnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고마워요 비타 !
누릴게요~

@etama123 etama123 merged commit d27ccbb into develop Jan 29, 2026
6 checks passed
@etama123 etama123 deleted the feat/9 branch January 29, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat 새로운 기능이나 기능 개선 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants