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