Monorepo for Tangled tangled.org

appview: update repo, pulls, issues, and pages handlers for repo DID #1141

deleted opened by oyster.cafe targeting master from oyster.cafe/tangled-core: master
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:3fwecdnvtcscjnrx2p4n7alz/sh.tangled.repo.pull/3mgprvt2eqy22
+5 -5
Interdiff #1 #2
appview/issues/issues.go

This file has not been changed.

appview/pages/funcmap.go

This file has not been changed.

appview/pages/repoinfo/repoinfo.go

This file has not been changed.

appview/pages/templates/repo/fork.html

This file has not been changed.

appview/pages/templates/repo/new.html

This file has not been changed.

appview/pulls/pulls.go

This file has not been changed.

appview/repo/archive.go

This patch was likely rebased, as context lines do not match.

appview/repo/artifact.go

This file has not been changed.

appview/repo/blob.go

This file has not been changed.

appview/repo/branches.go

This file has not been changed.

appview/repo/compare.go

This file has not been changed.

appview/repo/index.go

This file has not been changed.

appview/repo/log.go

This file has not been changed.

appview/repo/repo.go

This patch was likely rebased, as context lines do not match.

+5 -5
appview/repo/settings.go
··· 188 188 Host: host, 189 189 } 190 190 191 - xrpcBytes, err := tangled.RepoBranches(r.Context(), xrpcc, "", 0, f.RepoIdentifier()) 191 + repo := fmt.Sprintf("%s/%s", f.Did, f.Name) 192 + xrpcBytes, err := tangled.RepoBranches(r.Context(), xrpcc, "", 0, repo) 192 193 var result types.RepoBranchesResponse 193 194 if xrpcerr := xrpcclient.HandleXrpcErr(err); xrpcerr != nil { 194 195 l.Error("failed to call XRPC repo.branches", "err", xrpcerr) ··· 259 260 user := rp.oauth.GetMultiAccountUser(r) 260 261 261 262 collaborators, err := func(repo *models.Repo) ([]pages.Collaborator, error) { 262 - repoCollaborators, err := rp.enforcer.E.GetImplicitUsersForResourceByDomain(repo.RepoIdentifier(), repo.Knot) 263 + repoCollaborators, err := rp.enforcer.E.GetImplicitUsersForResourceByDomain(repo.DidSlashRepo(), repo.Knot) 263 264 if err != nil { 264 265 return nil, err 265 266 } ··· 394 395 Host: host, 395 396 } 396 397 397 - repo := fmt.Sprintf("%s/%s", f.Did, f.Name) 398 - xrpcBytes, err := tangled.RepoBranches(r.Context(), xrpcc, "", 0, repo) 398 + xrpcBytes, err := tangled.RepoBranches(r.Context(), xrpcc, "", 0, f.RepoIdentifier()) 399 399 var result types.RepoBranchesResponse 400 400 if xrpcerr := xrpcclient.HandleXrpcErr(err); xrpcerr != nil { 401 401 l.Error("failed to call XRPC repo.branches", "err", xrpcerr) ··· 466 466 user := rp.oauth.GetMultiAccountUser(r) 467 467 468 468 collaborators, err := func(repo *models.Repo) ([]pages.Collaborator, error) { 469 - repoCollaborators, err := rp.enforcer.E.GetImplicitUsersForResourceByDomain(repo.DidSlashRepo(), repo.Knot) 469 + repoCollaborators, err := rp.enforcer.E.GetImplicitUsersForResourceByDomain(repo.RepoIdentifier(), repo.Knot) 470 470 if err != nil { 471 471 return nil, err 472 472 }
appview/repo/tags.go

This file has not been changed.

appview/repo/tree.go

This file has not been changed.

appview/repo/webhooks.go

This file has not been changed.

History

9 rounds 2 comments
sign up or login to add to the discussion
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 2 comments

Uh, in general I want to abandon like half of the stacks. I should've be more clear on this at first place.

Appview doesn't need to know about repo-did situation in most of the cases yet. If repoDid is optional value, there is no reason to use it. Appview still has to support legacy at-uri based connection, so I'd suggest to not introduce extra behavior on referencing and only use repo-did when performing the repository migration. We don't need to touch any tables except the repos itself.

Appview will

  1. ingest repo-did information from sh.tangled.repo records,
  2. store that extra identifier in repos table,
  3. and use that unique identifier when doing redirection/backlinking after owner migration.

No need to change other data.

I'll do some cutting then let you know! :p

This pull has been deleted (possibly by jj abandon or jj squash)
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments