-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
59 additions
and
28 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: 13 additions & 7 deletions
20
githost/src/main/java/io/github/tarek360/githost/GitHost.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,19 +1,25 @@ | ||
package io.github.tarek360.githost | ||
|
||
interface GitHost { | ||
import io.github.tarek360.core.logger | ||
|
||
abstract class GitHost { | ||
|
||
init { | ||
logger.d { "GitHost name: ${this.javaClass.typeName}" } | ||
} | ||
|
||
/** | ||
*@return Comment URL | ||
*/ | ||
fun postComment(comment: Comment): String? | ||
abstract fun postComment(comment: Comment): String? | ||
|
||
fun updateComment(comment: Comment, commentId: Int): String? | ||
abstract fun updateComment(comment: Comment, commentId: Int): String? | ||
|
||
fun postStatus(status: Status) | ||
abstract fun postStatus(status: Status) | ||
|
||
fun pushFile(filePath: String, branchName: String, commitMsg: String) | ||
abstract fun pushFile(filePath: String, branchName: String, commitMsg: String) | ||
|
||
fun getPullRequestInfo(): PullRequest? | ||
abstract fun getPullRequestInfo(): PullRequest? | ||
|
||
fun getPullRequestComments(): List<GitHostComment>? | ||
abstract fun getPullRequestComments(): List<GitHostComment>? | ||
} |
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