mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-04 20:27:17 +08:00
fix github
This commit is contained in:
parent
6fc9adeb43
commit
96abdd8f5f
@ -94,13 +94,13 @@ object GitHub {
|
|||||||
/*
|
/*
|
||||||
* 只能获取1M以内/branch为master的sha
|
* 只能获取1M以内/branch为master的sha
|
||||||
* */
|
* */
|
||||||
class TargetTooLargeException() : Exception("Target TOO Large")
|
class TargetTooLargeException : Exception("Target TOO Large")
|
||||||
|
|
||||||
suspend fun getShaSmart(repo: String, filePath: String, project: Project): String? {
|
suspend fun getShaSmart(repo: String, filePath: String, project: Project): String? {
|
||||||
return withContext(Dispatchers.IO) {
|
return withContext(Dispatchers.IO) {
|
||||||
val response = Jsoup
|
val response = Jsoup
|
||||||
.connect(
|
.connect(
|
||||||
"https://api.github.com/repos/mamoe/$repo/contents/$filePath?access_token=" + getGithubToken(
|
"https://api.github.com/repos/project-mirai/$repo/contents/$filePath?access_token=" + getGithubToken(
|
||||||
project
|
project
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -129,7 +129,7 @@ object GitHub {
|
|||||||
val resp = withContext(Dispatchers.IO) {
|
val resp = withContext(Dispatchers.IO) {
|
||||||
Jsoup
|
Jsoup
|
||||||
.connect(
|
.connect(
|
||||||
"https://api.github.com/repos/mamoe/$repo/git/ref/heads/$branch?access_token=" + getGithubToken(
|
"https://api.github.com/repos/project-mirai/$repo/git/ref/heads/$branch?access_token=" + getGithubToken(
|
||||||
project
|
project
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user