-
Notifications
You must be signed in to change notification settings - Fork 0
[Chore] PR의 title 포맷을 검사하는 action workflow 작성, 깃 pre-push 훅 수정 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4f44ced
chore: PR merge commit 시 github action에서 포맷 검사를 수행하도록 설정 추가
dioo1461 c7d99c9
fix: 빌드가 fail 했음에도 pre push에서 exit 1 하지 않던 문제 수정
dioo1461 73d6d5d
fix: build 스크립트에서 백그라운드 실행으로 인해, 둘 중 하나가 에러 반환해도 통과되던 문제 수정
dioo1461 2babe9e
chore: 파싱 에러 수정
dioo1461 a34728b
fix: 잘못된 android build 스크립트 수정
dioo1461 c14f1be
fix: 존재하지 않는 `header-pattern-message` config 제거
dioo1461 0b0767f
chore: commit 메시지 대신 PR title 자체를 검증하도록 변경
dioo1461 06557e1
fix: 접근 가능한 버전으로 재지정
dioo1461 27145bf
chore: v1.0.2 에는 존재하지 않는 verbal_description 설정 제거
dioo1461 c8a2bd1
refactor: grep으로 인한 불필요한 오버헤드 제거, sh 내장 패턴 매칭을 이용한 구현으로 변경
dioo1461 637f6ef
feat: sh 스크립트에서, 에러 메시지는 stderr로 보내도록 구현
dioo1461 3ce4a5e
chore: breaking chagne의 경우 !로 표시할 수 있도록 정규식 수정
dioo1461 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| set -euo pipefail | ||
|
|
||
| # 푸시를 실행한 원격 이름과 URL | ||
| remote_name=$1 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: PR Title Lint | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, edited, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| title-lint: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: read | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Lint PR title | ||
| uses: deepakputhraya/action-pr-title@v1.0.2 | ||
| with: | ||
| regex: '^\[(Feature|Fix|Chore|Docs|Style|Refactor|Test)\]!? .+(?: \(#\d+\))?$' | ||
| prefix_case_sensitive: true | ||
| github_token: ${{ github.token }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,35 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| ## OS 확인 | ||
| if [[ "$OSTYPE" == "darwin"* ]]; then | ||
| echo "Detected OS: macOS" | ||
| npm run macos:build & | ||
| npm run ios:build & | ||
| wait | ||
| case "$OSTYPE" in | ||
| darwin*) | ||
| echo "Detected OS: macOS" | ||
| npm run macos:build & pid1=$! | ||
| npm run ios:build & pid2=$! | ||
| ;; | ||
| cygwin*|msys*|win32*) | ||
| echo "Detected OS: Windows" | ||
| npm run windows:build & pid1=$! | ||
| npm run android:build & pid2=$! | ||
| ;; | ||
| *) | ||
| echo "Unknown OS: $OSTYPE" >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| elif [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "win32" ]]; then | ||
| echo "Detected OS: Windows" | ||
| npm run windows:build & | ||
| npm run android:build & | ||
| wait | ||
| # 백그라운드 작업 완료 대기 후 exit code 수집 | ||
| wait "$pid1" | ||
| ec1=$? | ||
| wait "$pid2" | ||
| ec2=$? | ||
|
|
||
| else | ||
| echo "Unknown OS: $OSTYPE" | ||
| # 둘 중 하나라도 실패하면 exit 1 | ||
| if [ "$ec1" -ne 0 ] || [ "$ec2" -ne 0 ]; then | ||
| echo "❌ 빌드 중 에러가 발생하였습니다. (desktop app: $ec1, mobile app: $ec2)" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "모든 빌드가 완료되었습니다." | ||
| echo "✅ 모든 빌드가 성공적으로 완료되었습니다." | ||
| exit 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I know,
pipefailis a bash-only construct. Am I right?There was a problem hiding this comment.
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 pipefailis a bash-specific feature and won't work with /bin/sh. For sh compatibility, we should stick with justset -eu. Alternatively, if pipefail is needed, we could change the shebang to#!/bin/bash.