Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request conflict files detection #5951

Merged
merged 5 commits into from
Feb 5, 2019

Conversation

lunny
Copy link
Member

@lunny lunny commented Feb 4, 2019

This pull request will add a new column on table pull_request named conflicted_files that will store less than 10 conflicted file names which will be filled on testPatch method. Will fix #887

@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Feb 4, 2019
@lunny lunny added this to the 1.8.0 milestone Feb 4, 2019
@codecov-io
Copy link

codecov-io commented Feb 4, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@680a57c). Click here to learn what that means.
The diff coverage is 13.63%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #5951   +/-   ##
========================================
  Coverage          ?   38.7%           
========================================
  Files             ?     330           
  Lines             ?   48642           
  Branches          ?       0           
========================================
  Hits              ?   18827           
  Misses            ?   27088           
  Partials          ?    2727
Impacted Files Coverage Δ
routers/repo/pull.go 34% <0%> (ø)
models/pull.go 50.51% <16.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 680a57c...6a63b6c. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 4, 2019
@@ -871,6 +871,7 @@ pulls.has_merged = The pull request has been merged.
pulls.title_wip_desc = `<a href="#">Start the title with <strong>%s</strong></a> to prevent the pull request from being merged accidentally.`
pulls.cannot_merge_work_in_progress = This pull request is marked as a work in progress. Remove the <strong>%s</strong> prefix from the title when it's ready
pulls.data_broken = This pull request is broken due to missing fork information.
pulls.files_conflicted = This pull request has some files conflicted with target branch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pulls.files_conflicted = This pull request has some files conflicted with target branch.
pulls.files_conflicted = This pull request has changes conflicting with the target branch.

models/pull.go Outdated
@@ -1396,6 +1416,11 @@ func (pr *PullRequest) IsWorkInProgress() bool {
return false
}

// IsFilesConflicted determine if the Pull Request has files conflicted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have determines here instead

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going with @lafriks's suggestion with the translation

Suggested change
// IsFilesConflicted determine if the Pull Request has files conflicted.
// IsFilesConflicted determines if the Pull Request has changes conflicting with the target branch.

@lunny
Copy link
Member Author

lunny commented Feb 5, 2019

@lafriks @adelowo done.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 5, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 5, 2019
@techknowlogick techknowlogick merged commit bf4bada into go-gitea:master Feb 5, 2019
@lunny lunny deleted the lunny/conflict_detection branch February 6, 2019 01:35
@lunny lunny added the type/changelog Adds the changelog for a new Gitea version label Feb 6, 2019
@bederke
Copy link

bederke commented Feb 17, 2020

What about this feature? According to https://blog.gitea.io/2019/04/gitea-1.8.0-is-released/ it is released already, but I cannot find it in Gitea 1.11.1

@lunny
Copy link
Member Author

lunny commented Feb 17, 2020

@bederke When you create a pull request which has conflict files. You can find them on pull request view interface.

@mschoettle
Copy link
Contributor

I have a PR that shows a conflicted file but when I merge it locally there is no conflict. Is this a bug in the conflicted files detection?

@jolheiser
Copy link
Member

@mschoettle Please open a new issue if you are experiencing a problem. 🙂

Issues on merged PRs tend to get lost fairly quickly.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
@delvh delvh removed the type/changelog Adds the changelog for a new Gitea version label Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show conflicted files on pull request ui.
10 participants