+1
+1
+1
+1, it's actually a blocker for me
+1
+1
@Unknwon please could you point me to the relevant files to help make this feature happen?, regardless thanks for your time making this project.
@aganoza it's not as simple as edit a file to make this work.
:+1:
And an aside: @Unknwon I am very thankful for Gogs. I've been running it a while now and it's been solid. I am glad that there is a real competitor to GitLab, and I'm glad it's in the Go ecosystem, You've been a champ pushing out this much code for the past year and a half. Seriously, thank you.
@JohnMaguire :trollface:
+1 for this - adding the ability to do "Merge Requests" ala Gitlab would be a great addition
It would be nice indeed, it would make it a lot easier to our team to implement code revision with this feature
+1
+1
+1
+1
+1 Yas, needed very much.
:+1:
:+1:
This is the last thing I'm actually waiting on. Then I can begin pestering @Unknwon about trello integration :stuck_out_tongue:
Think in conjunction, will also need to implement more fine grain access control within the repo. If not anyone can merge the changes, bypassing the PR... Great work @Unknwon !
:trollface:
+1
+1
+1
+1, I need it too :sunglasses:
+1
Please add this feature for pull requests between branches in the same repo. This is a critical essential feature.
+1000000
+1, this is much needed
+1
+1
+1
+1
I need it! :fire_engine:
+1
+1
:+1: +1
+1
+1 :)
+1
+1
+1
+1
+1
+1
This feature is very important if I want to get more people to use our gogs server.
+1
Hi. As I post in your blog article's comment section. The scenario will be like this https://confluence.atlassian.com/bitbucketserver/using-pull-requests-in-bitbucket-server-776639997.html
a. There will be a master branch that will updated periodically.
b. There will be several dev branches. Let say we have R1 for release one dev branch.
c. Developer should create a new branch when working on a feature/bugfix against dev branch. For example, a new feature for R1 will be developed under 'feature/name_r1_featurename' (change feature to bug fix if it is bug fixing). He/she is committing and pushing the works to the organization repository.
d. Dev login the stash and create new pull request from his branch to existing dev branch and assign few peer devs to review it (ex: feature/name_r1_featurename to R1)
e. Assigned peer devs can review the changes made and acknowledge the pull request if there is no issue.
f. Team lead can merge it (since usual dev don't have capability to merge it).
+1
+1
+1
+1
+1
+1
+1
:+1:
:+1:
+1
+1
+1
@misugijunz really good explanation. This function is important to many developers :-)
+1
+1
+1
+1 This is an amazing feature, relying it a lot on GitHub.
Is there any update on this? Is it possible to do easily?
@stubobis1 not spossible yet.
@Unknwon what sort of changes need to take place?
@stubobis1 thanks for asking but it's a false question, because you're going to have no ideas about what I'm talking in technical details. :sweat:
Don't underestimate us. Some of us are willing to help, but without a little direction it's really difficult for us to even get started.
+1 currently a blocker for us
Whoever watches on this thread, please help test develop branch or https://try.gogs.io
@Unknwon I'll for sure ;)
@Unknwon I will as well!
This is really great news! It seems to work! I will test with more detail for sure.
@Unknwon
@Techwolf12 any usable links on https://try.gogs.io?
@Unknwon The rest on try.gogs.io is usable for me. Can you create a pull request between branches on my repo? https://try.gogs.io/techwolf12/test I've given you collaborator rights
@Techwolf12 Yes... https://try.gogs.io/techwolf12/test/compare/master...dev

@Techwolf12 I might know the problem, let me check.
@Unknwon Sure. Please let me know once you want me to test again
For the record:

