Skip to content

fix: 문서 변경 없어도 브랜치에 커밋이 있으면 PR 생성#453

Merged
knine79 merged 2 commits intomainfrom
fix/generate-docs-pr-condition
Mar 25, 2026
Merged

fix: 문서 변경 없어도 브랜치에 커밋이 있으면 PR 생성#453
knine79 merged 2 commits intomainfrom
fix/generate-docs-pr-condition

Conversation

@knine79
Copy link
Copy Markdown
Contributor

@knine79 knine79 commented Mar 25, 2026

개요

수정사항

  • generate-docs-pr 워크플로우에서 문서 변경 여부와 별도로 브랜치에 커밋이 있고 PR이 없는 경우에도 PR을 생성하도록 조건 추가

Summary by CodeRabbit

  • Chores
    • 문서 생성 GitHub Actions 워크플로우가 개선되어, 문서 변경 또는 PR 미존재(브랜치에 커밋만 있는 경우)를 모두 감지해 PR 생성/업데이트 및 알림을 트리거합니다.
    • PR 검색 방식이 변경되어 열린 PR을 보다 정확히 조회하고, 관련 GitHub 인증 정보가 워크플로우에 추가되었습니다.

@knine79 knine79 requested a review from a team as a code owner March 25, 2026 07:47
@knine79 knine79 requested review from deholic and jhseo and removed request for a team March 25, 2026 07:47
@knine79 knine79 added the in review This issue requires a review. label Mar 25, 2026
@knine79 knine79 self-assigned this Mar 25, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f458e3f-1eb8-40fe-acb5-64cb85546a9f

📥 Commits

Reviewing files that changed from the base of the PR and between 23a93dd and 7abe31f.

📒 Files selected for processing (1)
  • .github/workflows/generate-docs-pr.yml

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

GitHub Actions 워크플로우가 커밋-감지 출력을 changes에서 doc_changes로 대체하고, 브랜치에 열린 PR이 없고 원격 main보다 앞선 경우를 감지하는 새로운 불리언 출력 needs_pr를 도입합니다. PR 조회는 gh pr view에서 gh pr list --head로 변경되었으며, GH_TOKEN/GH_REPO 환경 변수가 커밋 단계에 추가되었습니다.

Changes

Cohort / File(s) Summary
GitHub Actions 워크플로우
.github/workflows/generate-docs-pr.yml
커밋 감지 출력 changesdoc_changes로 교체하고, 열린 PR 존재 및 브랜치 진도에 따라 계산되는 새로운 출력 needs_pr 추가. PR 생성/업데이트 및 Slack 알림 단계의 실행 조건을 `doc_changes

Sequence Diagram(s)

sequenceDiagram
    participant Workflow as Workflow
    participant Git as Git (local)
    participant GH as GitHub CLI / GitHub
    participant Slack as Slack

    Workflow->>Git: detect local commits & attempt commit
    Git-->>Workflow: commit made? (`doc_changes`)
    Workflow->>GH: gh pr list --head BRANCH_NAME
    GH-->>Workflow: open PR URL? (sets `needs_pr` based on result and branch ahead check)
    alt doc_changes || needs_pr
        Workflow->>GH: create or update PR
        GH-->>Workflow: return PR URL
        Workflow->>Slack: send notification with PR URL
    else
        Workflow-->>Workflow: no PR or notification
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 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 제목이 변경사항의 핵심을 명확하게 요약하고 있습니다. 문서 변경이 없어도 브랜치에 커밋이 있으면 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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/generate-docs-pr-condition

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

@knine79 knine79 added this to the 3.4.3 milestone Mar 25, 2026
@github-actions github-actions bot added accepted This issue has been reviewed. and removed in review This issue requires a review. labels Mar 25, 2026
Copy link
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/generate-docs-pr.yml:
- Around line 116-126: The EXISTING_PR check using `gh pr view -H
"$BRANCH_NAME"` fails because `gh pr view` doesn't support `-H`; replace that
invocation in the EXISTING_PR assignment with a `gh pr list` call that filters
by head branch and returns the first open PR URL (e.g., use `gh pr list --head
"$BRANCH_NAME" --state open --json url --jq '.[0].url // ""'`) so EXISTING_PR is
correctly set when a PR exists; keep the surrounding logic that writes needs_pr
to GITHUB_OUTPUT unchanged and remove the stderr suppression that hid the
failure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 57bd3e9f-089c-4fb7-969f-1ceb1303d2c6

📥 Commits

Reviewing files that changed from the base of the PR and between 8e06b46 and 23a93dd.

📒 Files selected for processing (1)
  • .github/workflows/generate-docs-pr.yml

@github-actions github-actions bot added in review This issue requires a review. and removed accepted This issue has been reviewed. labels Mar 25, 2026
@knine79 knine79 merged commit bae384b into main Mar 25, 2026
2 of 3 checks passed
@knine79 knine79 deleted the fix/generate-docs-pr-condition branch March 25, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in review This issue requires a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants