-
Notifications
You must be signed in to change notification settings - Fork 74
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
[Feat: 298] 2024년도의 컨트리뷰터 필터링 #305
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c0ab281
feat: Commit API, CommitResponse
rhkrwngud445 25e1372
feat: filter to 2024 contributor
rhkrwngud445 a401545
feat: 상수화 작업
rhkrwngud445 08df342
chore: detekt formatting
rhkrwngud445 9ca947f
Revert "chore: detekt formatting"
rhkrwngud445 139f660
Revert "feat: 상수화 작업"
rhkrwngud445 3b6122d
Revert "feat: filter to 2024 contributor"
rhkrwngud445 9620ce2
Revert "feat: Commit API, CommitResponse"
rhkrwngud445 490cff8
feat: Contributors json 추가
rhkrwngud445 f74a697
feat: contributor의 기여연도를 가져오는 데이터 작업
rhkrwngud445 dbeb796
feat: 연도에 따라 필터 기능 작업
rhkrwngud445 a12beda
feat: named을 통해 추상화 작업
rhkrwngud445 e4c85cf
Revert "feat: named을 통해 추상화 작업"
rhkrwngud445 03348eb
fix: hilt 구현체 변경
rhkrwngud445 5777131
chore: detekt 수정
rhkrwngud445 1dde857
chore: detekt 수정
rhkrwngud445 4c23d5f
test: usecase 필터 테스트 추가
rhkrwngud445 05bcf72
feat: SerialName 적용
rhkrwngud445 34cbacb
refactor: 기여자들의 연도에서 마지막 해의 기여자를 가져오도록 수정
rhkrwngud445 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
3 changes: 3 additions & 0 deletions
3
...-api/src/main/java/com/droidknights/app/core/data/repository/api/ContributorRepository.kt
This file contains 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,11 +1,14 @@ | ||
package com.droidknights.app.core.data.repository.api | ||
|
||
import com.droidknights.app.core.model.Contributor | ||
import com.droidknights.app.core.model.ContributorWithYears | ||
|
||
interface ContributorRepository { | ||
|
||
suspend fun getContributors( | ||
owner: String, | ||
name: String, | ||
): List<Contributor> | ||
|
||
suspend fun getContributorsWithYears(): List<ContributorWithYears> | ||
} |
This file contains 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,186 @@ | ||
[ | ||
{ | ||
"id":28249981, | ||
"name":"laco-dev", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":32327475, | ||
"name":"wisemuji", | ||
"years":[ | ||
2023, | ||
2024 | ||
] | ||
}, | ||
{ | ||
"id":54518925, | ||
"name":"l2hyunwoo", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":18674395, | ||
"name":"JeonK1", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":93872496, | ||
"name":"KwakEuiJin", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":57751515, | ||
"name":"yuuuzzzin", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":53253298, | ||
"name":"toastmeister1", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":72238126, | ||
"name":"yjyoon-dev", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":84944098, | ||
"name":"Cjsghkd", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":22849063, | ||
"name":"KimReady", | ||
"years":[ | ||
2024 | ||
] | ||
}, | ||
{ | ||
"id":2144231, | ||
"name":"taehwandev", | ||
"years":[ | ||
2023, | ||
2024 | ||
] | ||
}, | ||
{ | ||
"id":37904970, | ||
"name":"sodp5", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":51078673, | ||
"name":"JaesungLeee", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":61337202, | ||
"name":"koreatlwls", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":44341119, | ||
"name":"malibinYun", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":1534926, | ||
"name":"Pluu", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":81838716, | ||
"name":"ParkJong-Hun", | ||
"years":[ | ||
2024 | ||
] | ||
}, | ||
{ | ||
"id":92064758, | ||
"name":"theo-taehwan", | ||
"years":[ | ||
2024 | ||
] | ||
}, | ||
{ | ||
"id":52663419, | ||
"name":"jeongth9446", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":4679634, | ||
"name":"kisa002", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":40175383, | ||
"name":"gowoon-choi", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":7759511, | ||
"name":"workspace", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":51016231, | ||
"name":"easyhooon", | ||
"years":[ | ||
2024 | ||
] | ||
}, | ||
{ | ||
"id":33443660, | ||
"name":"KwonDae", | ||
"years":[ | ||
2023 | ||
] | ||
}, | ||
{ | ||
"id":35232655, | ||
"name":"HamBP", | ||
"years":[ | ||
2024 | ||
] | ||
}, | ||
{ | ||
"id":76798309, | ||
"name":"onseok", | ||
"years":[ | ||
2023 | ||
] | ||
} | ||
] | ||
This file contains 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 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
10 changes: 10 additions & 0 deletions
10
core/data/src/main/java/com/droidknights/app/core/data/api/model/ContributionYearResponse.kt
This file contains 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,10 @@ | ||
package com.droidknights.app.core.data.api.model | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ContributionYearResponse( | ||
@SerialName("id") val id: Long, | ||
@SerialName("years") val years: List<Int>, | ||
) |
This file contains 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 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 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
11 changes: 11 additions & 0 deletions
11
core/data/src/main/java/com/droidknights/app/core/data/mapper/ContributorWithYearsMapper.kt
This file contains 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,11 @@ | ||
package com.droidknights.app.core.data.mapper | ||
|
||
import com.droidknights.app.core.data.api.model.ContributionYearResponse | ||
import com.droidknights.app.core.model.ContributorWithYears | ||
|
||
internal fun ContributionYearResponse.toData(): ContributorWithYears { | ||
return ContributorWithYears( | ||
id = id, | ||
years = years, | ||
) | ||
} |
10 changes: 8 additions & 2 deletions
10
...a/src/main/java/com/droidknights/app/core/data/repository/DefaultContributorRepository.kt
This file contains 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,20 +1,26 @@ | ||
package com.droidknights.app.core.data.repository | ||
|
||
import com.droidknights.app.core.data.api.GithubApi | ||
import com.droidknights.app.core.data.api.GithubRawApi | ||
import com.droidknights.app.core.data.mapper.toData | ||
import com.droidknights.app.core.data.repository.api.ContributorRepository | ||
import com.droidknights.app.core.model.Contributor | ||
import com.droidknights.app.core.model.ContributorWithYears | ||
import javax.inject.Inject | ||
|
||
internal class DefaultContributorRepository @Inject constructor( | ||
private val githubApi: GithubApi, | ||
private val githubRawApi: GithubRawApi | ||
) : ContributorRepository { | ||
|
||
override suspend fun getContributors( | ||
owner: String, | ||
name: String, | ||
): List<Contributor> { | ||
return githubApi.getContributors(owner, name) | ||
.map { it.toData() } | ||
return githubApi.getContributors(owner, name).map { it.toData() } | ||
} | ||
|
||
override suspend fun getContributorsWithYears(): List<ContributorWithYears> { | ||
return githubRawApi.getContributorWithYears().map { it.toData() } | ||
} | ||
} |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
👍 결국 직접 다 뽑으셨군요. 감사합니다.