@Unknwon @guillemcanal
After being added to https://try.gogs.io/gogogo/testing-repo (Thanks, Guillem!) I can make a pull request. However I do get a 500 upon creation. I suspect it has something to do with the slash in the branch name: https://try.gogs.io/gogogo/testing-repo/compare/master...feat/add-content-to-readme
@Techwolf12 Updated demo site, you should be able to create PR on your own repository now.
Also, https://try.gogs.io/gogogo/testing-repo/pulls/1 @Techwolf12
@Unknwon Success! https://try.gogs.io/techwolf12/test/pulls/1#issuecomment-620
However the 500 error is for every branch I try to merge on https://try.gogs.io/gogogo/testing-repo. Can you check in the server logs for me?
@Techwolf12 error:
2016/03/04 16:17:25 [...routers/repo/pull.go:680 CompareAndPullRequestPost()] [E] NewPullRequest: newIssue: Find all labels: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1
@Unknwon I am going to try to look into that. An other issue: https://try.gogs.io/techwolf12/test/pulls/2
Merging it manually from command line because of a conflict, it doesn't resolve the pull request and the changed files/commits are on N/A (and non-clickable)
It look good so far, great job! Merge conflict are properly detected.
@Techwolf12 I think this is expected, you can only view until you solve the conflict and push again.
@Unknwon I agree with the part you can only view and needing to merge from command line. However once you do this merge it doesn't show the commits left and you need to manually close it on the PR page. It does however work partially as expected and is not a very blocking issue now.
@Unknwon @Techwolf12 I may be mistaken, but I solved a merge conflict on that branch and still, I'm not allowed to merge: https://try.gogs.io/gogogo/testing-repo/pulls/3
@guillemcanal close and reopen solve the problem, I'll dig into why.
@Unknwon Thanks ;)
@guillemcanal did you use push --force to solve the conflict?
@Unknwon yes indeed
@guillemcanal solved.
@Unknwon just so you know: I had to logout/login to see the merge pull request button. Maybe it's a side effect caused by the client been updated in the process ;)
I had to logout/login to see the merge pull request button
What is this exactly?
@Unknwon Well, on the pull request page, before I logged out, the "merge pull request" (I don't really know if it's the exact phrase for that button) where not present. So, I decided to log out and log back in. Then on the "merge pull request" came back.
By logging out, I meant "Sign out" ;)

@Unknwon Well, on the pull request page, before I logged out, the "merge pull request" (I don't really know if it's the exact phrase for that button) where not present. So, I decided to log out and log back in. Then on the "merge pull request" came back.
I think refresh the page will do the same job, because it was checking conflict at the moment you send the new pull request. But checking is fast enough to show you result in the next refresh.
@Unknwon So I tested another merge conflict pull request, once resolved, It went as expected. Nice work you did there :+1:
@Unknwon One last thing: It seems that collaborators have the right to push commits on the master branch, have you any plans to release a feature to prevent such a thing ? Anyway, nice work so far, Go is a really nice language. I'll give it a try ASAP.
@guillemcanal you can follow https://github.com/gogits/gogs/issues/776
@Unknwon thanks, subscribed :)
@Unknwon great work I've been testing locally. One thing I noticed is the activity feed shows "Issue closed" when closing a PR, but it says "Pull Request opened" when opening one.

@joshfng good catch!
@joshfng old ones can't fix, but new ones will look like:

Now on develop branch and demo site.
:+1:
On Github you can choose repos at compare. For example a compare on a forked repo by default looks like this:

You can switch to local compare if you click on 'compare across forks' (Same thing happens if you choose your forked repo as base.):

On the original repo (which was forked) the compare defaults to local compare (But you can also switch to compare between your forks.):

@Unknwon Do you think this could be implemented in Gogs? Not necessary in this issue, but maybe later.
Now in Gogs on a fork you can compare only to the origin repo. I get a 404 error on a fork when I manually change the URL to compare between local branches.
Also, the local compare is working great, thank you for your work!
@moltam it could, but not in near future. :sweat: and out of scope of this thread, you can open another issue to keep the record.
Close as implemented.
Whooo! Nice work @Unknwon :)
Whooo! Awesome @Unknwon :+1:
Great job!! Kudos @Unknwon
Thank you @Unknwon !!!
Finally, thanks @Unknwon :+1:
thanks
I'm using gogs on Version: 0.9.13.0319
Whenever I press the green PR button, i get redirected to /compare/master...master and it shows a 404 error :(
Would really like to use this feature!
@andreasgruenh Try updating to the latest Gogs version (v0.9.71 at time of writing)
Is it save to upgrade without losing settings or repos?
@andreasgruenh It should be safe. You can always make a backup of you bare repositories and database. (you should git bundle when backing up repositories)
you can use ./gogs dump as well to make a backup of everything
I just updated to Gogs Version: 0.9.71.0809 and I still get the 404 error when clicking on one of the pull-request buttons. Any chance my reverse proxy causes this?
I have had problems with trying to create pull requests with gogs version 0.9.97.0901 where branches have hyphens in them. The below log is created when i try to compare "resource-allocation-tasks" and "develop" branch.
2016/10/28 11:32:22 [...uters/repo/commit.go:230 CompareDiff()] [E] GetCommit: exit status 128 - fatal: ambiguous argument 'resource': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
P.S. The compare url pointed to by the "octicon-git-compare" doesn't change when the branch that is viewed is changed. This means the link always goes to "[user]/[repo]/compare/develop...develop" despite which branch i am browsing currently.
Whooo! Awesome @Unknwon 馃憤
Most helpful comment
Close as implemented.