- commit
- 0590d19
- parent
- 13ca134
- author
- kyle merfeld
- date
- 2024-07-15 13:12:59 -0400 EDT
fix: ensure repo exists before creating a patch
1 files changed,
+5,
-0
M
pr.go
M
pr.go
+5,
-0
1@@ -383,6 +383,11 @@ func (cmd PrCmd) SubmitPatchRequest(repoID string, userID int64, patchset io.Rea
2 return nil, fmt.Errorf("after parsing patchset we did't find any patches, did you send us an empty patchset?")
3 }
4
5+ _, err = cmd.GetRepoByID(repoID)
6+ if err != nil {
7+ return nil, fmt.Errorf("repo does not exist")
8+ }
9+
10 prName := ""
11 prText := ""
12 if len(patches) > 0 {