Skip to content

Commit 4289b1c

Browse files
authored
fix(automation): create updating PRs against files from repo (#1269)
1 parent 8814657 commit 4289b1c

File tree

1 file changed

+4
-1
lines changed
  • automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/updating

1 file changed

+4
-1
lines changed

automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/updating/CreateActionUpdatePRs.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import io.ktor.client.request.get
1818
import io.ktor.client.statement.bodyAsText
1919
import io.ktor.http.HttpStatusCode
2020
import java.nio.file.Path
21+
import kotlin.io.path.Path
2122
import kotlin.io.path.pathString
23+
import kotlin.io.path.readText
2224

2325
suspend fun main() {
2426
val githubToken = getGithubToken()
@@ -35,7 +37,8 @@ suspend fun main() {
3537
actionBindingRequest.actionCoords.fetchCommitHash(githubToken)
3638
?: error("There was a problem fetching commit hash for ${actionBindingRequest.actionCoords}")
3739

38-
val (codeCurrent, path) = actionBindingRequest.generateBindingForCommit(currentCommitHash)
40+
val (_, path) = actionBindingRequest.generateBindingForCommit(currentCommitHash)
41+
val codeCurrent = Path(path).readText()
3942
val (codeNewest, _) = actionBindingRequest.generateBindingForCommit(newestCommitHash)
4043

4144
if (codeCurrent != codeNewest) {

0 commit comments

Comments
 (0)