Skip to content

Commit

Permalink
feat: add environment variable to override fork owner (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
vedantmgoyal9 authored Feb 13, 2023
1 parent 19ed2a3 commit 50efe8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/data/GitHubImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class GitHubImpl : KoinComponent {

suspend fun getWingetPkgsFork(terminal: Terminal): GHRepository? = with(terminal) {
return try {
github.await().getRepository("${github.await().myself.login}/$wingetpkgs").also {
github.await().getRepository("${System.getenv(customForkOwnerEnv) ?: github.await().myself.login}/$wingetpkgs").also {
success("Found forked $wingetpkgs repository: ${it.fullName}")
}
} catch (_: IOException) {
Expand Down Expand Up @@ -211,6 +211,7 @@ class GitHubImpl : KoinComponent {
companion object {
const val Microsoft = "Microsoft"
const val wingetpkgs = "winget-pkgs"
private const val customForkOwnerEnv = "KMC_FRK_OWNER"
private const val uniqueBranchIdentifierLength = 14
}
}

0 comments on commit 50efe8d

Please sign in to comment.