-
Notifications
You must be signed in to change notification settings - Fork 1
Main 코드 업데이트 #29
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
Main 코드 업데이트 #29
Changes from all commits
af85011
d6c087a
2ac4233
baa6ea5
829c7fc
ac3deda
9525a15
8dfb8a7
3a57b5c
7f2a566
bb095b2
cc49345
3ba895e
bf4ea77
66027d4
93ca3cb
1aee327
ac9c71e
989065d
ddff298
4d0f07b
2e2a64b
af51b99
f791c1b
519d290
586171c
0c069c1
6dda384
81dbb20
d425836
b2d9856
cf46158
868eb24
d53f910
08b589b
2efb8d0
2d76062
9e73aac
de0a64d
8c64956
dbb4018
72c28ce
324dfda
1d90c18
69c83b1
d54ad66
2d38e1f
f3c6399
9430d1f
1b4b94b
bed77cd
7b6058e
3ece7b9
81b543f
39c4736
bf47b1d
de5068c
c6dce56
cb5d147
104cbe2
8740130
5dbbd7e
109c8ca
a346a7a
27f70dc
53efebb
95ff3c5
d9036e2
85b24b5
3f7780c
16fb117
7620a62
aa8adaa
73ff081
c8ebdad
fa60df2
416c131
6b5a7b4
aaece3f
a3a769e
35c93f4
0d8e424
c109cdd
9ac62e5
c2424a1
fdf67c8
954ff06
39a4aec
c8df391
fc2ff9b
bf59b48
25afeea
e9e4d95
b0d7ec2
542f921
c9b980b
0e90005
5151246
b7dd107
3b7cbbd
ca15451
b2f9ea7
522d340
4f32609
8cfecd3
c050c31
b8d9911
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # 각 레포지토리의 .github/workflows/assign-issue-creator.yml | ||
|
|
||
| name: Assign issue creator | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| jobs: | ||
| call-reusable-workflow: | ||
| # @main 은 .github 레포지토리의 main 브랜치를 사용한다는 의미입니다. 버전을 위해 @v1과 같이 태그를 사용하는 것을 권장합니다. | ||
| uses: 33-Auto/.github/.github/workflows/reusable-assign-issue-creator.yml@main | ||
| # 이 워크플로우는 secrets를 전달할 필요가 없지만, 필요 시 아래와 같이 전달합니다. | ||
| # secrets: inherit | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||||||||||||||||||||||||||||
| # 각 레포지토리의 .github/workflows/close-issues-on-dev-merge.yml | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| name: Auto Close Issues on dev merge | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||
| types: [closed] | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| call-reusable-workflow: | ||||||||||||||||||||||||||||||||
| if: > | ||||||||||||||||||||||||||||||||
| github.event.pull_request.merged == true && | ||||||||||||||||||||||||||||||||
| github.event.pull_request.base.ref == 'dev' | ||||||||||||||||||||||||||||||||
| uses: 33-Auto/.github/.github/workflows/reusable-close-linked-issues.yml@main | ||||||||||||||||||||||||||||||||
| # with를 통해 재사용 워크플로우의 inputs에 값을 전달합니다. | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| pr-body: ${{ github.event.pull_request.body }} | ||||||||||||||||||||||||||||||||
| issue-number: ${{ github.event.pull_request.number }} | ||||||||||||||||||||||||||||||||
| secrets: inherit # 재사용 워크플로우가 GITHUB_TOKEN을 사용할 수 있도록 전달 | ||||||||||||||||||||||||||||||||
|
Comment on lines
+11
to
+19
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 3 months ago To fix the problem, add an explicit permissions:
contents: read
issues: writeFor maximum safety, don't add additional permissions without clear evidence they are needed. Place this block after the
Suggested changeset
1
.github/workflows/close-issues-on-dev-merge.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,13 +1,15 @@ | |||||||||||||||||||||||
| name: PR Reminder | |||||||||||||||||||||||
| name: PR Reminder | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| on: | |||||||||||||||||||||||
| schedule: | |||||||||||||||||||||||
| - cron: "0 0,5,8 * * *" # 아침 9시, 오후 2시, 오후 5시에 실행 (UTC 기준으로 설정해서 한국 시간에 맞춤) | |||||||||||||||||||||||
| workflow_dispatch: | |||||||||||||||||||||||
| on: | |||||||||||||||||||||||
| schedule: | |||||||||||||||||||||||
| - cron: "47 23,4,7,8,10 * * *" # 아침 8시 47분, 오후 2시 47분, 오후 4시 47분, 오후 5시 47분, 오후 7시 47분 에 실행 (UTC 기준으로 설정해서 한국 시간에 맞춤) | |||||||||||||||||||||||
| workflow_dispatch: | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||
| call-reusable-reminder: | |||||||||||||||||||||||
| uses: 33-Auto/.github/.github/workflows/reusable-pr-reminder.yml@main | |||||||||||||||||||||||
| secrets: | |||||||||||||||||||||||
| # 해당 시크릿은 조직의 시크릿에 저장되어 있음 | |||||||||||||||||||||||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||
| call-reusable-reminder: | |||||||||||||||||||||||
| uses: 33-Auto/.github/.github/workflows/reusable-pr-reminder.yml@main | |||||||||||||||||||||||
| secrets: | |||||||||||||||||||||||
| # 해당 시크릿은 조직의 시크릿에 저장되어 있음 | |||||||||||||||||||||||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| SLACK_USER_MAP: ${{ vars.SLACK_USER_MAP }} | |||||||||||||||||||||||
|
Comment on lines
+10
to
+15
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 3 months ago To fix the problem, we should add a
Suggested changeset
1
.github/workflows/pr-reminder.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,17 @@ | |||||||||||||||||||||||||||||||||||
| # 각 레포지토리의 .github/workflows/request-pr-review.yml | |||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||
| name: PR Assignee & Team Review Request | |||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||
| on: | |||||||||||||||||||||||||||||||||||
| pull_request: | |||||||||||||||||||||||||||||||||||
| types: [opened, reopened, ready_for_review] | |||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||||||||
| call-reusable-workflow: | |||||||||||||||||||||||||||||||||||
| uses: 33-Auto/.github/.github/workflows/reusable-pr-assign-and-review.yml@main | |||||||||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||||||||
| team-slug-for-review: "review_avengers" # 여기에 리뷰를 요청할 팀의 slug를 입력합니다. | |||||||||||||||||||||||||||||||||||
| pr-author: ${{ github.event.pull_request.user.login }} | |||||||||||||||||||||||||||||||||||
| pr-number: ${{ github.event.pull_request.number }} | |||||||||||||||||||||||||||||||||||
| secrets: | |||||||||||||||||||||||||||||||||||
| ORGANIZATION_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} # 재사용 워크플로우가 ORGANIZATION_TOKEN을 사용할 수 있도록 전달 | |||||||||||||||||||||||||||||||||||
|
Comment on lines
+11
to
+17
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 3 months ago To fix this problem, you should add a
Suggested changeset
1
.github/workflows/request-pr-review.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,38 @@ | ||
| package com.sampoom.android | ||
|
|
||
| import android.os.Build | ||
| import android.os.Bundle | ||
| import androidx.activity.ComponentActivity | ||
| import androidx.activity.SystemBarStyle | ||
| import androidx.activity.compose.setContent | ||
| import androidx.activity.enableEdgeToEdge | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.material3.Scaffold | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import com.sampoom.android.ui.theme.SampoomManagementTheme | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.graphics.toArgb | ||
| import com.sampoom.android.app.navigation.AppNavHost | ||
| import com.sampoom.android.core.ui.theme.SampoomManagementTheme | ||
| import dagger.hilt.android.AndroidEntryPoint | ||
|
|
||
| @AndroidEntryPoint | ||
| class MainActivity : ComponentActivity() { | ||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| enableEdgeToEdge() | ||
| enableEdgeToEdge( | ||
| statusBarStyle = SystemBarStyle.auto( | ||
| lightScrim = Color.Transparent.toArgb(), | ||
| darkScrim = Color.Transparent.toArgb() | ||
| ), | ||
| navigationBarStyle = SystemBarStyle.auto( | ||
| lightScrim = Color.Transparent.toArgb(), | ||
| darkScrim = Color.Transparent.toArgb() | ||
| ) | ||
| ) | ||
| if (Build.VERSION.SDK_INT >= 29) { | ||
| window.isNavigationBarContrastEnforced = false | ||
| } | ||
| setContent { | ||
| SampoomManagementTheme { | ||
| Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> | ||
| Greeting( | ||
| name = "Android", | ||
| modifier = Modifier.padding(innerPadding) | ||
| ) | ||
| } | ||
| AppNavHost() | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| fun Greeting(name: String, modifier: Modifier = Modifier) { | ||
| Text( | ||
| text = "Hello $name!", | ||
| modifier = modifier | ||
| ) | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| fun GreetingPreview() { | ||
| SampoomManagementTheme { | ||
| Greeting("Android") | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.sampoom.android | ||
|
|
||
| import androidx.lifecycle.ViewModel | ||
| import androidx.lifecycle.viewModelScope | ||
| import com.sampoom.android.core.util.GlobalMessageHandler | ||
| import com.sampoom.android.feature.auth.domain.model.User | ||
| import com.sampoom.android.feature.auth.domain.usecase.GetStoredUserUseCase | ||
| import dagger.hilt.android.lifecycle.HiltViewModel | ||
| import kotlinx.coroutines.flow.MutableStateFlow | ||
| import kotlinx.coroutines.flow.StateFlow | ||
| import kotlinx.coroutines.launch | ||
| import javax.inject.Inject | ||
|
|
||
| @HiltViewModel | ||
| class MainActivityViewModel @Inject constructor( | ||
| val messageHandler: GlobalMessageHandler, | ||
| private val getStoredUserUseCase: GetStoredUserUseCase | ||
| ) : ViewModel() { | ||
| private val _user = MutableStateFlow<User?>(null) | ||
| val user: StateFlow<User?> = _user | ||
|
|
||
| init { | ||
| viewModelScope.launch { | ||
| _user.value = getStoredUserUseCase() | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.sampoom.android.app | ||
|
|
||
| import android.app.Application | ||
| import dagger.hilt.android.HiltAndroidApp | ||
|
|
||
| @HiltAndroidApp | ||
| class Application : Application() |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
To fix the problem, add an explicit
permissionskey to the job or workflow. Since this workflow delegates all responsibility to a reusable workflow, and there are no steps defined here that would require write access, it is safest to set the permissions toread-allfor this job. This can be achieved by adding eitherpermissions: read-allat the job level (call-reusable-workflow:) or at the root of the workflow. Since there is only one job, setting it at the job level is clear and follows best practice.Add the following block:
under the
call-reusable-workflow:job (that is, on line 12 or 13, properly indented).No imports, method definitions, or other structural changes are required—just a single YAML key.