The compare forks option dropdown now shows repos in which you are a collaborator on instead of just repos you own.
ERROR
appview/db/repos.go
ERROR
appview/db/repos.go
Failed to calculate interdiff for this file.
ERROR
appview/pages/templates/repo/pulls/fragments/pullCompareForks.html
ERROR
appview/pages/templates/repo/pulls/fragments/pullCompareForks.html
Failed to calculate interdiff for this file.
NEW
appview/pulls/pulls.go
NEW
appview/pulls/pulls.go
···
852
852
}
853
853
854
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)
855
+
splits := strings.SplitN(forkRepo, "/", 2)
856
+
fork, err := db.GetForkByDid(s.db, splits[0], splits[1])
856
857
if errors.Is(err, sql.ErrNoRows) {
857
858
s.pages.Notice(w, "pull", "No such fork.")
858
859
return
···
1269
1270
}
1270
1271
1271
1272
forkVal := r.URL.Query().Get("fork")
1272
-
1273
+
split := strings.SplitN(forkVal, "/", 2)
1273
1274
// fork repo
1274
-
repo, err := db.GetRepo(s.db, user.Did, forkVal)
1275
+
repo, err := db.GetRepo(s.db, split[0], split[1])
1275
1276
if err != nil {
1276
1277
log.Println("failed to get repo", user.Did, forkVal)
1277
1278
return