forked from tangled.org/core
Monorepo for Tangled

knotserver: fix ingester for new pull lexicon

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 97827f45 ea4910ab

verified
Changed files
+5 -5
appview
config
knotserver
+1 -1
appview/config/config.go
··· 21 21 AppPassword string `env:"APP_PASSWORD"` 22 22 23 23 // uhhhh this is because knot1 is under icy's did 24 - TmpAltAppPassword string `env:"ALT_APP_PASSWORD, required"` 24 + TmpAltAppPassword string `env:"ALT_APP_PASSWORD"` 25 25 } 26 26 27 27 type OAuthConfig struct {
+4 -4
knotserver/ingester.go
··· 98 98 l := log.FromContext(ctx) 99 99 l = l.With("handler", "processPull") 100 100 l = l.With("did", did) 101 - l = l.With("target_repo", record.TargetRepo) 102 - l = l.With("target_branch", record.TargetBranch) 101 + l = l.With("target_repo", record.Target.Repo) 102 + l = l.With("target_branch", record.Target.Branch) 103 103 104 104 if record.Source == nil { 105 105 return fmt.Errorf("ignoring pull record: not a branch-based pull request") ··· 109 109 return fmt.Errorf("ignoring pull record: fork based pull") 110 110 } 111 111 112 - repoAt, err := syntax.ParseATURI(record.TargetRepo) 112 + repoAt, err := syntax.ParseATURI(record.Target.Repo) 113 113 if err != nil { 114 114 return fmt.Errorf("failed to parse ATURI: %w", err) 115 115 } ··· 178 178 Action: "create", 179 179 SourceBranch: record.Source.Branch, 180 180 SourceSha: record.Source.Sha, 181 - TargetBranch: record.TargetBranch, 181 + TargetBranch: record.Target.Branch, 182 182 } 183 183 184 184 compiler := workflow.Compiler{