Commit Graph

1235 Commits

Author SHA1 Message Date
Unknwon 3f7f4852ef #2246 fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
Andrey Nering dbed39ba05 On showing diff/file, use the tab_width specified on .editorconfig, if any (#3241)
Closes #3182
2016-08-11 17:07:09 -07:00
Unknwon 2cb04db526 Fix #3391 2016-08-11 15:29:39 -07:00
Unknwon a47aef5460 #2852 code cleanup 2016-08-11 14:55:10 -07:00
Unknwon 70fbcd2f27 models: rename EnableTidb to EnableTiDB 2016-08-11 14:38:45 -07:00
Thibault Meyer 53c573ed02 Fix #3314: Cannot edit release with tag name contains slash (#3434) 2016-08-11 13:45:42 -07:00
Robin Lambertz 5a9709fa9d Add MaxRepoCreation to EditUser API (#2781) 2016-08-11 11:49:31 -07:00
Unknwon 7e9b42c87d #2780 code clean up 2016-08-11 11:35:46 -07:00
Robin Lambertz b6c14f8b21 Add AddCollaborator API Endpoint (#2780)
* Add AddCollaborator API Endpoint

* Add optional Permission to AddCollaborator endpoint

* Use APIContext
2016-08-11 11:23:25 -07:00
Andrew 0885784f13 Wiki mirroring implementation (#3233)
* Implement wiki mirroring, add Update mirrors operation to admin dashboard

* bindata.go update after merge

* Implement checking Git repo endpoint existence, support for BB included

* Remove admin dashboard operation
Fix bindata.go

* Apply gofmt to repo model file

* Try to remove bindata from PR

* Revert accepted wiki names change in favor of better system

* Remove unused imports
2016-08-11 10:18:51 -07:00
Unknwon d625e41c6c #3408 minor code fix 2016-08-11 07:41:01 -07:00
Thibault Meyer 6a81632e36 Fix typo CacheInternal -> CacheInterval (#3432) 2016-08-11 05:59:11 -07:00
Unknwon b85927e488 #3091 show Git configs on admin panel 2016-08-10 11:01:42 -07:00
lstahlman 89f71b44f7 Add committer information to API and Webhooks. Also fixes #3271 (#3414) 2016-08-09 22:01:57 -07:00
Unknwon edd786446c #3158 skip RUN_USER check on Windows 2016-08-09 17:41:18 -07:00
Unknwon f70343660d Little code refactoring 2016-08-09 12:56:00 -07:00
Rory McNamara c8b45ecc27 Render the Code view on the server (minus syntax highlighting) (#2942)
* render code view server side

* remove debug print

* fix multiline selection bug

* change string concatenation to bytes.Buffer for efficiency

* Fix newlines added by previous for hljs

* fix selection highlighting

* make css changes in .less
2016-08-09 12:35:20 -07:00
lstahlman 2c82fc3edb Fix for #3410 overall issues for organisations is limited to num_repos from the user (#3412) 2016-08-09 10:00:42 -07:00
Sandro Santilli 90dd0657b5 Add support for federated avatars (#3320)
* Add support for federated avatars

Fixes #3105

Removes avatar fetching duplication code
Adds an "Enable Federated Avatar" checkbox in user settings
(defaults to unchecked)

Moves avatar settings all in the same form, making
local and remote avatars mutually exclusive

Renames UploadAvatarForm to AvatarForm
as it's not anymore only for uploading

* Run gofmt on all modified files

* Move Avatar form in its own page

* Add go-libravatar dependency to vendor/ dir

Hopefully helps with accepting the contribution.
See also #3214

* Revert "Add go-libravatar dependency to vendor/ dir"

This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82.

* Make federated avatar setting a global configuration

Removes the per-user setting

* Move avatar handling back to base tool, disable federated avatar in offline mode

* Format, handle error

* Properly set fallback host

* Use unsupported github.com mirror for importing go-libravatar

* Remove comment showing life exists outside of github.com

... pity, but contribution would not be accepted otherwise

* Use Combo for Get and Post methods over /avatar

* FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR

* Fix persistance of federated avatar lookup checkbox at install time

* Federated Avatars -> Enable Federated Avatars

* Use len(string) == 0 instead of string == ""

* Move import line where it belong

See
https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md

Pity the import url is still the unofficial one, but oh well...

* Save a line (and waste much more expensive time)

* Remove redundant parens

* Remove an empty line

* Remove empty lines

* Reorder lines to make diff smaller

* Remove another newline

Unknwon review got me start a fight against newlines

* Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE

On re-reading the diff I figured what Unknwon meant here:
https://github.com/gogits/gogs/pull/3320/files#r73741106

* Remove newlines that weren't there before my intervention
2016-08-07 10:27:38 -07:00
Thibault Meyer 30fda0f1ae Fix #3315: Release dont use tag creation date (#3374)
* Fix #3315: Release dont use tag creation date

* Simplify code and apply gofmt

* remove useless block (ctx.Repo.GitRepo.GetTag) on EditReleasePost

* apply gofmt on modified files
2016-08-06 10:02:15 -07:00
Unknwon ab9c5fb5e7 #2593 allow render raw content
Use URL query parameter render=1 to render content in raw mode.
2016-08-05 18:34:13 -07:00
rugk 28dc5bb566 Replace gogs.io http links with https version (#3386) 2016-08-05 17:35:40 -07:00
Unknwon cf6d321991 Ignore repository with issue disabled or use external tracker in dashboard issues 2016-08-05 12:46:26 -07:00
Unknwon 50422f1fc2 #3348 always use relative avatar link in the template 2016-08-05 12:12:54 -07:00
Unknwon db3d393576 routers/api: rename handlers to be unexported 2016-08-04 17:08:01 -07:00
Unknwon 2f105f3979 #2162 completely disable builtin issue tracker when enable external tracker 2016-08-04 16:32:02 -07:00
Unknwon e7fd65f0cf #3290 better code structure and batch minor improvements 2016-08-03 11:51:22 -07:00
lstahlman 2eeb0ec9b0 Additional API support for labels (#3290)
* Add API support for labels.

* Error handling for adding/replacing multiple issue labels

* Revisions to function names and error handling. Use issue.ClearLabels in replace/clear functions

* Additional code cleanup
2016-08-03 09:24:16 -07:00
Unknwon 10dc330640 #3345 dump content directly to HTTP ResponseWriter 2016-07-30 23:39:58 +08:00
Dennis Chen dfab54d5a2 Diff patch (#3345)
* Add support for .diff and .patch

Add the ability to get text-diff and format-patch by adding .diff or
.patch in the end of a commit url. Issue #2641

* models: git_diff: various fixes

* Renames commitId to commitID.
* Writes stderr to a bytes.Buffer and displays proper error message on
command failure.
* Various style changes.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
2016-07-30 23:02:22 +08:00
마누엘 fe60ca408b routers/repo/release: Use correct branch reference (#3330)
When calculating the current behind commit count the calculation should
use the current release target to get the total commit count. Should the
release target not exist anymore the calculation will return zero for
the newest release on that target. Older releases on that target will then
use that calculated commit count as reference.

The only use case that is now somehow invalid is when the release target
was merged / deleted after a tag on that release target:

    master 1 - - - - - - - 6
            \             /
    branch   2 - 3 - 4 - 5

When `4` is the last tag on branch `branch` and the branch `branch` is not
yet deleted the calculated numbers would be:

    1 commits to branch since this release

Now if the branch `branch` gets deleted the calculation function will not
find the branch and use the commit count of the newest release (`4`) as
reference resulting in:

    0 commit to branch since this release

This fixes #3326
2016-07-27 16:57:32 +08:00
Richard Mahn 0402c803c6 Added Full Name to CreateUser api call (#3333) 2016-07-27 02:43:06 +08:00
Unknwon 29ccf047d8 routers/repo/issue: remove redundant format string 2016-07-26 18:42:18 +08:00
Unknwon 899e799459 #1601 support delete issue comment 2016-07-26 02:48:17 +08:00
Unknwon e74630ae3b #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
Unknwon 1f2e173a74 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
Unknwon 46e96c008c Use struct for UI settings 2016-07-24 00:23:54 +08:00
Unknwon 256cd6374a #2790 fix not detect diff style in pull request file changes 2016-07-23 23:46:49 +08:00
Unknwon 4b5e09e4d6 #3181 detect situation when base branch is deleted in pull request 2016-07-23 18:35:16 +08:00
Unknwon e63b2881b1 api: fix panic if anonymous user request admin API
Add sign in check before check user account level
2016-07-23 17:56:37 +08:00
Unknwon c912494609 #3076 detect invalid tag name git error 2016-07-23 15:59:19 +08:00
lstahlman 25b3836418 Refresh repository mirror from database when the repository's name has changed. (#3276) 2016-07-17 09:30:43 +08:00
Unknwon 5aa2bf86f4 Update locales and .gopmfile 2016-07-17 09:25:30 +08:00
Unknwon 60110adc06 models/webhook: restrict deletion to be explicitly with repo and org ID 2016-07-17 08:33:59 +08:00
Dennis Chen 5ff2dfb23e api: delete repository webhooks (#3275)
Allows the deletion of a webhook from a repository at the
/:user/:repo/hooks/:id endpoint.

Solves drone/drone issue #1603.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
2016-07-17 08:08:38 +08:00
Unknwon c083d76567 #2937 able to prohibit user login 2016-07-16 10:22:16 +08:00
Unknwon 3d93532c87 #3274 fix can't get webhook detail of organization 2016-07-16 01:02:55 +08:00
Unknwon f1b8d52eb3 #2854 fix no mail notification when issue is closed/reopened 2016-07-16 00:36:39 +08:00
Unknwon 7ca5f8f119 models/repo: remove redundant info for some repo methods
RepoLink -> Link, RepoRelLink -> RelLink, FullRepoLink -> FullLink
2016-07-15 21:53:43 +08:00
lstahlman 846bf2ca9f Add timestamps to repository api response (#3255)
Additional properties: created_at, updated_at
2016-07-12 06:28:51 +08:00