-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As a reviewer, I want to see the list of my open requested reviews un…
…der the reviewer tab (#21)
- Loading branch information
Showing
55 changed files
with
844 additions
and
150 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
.../plugin/github/codereviews/helpers/fixtures/builders/domain/CodeReviewerFixtureBuilder.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,20 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.helpers.fixtures.builders.domain | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.reviews.CodeReviewerEntity | ||
import com.duxtinto.intellij.plugin.github.codereviews.helpers.fixtures.FixtureBuilder | ||
import com.duxtinto.intellij.plugin.github.codereviews.helpers.random.RandomGenerator | ||
|
||
class CodeReviewerFixtureBuilder: FixtureBuilder<CodeReviewerEntity> { | ||
private var username: String = RandomGenerator.next() | ||
|
||
override fun build(): CodeReviewerEntity { | ||
return RandomGenerator | ||
.next<CodeReviewerEntity>() | ||
.copy(username = username) | ||
} | ||
|
||
fun withUsername(username: String): CodeReviewerFixtureBuilder { | ||
this.username = username | ||
return this | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/com/duxtinto/intellij/plugin/github/codereviews/data/DataContract.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,21 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.data | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.domain.User.UserEntity | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.PullRequestEntity | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.reviews.CodeReviewerEntity | ||
|
||
interface DataContract { | ||
interface User { | ||
interface Fetcher { | ||
fun fetchAuthenticated(): UserEntity? | ||
} | ||
} | ||
|
||
interface CodeReview { | ||
interface Reviewer { | ||
interface Fetcher { | ||
fun fetchAllByPullRequest(pullRequest: PullRequestEntity): List<CodeReviewerEntity> | ||
} | ||
} | ||
} | ||
} |
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
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
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
39 changes: 39 additions & 0 deletions
39
...plugin/github/codereviews/di/impl/dagger/modules/idea/actions/IdeaReviewerActionModule.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,39 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea.actions | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.qualifiers.Reviewee | ||
import com.duxtinto.intellij.plugin.github.codereviews.di.qualifiers.Reviewer | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.presentation.toolwindow.toolbar.RevieweeToolbarFactory | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.presentation.toolwindow.toolbar.reviewee.RefreshPullRequestListAction | ||
import com.duxtinto.intellij.plugin.github.codereviews.presentation.Toolbar | ||
import com.intellij.openapi.actionSystem.ActionManager | ||
import com.intellij.openapi.actionSystem.AnAction | ||
import dagger.Module | ||
import dagger.Provides | ||
|
||
@Module | ||
class IdeaReviewerActionModule { | ||
@Provides | ||
@Reviewer | ||
fun provideRevieweeToolbarActions( | ||
refreshPullRequestsAction: RefreshPullRequestListAction | ||
): List<AnAction> { | ||
return listOf( | ||
refreshPullRequestsAction | ||
) | ||
} | ||
|
||
@Provides | ||
@Reviewer | ||
fun provideToolbarFactory( | ||
actionManager: ActionManager, | ||
@Reviewee actions: @JvmSuppressWildcards List<AnAction> | ||
): Toolbar.Factory { | ||
return RevieweeToolbarFactory(actionManager, actions) | ||
} | ||
|
||
@Provides | ||
@Reviewer | ||
fun provideToolbar(@Reviewee toolbar: Toolbar.Factory): Toolbar { | ||
return toolbar.create() | ||
} | ||
} |
Oops, something went wrong.