Due to recent code refactor, ctx.PullRequest is not initialized for
route repo.CompareAndPullRequest, which leads the UI thinks the
compare is not happening inside the same repository.
The current fix is to allow compare URL to include redundant head
user name so everything works fine again, but code logic isn't
as clean as before.
Made comments about possible future fix.
* Implement organizations listing in setting and allow user to create new organization.
* Implement organizations listing in setting and allow user to create new organization.
* Add space remove by mistake
* Remove unused part of the template
* Update display and behavior according to @Unknown remarks
Site admin now has to enable manually by config option
[repository] ENABLE_LOCAL_PATH_MIGRATION = true.
Site admin always grants this permission, but regulars users have
to be allowed by site admins in admin user panel.
* Fix assigned/created issues in dashboard.
* Use GetUserIssueStats for getting all Dashboard stats.
* Use gofmt to format the file properly.
* Replace &Issue{} with new(Issue).
* Check if user has access to given repository.
* Remove unnecessary filtering of issues.
* Return 404 error if invalid repository is given.
* Use correct number of issues in paginater.
* Use temporary file to avoid out-of-memory when receiving big chunk.
Not perfect but I think it's a reasonable solution.
For small request bodies, I suppose performance wouldn't be an issue.
For large ones, this seems to be a necessary evil.
* Must close the open file to avoid fd leaks
Closes#3696, #3611
Previously, ProdMode can only be true for web server,
which always prints dev mode log message to incoming SSH
connections and leaks unexpected information.