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