The compare forks option dropdown now shows repos in which you are a collaborator on instead of just repos you own.
+8
-5
appview/db/repos.go
+8
-5
appview/db/repos.go
···
467
var repos []Repo
468
469
rows, err := e.Query(
470
+
`select distinct r.did, r.name, r.knot, r.rkey, r.description, r.created, r.at_uri, r.source
471
+
from repos r
472
+
left join collaborators c on r.at_uri = c.repo_at
473
+
where (r.did = ? or c.subject_did = ?)
474
+
and r.source is not null
475
+
and r.source != ''
476
+
order by r.created desc`,
477
+
did, did,
478
)
479
if err != nil {
480
return nil, err
+2
-2
appview/pages/templates/repo/pulls/fragments/pullCompareForks.html
+2
-2
appview/pages/templates/repo/pulls/fragments/pullCompareForks.html
+4
-3
appview/pulls/pulls.go
+4
-3
appview/pulls/pulls.go
···
852
}
853
854
func (s *Pulls) handleForkBasedPull(w http.ResponseWriter, r *http.Request, f *reporesolver.ResolvedRepo, user *oauth.User, forkRepo string, title, body, targetBranch, sourceBranch string, isStacked bool) {
855
-
fork, err := db.GetForkByDid(s.db, user.Did, forkRepo)
856
if errors.Is(err, sql.ErrNoRows) {
857
s.pages.Notice(w, "pull", "No such fork.")
858
return
···
1269
}
1270
1271
forkVal := r.URL.Query().Get("fork")
1272
-
1273
// fork repo
1274
-
repo, err := db.GetRepo(s.db, user.Did, forkVal)
1275
if err != nil {
1276
log.Println("failed to get repo", user.Did, forkVal)
1277
return
···
852
}
853
854
func (s *Pulls) handleForkBasedPull(w http.ResponseWriter, r *http.Request, f *reporesolver.ResolvedRepo, user *oauth.User, forkRepo string, title, body, targetBranch, sourceBranch string, isStacked bool) {
855
+
splits := strings.SplitN(forkRepo, "/", 2)
856
+
fork, err := db.GetForkByDid(s.db, splits[0], splits[1])
857
if errors.Is(err, sql.ErrNoRows) {
858
s.pages.Notice(w, "pull", "No such fork.")
859
return
···
1270
}
1271
1272
forkVal := r.URL.Query().Get("fork")
1273
+
split := strings.SplitN(forkVal, "/", 2)
1274
// fork repo
1275
+
repo, err := db.GetRepo(s.db, split[0], split[1])
1276
if err != nil {
1277
log.Println("failed to get repo", user.Did, forkVal)
1278
return