Skip to content

JIRA 이슈 링크 추가 방식 변경#20

Closed
yoouyeon wants to merge 1 commit intodevelopfrom
chore/MD-10
Closed

JIRA 이슈 링크 추가 방식 변경#20
yoouyeon wants to merge 1 commit intodevelopfrom
chore/MD-10

Conversation

@yoouyeon
Copy link
Contributor

@yoouyeon yoouyeon commented Feb 17, 2026

💻 작업 내용

  • 새로 만들어진 워크스페이스에 맞게 jira key를 변경했습니다.
  • issue 링크를 본문에 추가하는 대신 comment로 추가하도록 수정했습니다.

Summary by CodeRabbit

  • Chores
    • GitHub 워크플로우 자동화 프로세스 개선 및 최적화

참고: 이번 변경사항은 내부 CI/CD 자동화 개선으로, 사용자에게 직접적인 영향이 없습니다.

- 새로 만들어진 워크스페이스에 맞게 jira key 변경
- issue 링크를 본문에 추가하는 대신 comment로 추가하도록 수정
@yoouyeon yoouyeon self-assigned this Feb 17, 2026
@yoouyeon yoouyeon added the 🧹 Chore 설정·잡무 작업 label Feb 17, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

워크스루

GitHub 워크플로우 파일이 업데이트되어 JIRA 이슈 키 패턴을 변경하고, PR 본문 수정 방식을 변경했습니다. 직접 API로 PR 본문을 수정하는 대신 이제 GitHub Action을 사용하여 JIRA 이슈 링크를 포함한 댓글을 게시합니다.

변경사항

코호트 / 파일 요약
GitHub 워크플로우 업데이트
.github/workflows/pr-review-manager.yml
JIRA 이슈 키 정규식을 'MOD-[0-9]+'에서 'MD-[0-9]+'로 변경했습니다. PR 본문 직접 수정을 GitHub Action 기반 댓글 게시 방식으로 전환했으며, 단계 레이블도 "PR 본문에 JIRA 이슈 링크 추가"에서 "댓글에 JIRA 이슈 링크 추가"로 변경되었습니다.

🐰 워크플로우가 새로워졌네요!
정규식도 갱신하고, 댓글로 소식을 전하네요.
API 호출 줄이고 액션으로 우아하게,
PR 리뷰가 더욱 깔끔해졌어요! ✨

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/MD-10

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.

@coderabbitai coderabbitai bot changed the title @coderabbitai 제목 JIRA 이슈 링크 추가 방식 변경 Feb 17, 2026
@yoouyeon yoouyeon marked this pull request as draft February 17, 2026 13:02
@yoouyeon yoouyeon marked this pull request as ready for review February 17, 2026 13:02
@github-actions github-actions bot requested a review from ongheong February 17, 2026 13:02
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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/pr-review-manager.yml (1)

23-25: ⚠️ Potential issue | 🔴 Critical

add-jira-link 잡에 pull-requests: write 권한이 누락되어 있습니다.

thollander/actions-comment-pull-request@v3 액션이 PR에 코멘트를 작성하려면 pull-requests: write 권한이 필요합니다. assign 잡에는 해당 권한이 선언되어 있지만, add-jira-link 잡에는 없어서 코멘트 작성이 실패할 수 있습니다.

🔧 제안하는 수정 방법
  add-jira-link:
    runs-on: ubuntu-latest
+   permissions:
+     pull-requests: write
    if: github.event.action == 'opened'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-review-manager.yml around lines 23 - 25, The
add-jira-link job is missing the required repository permission for writing PR
comments; update the workflow to grant pull-requests: write for the
add-jira-link job (where thollander/actions-comment-pull-request@v3 is used) by
adding a permissions block (pull-requests: write) scoped to that job so the
action can successfully post comments; mirror the same permission pattern you
used in the assign job.
🤖 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/pr-review-manager.yml:
- Line 30: The current workflow inserts `${{ github.head_ref }}` directly into a
shell pipeline which risks shell injection; change to pass the branch name via
an environment variable and use a quoted expansion when running grep.
Specifically, set an env var (e.g., BRANCH_NAME) from `${{ github.head_ref }}`
and then compute JIRA_KEY using the JIRA_KEY assignment (the line that currently
uses `JIRA_KEY=$(echo ${{ github.head_ref }} | grep -oE 'MD-[0-9]+' || echo
"")`) but replace the direct insertion with a quoted reference like
`"$BRANCH_NAME"` so the grep/echo operate on a safe, controlled variable.
- Around line 34-36: Remove the GitHub Actions step named "Install jq" (the step
block that runs "sudo apt-get update && sudo apt-get install -y jq" and uses the
condition "if: steps.extract-jira-key.outputs.jira_key != ''") since jq is no
longer used; delete that entire step from the workflow so the job no longer
installs jq and the workflow runtime is reduced.

