Skip to content

[Chore] PR의 title 포맷을 검사하는 action workflow 작성, 깃 pre-push 훅 수정#10

Merged
dioo1461 merged 12 commits intodevfrom
chore/pr-merge-commit-lint
Apr 30, 2025
Merged

[Chore] PR의 title 포맷을 검사하는 action workflow 작성, 깃 pre-push 훅 수정#10
dioo1461 merged 12 commits intodevfrom
chore/pr-merge-commit-lint

Conversation

@dioo1461
Copy link
Collaborator

@dioo1461 dioo1461 commented Apr 30, 2025

✨ 구현 기능 명세

  • PR 머지 시 커밋 메시지 포맷을 검사하는 github action workflow를 작성했습니다. (/.github/workflows/pr-title-lint.yaml)
  • pre-push 시 모바일 및 데스크톱 앱 둘 중 하나만 빌드 성공해도 통과되는 문제가 있었습니다. 이를 해결했습니다.
  • npm run android:build 스크립트가 제대로 실행되지 않던 문제가 있었습니다. 이를 해결했습니다.

✅ PR Point

😭 어려웠던 점

Description by Korbit AI

What change is being made?

Add a GitHub Action workflow to enforce PR title format compliance and update pre-push hook to utilize stricter error handling.

Why are these changes being made?

Ensuring PR titles follow a consistent format improves readability and maintainability across the project. The use of -euo pipefail in pre-push hooks enhances error detection by ensuring that scripts fail on uninitialized variables and that command pipeline errors are reported properly.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Logging Improper Error Stream Usage ▹ view ✅ Fix detected
Readability Non-localized configuration message ▹ view ✅ Fix detected
Documentation Incorrect comment for exit status ▹ view ✅ Fix detected
Performance Inefficient String Pattern Matching ▹ view ✅ Fix detected
Readability Incomplete Commit Types ▹ view
Files scanned
File Path Reviewed
commitlint.config.js
src/scripts/build.sh

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

'header-pattern': [
2,
'always',
/^\[(Feature|Fix|Chore|Docs|Style|Refactor|Test)\] .+(?: \(#\d+\))?$/,
Copy link

Choose a reason for hiding this comment

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

Incomplete Commit Types category Readability

Tell me more
What is the issue?

The commit message pattern does not include common types like 'Perf' (Performance) and 'Breaking' (Breaking Changes), which are standard in conventional commits.

Why this matters

Missing commit types will prevent developers from properly categorizing performance improvements and breaking changes, making it harder to generate accurate changelogs and manage semantic versioning.

Suggested change ∙ Feature Preview

Add additional standard commit types to the pattern:

/^\[(Feature|Fix|Chore|Docs|Style|Refactor|Test|Perf|Breaking)\] .+(?:\s\(#\d+\))?$/
Provide feedback to improve future suggestions

Nice Catch Incorrect Not in Scope Not in coding standard Other

💬 Looking for more details? Reply to this comment to chat with Korbit.

'header-pattern-message': [
2,
'always',
'커밋 메시지는 [Type] 제목 (#이슈번호)? 형태여야 합니다.',

This comment was marked as resolved.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All of our team members are Korean, and there is no possibility of non-Korean team members joining.

Copy link

Choose a reason for hiding this comment

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

네, 팀 구성을 고려했을 때 한글 메시지가 더 적절해 보입니다. 현재 구성을 유지하시면 될 것 같습니다.

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Error Handling Incomplete Shell Safety Options ▹ view 🧠 Incorrect
Files scanned
File Path Reviewed
src/scripts/start-dev.sh
src/scripts/generate-cert.sh
src/scripts/build.sh

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@@ -1,22 +1,35 @@
#!/bin/sh
set -e

This comment was marked as resolved.

Copy link
Collaborator Author

@dioo1461 dioo1461 Apr 30, 2025

Choose a reason for hiding this comment

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

As I know, pipefail is a bash-only construct. Am I right?

Copy link

Choose a reason for hiding this comment

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

Yes, you're correct. set -o pipefail is a bash-specific feature and won't work with /bin/sh. For sh compatibility, we should stick with just set -eu. Alternatively, if pipefail is needed, we could change the shebang to #!/bin/bash.

@dioo1461 dioo1461 changed the title [Chore] PR Merge 시 커밋메시지 Lint 검사하는 action workflow 작성, 깃 pre-push 훅 수정 [Chore] PR의 title 포맷을 검사하는 action workflow 작성, 깃 pre-push 훅 수정 Apr 30, 2025
@dioo1461 dioo1461 merged commit 82f14d4 into dev Apr 30, 2025
3 checks passed
@dioo1461 dioo1461 deleted the chore/pr-merge-commit-lint branch April 30, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant