Skip to content

Commit 67a982c

Browse files
authored
Merge pull request #107 from YAPP-Github/develop
release 1.1.8
2 parents 0a68ddd + e3e54f7 commit 67a982c

File tree

578 files changed

+22424
-540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

578 files changed

+22424
-540
lines changed

.editorconfig

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ ktlint_code_style = android_studio
1515
# 한줄 최대 길이를 넘지 않는 선에서 함수 시그니처 작성 필수 여부
1616
ktlint_standard_function-signature = disabled
1717

18+
# 한 줄의 최대 길이 제한 여부
19+
ktlint_standard_max-line-length = disabled
20+
1821
# import 순서 필수 여부
1922
ktlint_standard_import-ordering = disabled
2023

@@ -30,11 +33,12 @@ ktlint_standard_no-blank-line-before-rbrace = disabled
3033
# 들여쓰기와 KDoc(코틀린 문서 주석)을 제외하고, 연속된 여러 개의 공백 제한 여부
3134
ktlint_no-multi-spaces = disabled
3235

36+
## Intellij 속성 사용 사유 : https://slack-chats.kotlinlang.org/t/22321401/i-am-trying-to-reconfigure-out-ktlint-settings-for-a-project
3337
# 호출부 Trailing comma 사용 필수 여부
34-
ktlint_standard_trailing-comma-on-call-site = disabled
38+
ij_kotlin_allow_trailing_comma_on_call_site = true
3539

3640
# 정의부 Trailing comma 사용 필수 여부
37-
ktlint_standard_trailing-comma-on-declaration-site = enabled
41+
ij_kotlin_allow_trailing_comma = true
3842

3943
# = 이후의 표현식이 한 줄에 맞지 않을 때, 줄바꿈 사용 필수 여부
4044
ktlint_standard_multiline_expression_wrapping = disabled
@@ -46,4 +50,7 @@ ktlint_standard_parameter-list-wrapping = disabled
4650
ktlint_standard_no-wildcard-imports = disabled
4751

4852
# 파일의 마지막 줄에 개행문자 삽입 필수 여부
49-
ktlint_standard_final-newline = disabled
53+
ktlint_standard_final-newline = disabled
54+
55+
# Property 이름 컨벤션 제한 여부, 첫글자 소문자, camelCase
56+
ktlint_standard_property-naming = disabled
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: '이슈 생성'
2+
description: 'Repo에 이슈를 생성하며, 생성된 이슈는 Jira와 연동됩니다.'
3+
title: '이슈 이름을 작성해주세요'
4+
body:
5+
- type: input
6+
id: parentKey
7+
attributes:
8+
label: '🎟️ 상위 작업 (Ticket Number)'
9+
description: '상위 작업의 Ticket Number를 기입해주세요'
10+
placeholder: 'BP-00'
11+
validations:
12+
required: true
13+
14+
- type: input
15+
id: description
16+
attributes:
17+
label: '📝 상세 내용(Description)'
18+
description: '이슈에 대해서 간략히 설명해주세요'
19+
validations:
20+
required: true
21+
22+
- type: dropdown
23+
id: issueLabel
24+
attributes:
25+
label: '🏷️ label'
26+
description: '이슈의 유형을 선택해주세요'
27+
multiple: true
28+
options:
29+
- feat
30+
- fix
31+
- bug
32+
- docs
33+
- refactor
34+
- chore
35+
- HOTFIX
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: tasks
41+
attributes:
42+
label: '✅ 체크리스트(Tasks)'
43+
description: '해당 이슈에 대해 필요한 작업목록을 작성해주세요'
44+
value: |
45+
- [ ] Task1
46+
- [ ] Task2
47+
- [ ] Task3
48+
validations:
49+
required: true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Close Jira issue
2+
on:
3+
issues:
4+
types:
5+
- closed
6+
7+
jobs:
8+
close-issue:
9+
name: Close Jira issue
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Login to Jira
14+
uses: atlassian/gajira-login@v3
15+
env:
16+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
17+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
18+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
19+
20+
- name: Extract Jira issue key from GitHub issue title
21+
id: extract-key
22+
run: |
23+
ISSUE_TITLE="${{ github.event.issue.title }}"
24+
JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oE '[A-Z]+-[0-9]+')
25+
echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV
26+
27+
- name: Close Jira issue
28+
if: env.JIRA_KEY != ''
29+
uses: atlassian/gajira-transition@v3
30+
with:
31+
issue: ${{ env.JIRA_KEY }}
32+
transition: 완료
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Create Jira issue
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
jobs:
7+
create-issue:
8+
name: Create Jira issue
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Login
12+
uses: atlassian/gajira-login@v3
13+
env:
14+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
15+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
16+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
17+
18+
- name: Checkout dev code
19+
uses: actions/checkout@v4
20+
with:
21+
ref: dev
22+
23+
- name: Issue Parser
24+
uses: stefanbuck/github-issue-praser@v3
25+
id: issue-parser
26+
with:
27+
template-path: .github/ISSUE_TEMPLATE/issue-form.yml
28+
29+
- name: Convert markdown to Jira Syntax
30+
uses: peter-evans/jira2md@v1
31+
id: md2jira
32+
with:
33+
input-text: |
34+
### Github Issue Link
35+
- ${{ github.event.issue.html_url }}
36+
37+
${{ github.event.issue.body }}
38+
mode: md2jira
39+
40+
- name: Create Issue
41+
id: create
42+
uses: atlassian/gajira-create@v3
43+
with:
44+
project: BP
45+
issuetype: 하위 작업
46+
summary: '${{ github.event.issue.title }}'
47+
description: '${{ steps.md2jira.outputs.output-text }}'
48+
fields: |
49+
{
50+
"parent": {
51+
"key": "${{ steps.issue-parser.outputs.issueparser_parentKey }}"
52+
}
53+
}
54+
55+
- name: Log created issue
56+
run: echo "Jira Issue ${{ steps.issue-parser.outputs.issueparser_parentKey }}/${{ steps.create.outputs.issue }} was created"
57+
58+
- name: Create branch with Ticket number
59+
run: |
60+
LABELS="${{ steps.issue-parser.outputs.issueparser_issueLabel }}"
61+
BRANCH_PREFIX="${LABELS%%,*}"
62+
ISSUE_NUMBER="${{ steps.create.outputs.issue }}"
63+
BRANCH_NAME="${BRANCH_PREFIX}/${ISSUE_NUMBER}"
64+
git checkout -b "${BRANCH_NAME}"
65+
git push origin "${BRANCH_NAME}"
66+
67+
- name: Update issue title
68+
uses: actions-cool/issues-helper@v3
69+
with:
70+
actions: "update-issue"
71+
token: ${{ secrets.GITHUB_TOKEN }}
72+
title: "[${{ steps.create.outputs.issue }}] ${{ github.event.issue.title }}"
73+
74+
- name: Add comment with Jira issue link
75+
uses: actions-cool/issues-helper@v3
76+
with:
77+
actions: 'create-comment'
78+
token: ${{ secrets.GITHUB_TOKEN }}
79+
issue-number: ${{ github.event.issue.number }}
80+
body: 'Jira Issue Created: [${{ steps.create.outputs.issue }}](${{ secrets.JIRA_BASE_URL }}/browse/${{ steps.create.outputs.issue }})'
81+
Lines changed: 58 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,63 @@
11
name: Pull Request CI
22

33
on:
4-
pull_request:
5-
branches: [ "main", "develop" ]
4+
pull_request:
5+
branches: [ "main", "develop" ]
6+
7+
concurrency:
8+
group: ci-${{ github.ref }}
9+
cancel-in-progress: true
610

711
jobs:
8-
build:
9-
name: Check Code Quality and Build
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v4
15-
16-
- name: Cache Gradle packages
17-
uses: actions/cache@v4
18-
with:
19-
path: |
20-
~/.gradle/caches
21-
~/.gradle/wrapper
22-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
23-
restore-keys: |
24-
${{ runner.os }}-gradle-
25-
26-
- name: set up JDK 17
27-
uses: actions/setup-java@v4
28-
with:
29-
java-version: '17'
30-
distribution: 'temurin'
31-
cache: gradle
32-
33-
- name: Grant execute permission for gradlew
34-
run: chmod +x gradlew
35-
36-
- name: Ktlint Check
37-
run: ./gradlew ktlintCheck
38-
39-
- name: Detekt Check
40-
run: ./gradlew detekt
41-
42-
- name: Build Check
43-
run: ./gradlew build
12+
build:
13+
if: >
14+
!contains(github.event.head_commit.message, 'ci 자동 ktlintFormat 적용')
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Cache Gradle packages
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
~/.gradle/caches
27+
~/.gradle/wrapper
28+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
29+
restore-keys: |
30+
${{ runner.os }}-gradle-
31+
32+
- name: set up JDK 17
33+
uses: actions/setup-java@v4
34+
with:
35+
java-version: '17'
36+
distribution: 'temurin'
37+
cache: gradle
38+
39+
- name: Restore google-services.json
40+
env:
41+
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
42+
run: echo $GOOGLE_SERVICES_JSON | base64 --decode > ./app/google-services.json
43+
44+
- name: Add Local Properties
45+
env:
46+
KAKAO_REST_API_KEY_RELEASE: ${{ secrets.KAKAO_REST_API_KEY_RELEASE }}
47+
KAKAO_REST_API_KEY_DEBUG: ${{ secrets.KAKAO_REST_API_KEY_DEBUG }}
48+
KAKAO_JS_KEY_RELEASE: ${{ secrets.KAKAO_JS_KEY_RELEASE }}
49+
KAKAO_JS_KEY_DEBUG: ${{ secrets.KAKAO_JS_KEY_DEBUG }}
50+
run: |
51+
echo KAKAO_REST_API_KEY_RELEASE=KAKAO_REST_API_KEY_RELEASE > ./local.properties
52+
echo KAKAO_REST_API_KEY_DEBUG=KAKAO_REST_API_KEY_DEBUG >> ./local.properties
53+
echo KAKAO_JS_KEY_RELEASE=KAKAO_JS_KEY_RELEASE >> ./local.properties
54+
echo KAKAO_JS_KEY_DEBUG=KAKAO_JS_KEY_DEBUG >> ./local.properties
55+
56+
- name: Grant execute permission for gradlew
57+
run: chmod +x gradlew
58+
59+
- name: Ktlint Check
60+
run: ./gradlew ktlintCheck
61+
62+
- name: Detekt Check
63+
run: ./gradlew detekt