---

Outside diff comments:
In @.github/workflows/pr-review-manager.yml:
- Around line 23-25: The add-jira-link job is missing the required repository
permission for writing PR comments; update the workflow to grant pull-requests:
write for the add-jira-link job (where
thollander/actions-comment-pull-request@v3 is used) by adding a permissions
block (pull-requests: write) scoped to that job so the action can successfully
post comments; mirror the same permission pattern you used in the assign job.

id: extract-jira-key
run: |
JIRA_KEY=$(echo ${{ github.head_ref }} | grep -oE 'MOD-[0-9]+' || echo "")
JIRA_KEY=$(echo ${{ github.head_ref }} | grep -oE 'MD-[0-9]+' || echo "")
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

github.head_ref를 직접 셸에 삽입하면 인젝션 위험이 있습니다.

${{ github.head_ref }}는 사용자가 제어할 수 있는 값(브랜치 이름)이며, 따옴표 없이 셸 명령에 직접 삽입하면 특수 문자로 인한 셸 인젝션이 발생할 수 있습니다. 환경 변수를 통해 값을 전달하는 것이 안전합니다.

🔒 제안하는 수정 방법
       - name: Extract JIRA issue key from branch name
         id: extract-jira-key
         run: |
-          JIRA_KEY=$(echo ${{ github.head_ref }} | grep -oE 'MD-[0-9]+' || echo "")
+          JIRA_KEY=$(echo "$HEAD_REF" | grep -oE 'MD-[0-9]+' || echo "")
           echo "jira_key=$JIRA_KEY" >> "$GITHUB_OUTPUT"
+        env:
+          HEAD_REF: ${{ github.head_ref }}
📝 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
JIRA_KEY=$(echo ${{ github.head_ref }} | grep -oE 'MD-[0-9]+' || echo "")
- name: Extract JIRA issue key from branch name
id: extract-jira-key
run: |
JIRA_KEY=$(echo "$HEAD_REF" | grep -oE 'MD-[0-9]+' || echo "")
echo "jira_key=$JIRA_KEY" >> "$GITHUB_OUTPUT"
env:
HEAD_REF: ${{ github.head_ref }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-review-manager.yml at line 30, The current workflow
inserts `${{ github.head_ref }}` directly into a shell pipeline which risks
shell injection; change to pass the branch name via an environment variable and
use a quoted expansion when running grep. Specifically, set an env var (e.g.,
BRANCH_NAME) from `${{ github.head_ref }}` and then compute JIRA_KEY using the
JIRA_KEY assignment (the line that currently uses `JIRA_KEY=$(echo ${{
github.head_ref }} | grep -oE 'MD-[0-9]+' || echo "")`) but replace the direct
insertion with a quoted reference like `"$BRANCH_NAME"` so the grep/echo operate
on a safe, controlled variable.

Comment on lines 34 to 36
- name: Install jq
if: steps.extract-jira-key.outputs.jira_key != '' # JIRA 이슈 키가 없는 경우에는 실행하지 않음
run: sudo apt-get update && sudo apt-get install -y jq
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

jq 설치 단계가 더 이상 필요하지 않습니다.

이전에 REST API PATCH 호출에서 JSON을 파싱하기 위해 jq를 설치했지만, 해당 로직이 thollander/actions-comment-pull-request@v3 액션으로 대체되면서 jq는 더 이상 사용되지 않습니다. 이 단계를 제거하면 워크플로우 실행 시간을 줄일 수 있습니다.

♻️ 제안하는 수정 방법
-      # PR 본문을 JSON 형식으로 파싱하기 위한 jq 설치
-      - name: Install jq
-        if: steps.extract-jira-key.outputs.jira_key != '' # JIRA 이슈 키가 없는 경우에는 실행하지 않음
-        run: sudo apt-get update && sudo apt-get install -y jq
-
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-review-manager.yml around lines 34 - 36, Remove the
GitHub Actions step named "Install jq" (the step block that runs "sudo apt-get
update && sudo apt-get install -y jq" and uses the condition "if:
steps.extract-jira-key.outputs.jira_key != ''") since jq is no longer used;
delete that entire step from the workflow so the job no longer installs jq and
the workflow runtime is reduced.

@yoouyeon yoouyeon removed the request for review from ongheong February 17, 2026 13:03
@yoouyeon
Copy link
Contributor Author

comment 생성 과정을 확인해보고 싶어서,, PR 다시 생성하겠습니다;;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧹 Chore 설정·잡무 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant