We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76e8eec commit 7697a28Copy full SHA for 7697a28
models/pull.go
@@ -861,7 +861,17 @@ func (pr *PullRequest) testPatch(e Engine) (err error) {
861
line := scanner.Text()
862
863
if strings.HasPrefix(line, prefix) {
864
- pr.ConflictedFiles = append(pr.ConflictedFiles, strings.TrimSpace(strings.Split(line[len(prefix):], ":")[0]))
+ var found bool
865
+ var filepath = strings.TrimSpace(strings.Split(line[len(prefix):], ":")[0])
866
+ for _, f := range pr.ConflictedFiles {
867
+ if f == filepath {
868
+ found = true
869
+ break
870
+ }
871
872
+ if !found {
873
+ pr.ConflictedFiles = append(pr.ConflictedFiles, filepath)
874
875
}
876
// only list 10 conflicted files
877
if len(pr.ConflictedFiles) >= 10 {
0 commit comments