.github/workflows/push-ci.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Push CI
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
if: >
9+
!contains(github.event.head_commit.message, 'ci 자동 ktlintFormat 적용')
10+
11+
permissions:
12+
contents: write
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Cache Gradle packages
21+
uses: actions/cache@v4
22+
with:
23+
path: |
24+
~/.gradle/caches
25+
~/.gradle/wrapper
26+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
27+
restore-keys: |
28+
${{ runner.os }}-gradle-
29+
30+
- name: set up JDK 17
31+
uses: actions/setup-java@v4
32+
with:
33+
java-version: '17'
34+
distribution: 'temurin'
35+
cache: gradle
36+
37+
- name: Restore google-services.json
38+
env:
39+
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
40+
run: echo $GOOGLE_SERVICES_JSON | base64 --decode > ./app/google-services.json
41+
42+
- name: Add Local Properties
43+
env:
44+
KAKAO_REST_API_KEY_RELEASE: ${{ secrets.KAKAO_REST_API_KEY_RELEASE }}
45+
KAKAO_REST_API_KEY_DEBUG: ${{ secrets.KAKAO_REST_API_KEY_DEBUG }}
46+
KAKAO_JS_KEY_RELEASE: ${{ secrets.KAKAO_JS_KEY_RELEASE }}
47+
KAKAO_JS_KEY_DEBUG: ${{ secrets.KAKAO_JS_KEY_DEBUG }}
48+
run: |
49+
echo KAKAO_REST_API_KEY_RELEASE=KAKAO_REST_API_KEY_RELEASE > ./local.properties
50+
echo KAKAO_REST_API_KEY_DEBUG=KAKAO_REST_API_KEY_DEBUG >> ./local.properties
51+
echo KAKAO_JS_KEY_RELEASE=KAKAO_JS_KEY_RELEASE >> ./local.properties
52+
echo KAKAO_JS_KEY_DEBUG=KAKAO_JS_KEY_DEBUG >> ./local.properties
53+
54+
- name: Grant execute permission for gradlew
55+
run: chmod +x gradlew
56+
57+
- name: Build Check
58+
run: ./gradlew build
59+
60+
- name: Commit & Push ktlintFormat changes
61+
run: |
62+
mkdir -p ~/.ssh
63+
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
64+
chmod 600 ~/.ssh/id_rsa
65+
ssh-keyscan github.com >> ~/.ssh/known_hosts
66+
67+
git config user.name "github-actions[bot]"
68+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
69+
70+
ISSUE_REF=$(git log -1 --pretty=%B | grep -oE '#[0-9]+' | head -n 1)
71+
72+
git add .
73+
74+
if ! git diff --cached --quiet; then
75+
COMMIT_MSG="style: ci 자동 ktlintFormat 적용"
76+
if [ -n "$ISSUE_REF" ]; then
77+
COMMIT_MSG="$COMMIT_MSG ($ISSUE_REF)"
78+
fi
79+
git commit -m "$COMMIT_MSG"
80+
git remote set-url origin git@github.com:${{ github.repository }}.git
81+
git push origin HEAD:${GITHUB_REF_NAME}
82+
else
83+
echo "✅ 변경사항이 없어 커밋하지 않음."
84+
fi

0 commit comments

Comments
 (0)