forked from tangled.org/core
this repo has no description

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
···
AppPassword string `env:"APP_PASSWORD"`
// uhhhh this is because knot1 is under icy's did
-
TmpAltAppPassword string `env:"ALT_APP_PASSWORD, required"`
}
type OAuthConfig struct {
···
AppPassword string `env:"APP_PASSWORD"`
// uhhhh this is because knot1 is under icy's did
+
TmpAltAppPassword string `env:"ALT_APP_PASSWORD"`
}
type OAuthConfig struct {
+4 -4
knotserver/ingester.go
···
l := log.FromContext(ctx)
l = l.With("handler", "processPull")
l = l.With("did", did)
-
l = l.With("target_repo", record.TargetRepo)
-
l = l.With("target_branch", record.TargetBranch)
if record.Source == nil {
return fmt.Errorf("ignoring pull record: not a branch-based pull request")
···
return fmt.Errorf("ignoring pull record: fork based pull")
}
-
repoAt, err := syntax.ParseATURI(record.TargetRepo)
if err != nil {
return fmt.Errorf("failed to parse ATURI: %w", err)
}
···
Action: "create",
SourceBranch: record.Source.Branch,
SourceSha: record.Source.Sha,
-
TargetBranch: record.TargetBranch,
}
compiler := workflow.Compiler{
···
l := log.FromContext(ctx)
l = l.With("handler", "processPull")
l = l.With("did", did)
+
l = l.With("target_repo", record.Target.Repo)
+
l = l.With("target_branch", record.Target.Branch)
if record.Source == nil {
return fmt.Errorf("ignoring pull record: not a branch-based pull request")
···
return fmt.Errorf("ignoring pull record: fork based pull")
}
+
repoAt, err := syntax.ParseATURI(record.Target.Repo)
if err != nil {
return fmt.Errorf("failed to parse ATURI: %w", err)
}
···
Action: "create",
SourceBranch: record.Source.Branch,
SourceSha: record.Source.Sha,
+
TargetBranch: record.Target.Branch,
}
compiler := workflow.Compiler{