Commit Graph

342 Commits (3a500cf8c4b7892e13cb506af6fe3ab5c1c2faff)

Author SHA1 Message Date
Matthias Loibl 95d4cd9292
Make long godoc comment 2 lines
Matthias Loibl 2bb188ae79
Add test for IsLetter()
Matthias Loibl 4235fff9ee
Add test for Int64sToMap()
Matthias Loibl d417aedcfa
Add tests for StringsToInt64s() & Int64sToStrings()
Matthias Loibl b00d82d679
Add tests for TruncateString()
Matthias Loibl 86c32f2706
Use TruncateString(sha1,10) in ShortSha and deprecate it.
Matthias Loibl 030ba2894f
Add tests for EllipsisString() and fix bug if param length < 3
Matthias Loibl f81711f40d
Test AvatarLink and refactor with tests passing
Matthias Loibl 70fb1cf9d1
Use testify/assert for all tests in tool_test.go
Matthias Loibl d874a9bf6b
Add unit test for base.FileSize()
Matthias Loibl 11c9160cd3
Start to add tests for modules/base/tool
Thomas Boerger 77f9c7e571
Fixed links to sdk docs
Thomas Boerger 6bf9910975
Set correct doc url for go-sdk
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs ()
Unknwon dadd35b636 fix template error
Unknwon 780cc2d110 router/repo: code refactoring
Thibault Meyer 7eafe3213f Fix : commit tag shortener ()
* Fix : commit tag shortener

* Check short commit

* remove debug

* Edit unit tests

* Show 10-char short SHA
Unknwon 99385db0c4 code cleanup
Sandro Santilli 90dd0657b5 Add support for federated avatars ()
* Add support for federated avatars

Fixes 

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 

* 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
Sandro Santilli 8a248696e9 Use a gopher as default avatar (rather than the gravatar logo) ()
Also changes the avatar from a jpeg to a png, to allow for
transparent background. The indexed png is also smaller in size.

Note that at the moment the default avatar is only used when
the user requested a custom avatar and the custom avatar file
is not found (should never happen).

In the future the default avatar could be used as a default
return when by-mail avatar lookups fail too (both gravatar
and libravatar support passing a default)
Kim Carlbäcker 3df8eb60e3 PDF-Previews in file-lists now working ()
Unknwon 5267dce210 Fix ref comment from commit create empty feed
Unknwon a2f13eae55 some avatar setting changes
- Allow to delete current avatar
Unknwon d5a3021a7d Make markdown as an independent module
Unknwon 341da3cea7 Fix inappropriate markdown post process end tag check
When <code> is nested inside <pre>, the next end tag token would not able to be the same
as outer-most start tag. So we only check outer-most start and end tag token to be the same.
Unknwon 338af89d56 fix possbility that use email as pusher user name
Remove the possibility of using email as user name when user actually push
through combination of email and password with HTTP.

Also refactor update action function to replcae tons of arguments with
single PushUpdateOptions struct.
And define the user who pushes code as pusher, therefore variable names shouldn't
be confusing any more.
Unknwon 58e004f7da Remove cache avatar support and add its tests
Unknwon 4e96a4a62b Merge pull request from bkcsoft/feature/markdown-custom-url-scheme
Feature/markdown custom url scheme
Unknwon 8e40f86d2c handle space in image URL
Unknwon 4848620594 adjust URL verbose depth for reverse proxy sub-path
Kim "BKC" Carlbäcker 1ab8a60d73 Not working, but slightly better...
Kim "BKC" Carlbäcker 3a9fd81f59 Custom URL-Schemas for Markdown
Kim "BKC" Carlbäcker a1a4f1103c Made Sanitizer-setup cleaner
Kim "BKC" Carlbäcker 8e09e03127 Checklist-rendering implemented
Unknwon f43cc90841 Truncate repository name if too long
Unknwon cc8c67ff29 fix markdown autolink error
Unknwon 4993ab1a76 fall back to use custom chardet lib
Unknwon 44637f03cc fast detection of utf-8
Unknwon 93f03707a7 set text/plain for non-binary files in raw mode
Unknwon 85af36332b fix utf-8 recognized as windows-1252
Unknwon 95f9c85bcc use Go sub-repo to detect encoding
Unknwon 7e88420bc6 fix wrong regexp
Unknwon 5911fc3512 No issue linking in commits when issue number in brackets
Unknwon e538ff2770 fix and fix
Unknwon ba92f4687e minor fix markdown post process
Unknwon 968edb3e44 more link fix
Unknwon 7f9598141b fix
Unknwon f12832c61e fix possible panic
Unknwon 126228d146 HTML render fix
Unknwon 9b6c835715 fix
Unknwon 1a901433e2 minor fix for
Howl ca5678da32 Safely detect urlPrefix in the format /:owner/:repo
Howl 85c58eba90 Fix bad issue links in non-readme markdown files
Unknwon 1d57f0d64f Show custom avatars in commits
Unknwon 3b62a0fe0e fix fix file histrory paging issue
Unknwon 18c841050b fix 1540 and experimental SSH server support
Unknwon 54ca0b2f09 images with links in Markdown
-  minor fix on image link
Unknwon 0af035c37e not show bin when rename a file
Unknwon 022820103d allow forcing all private repos
Unknwon aff49b1c9e unified API error response
Sergio Benitez 7acbcf9ddd Commit messages now rendered with line breaks and prefix spacing.
Unknwon 2729eb998c and other minor fixes
Unknwon c8d92fad30 pushing new branch will rereference issues in previous branch
Hongcai Deng e4d4662074 add regexp to restrict `<code class=""></code>`
Hongcai Deng 357c002c03 add allow attribute `class` to `<code>`
Unknwon 645d4d0c5b Collaborative Repositories missing suburl on Dashboard
Unknwon 85f34ba538 new user profile settings UI
Signed-off-by: Unknwon <u@gogs.io>
Unknwon 8af094967f add rename repo action
Unknwon 90a6553c37 Config option for preserving hard line breaks
Unknwon 55ddf225bb webhook APIs
Unknwon a7686e8749 bundle jquery with gogs
Unknwon a329bbc215 new org dashboard issues
Unknwon 6c2536b89c fix timezone
Unknwon a5b09b30d0 print time to debug
Unknwon 390027496c use UTC for TimeSince
无闻 ce8864c69a Merge pull request from donbowman/master
Fix race condition on ssh key delete, and revert re-revert of hard line break
Unknwon 133b19d0c5 finish view comments on issue page
Don Bowman 1cb46ede1a Merge branch 'master' of https://github.com/gogits/gogs
Conflicts:
	routers/repo/download.go
Don Bowman 9e6bd31d76 fixes for binary
Unknwon 922f3f3062 finish create issue with labels
Unknwon 9db4acc62e improve fork process
Fernando San Julián c5be40decb new markdown styles
Vladimir Vissoultchev 2cc050e21e Fix UTF-8 in upper-case, use ansi charset for all non UTF-8 encodings
Vladimir Vissoultchev 167265d533 Allow file and directory names to contain percent character
Vladimir Vissoultchev 53bcf373c1 Allow explicit charset/codepage setting for ANSI source files to alleviate issue
Don Bowman 81e6173356 remove blackfriday.EXTENSION_HARD_LINE_BREAK from options.
Unknwon caf7618ea6 Hide gravatar email field if gravatar is disabled (or offline mode)
Unknwon ab6b288141 fix markdown: render special links
- code format for 
无闻 750d82b8e2 Merge pull request from jcracknell/tag-exclude-nethtml
Exclude HTML tags from Markdown post-processing
Unknwon b72e75e522 : OFFLINE_MODE Still Uses Gravatar
James Cracknell 41cc43208e Mousewheel paste
James Cracknell 127eb439d7 Exclude HTML tags from Markdown post-processing
HTML tags are no longer processed for special links, etc
Contents of <a>, <code> and <pre> are not processed for special links
Processing for special links is done after Markdown conversion
Unknwon e3dece1371 modules/setting: simple behave change in startup
Alexey Makhov 563e8b4ea9 gitlab-like hash naming
Peter Smit 7759b9ee6e Remove the "PHP" style formatting function
The "PHP" formatting function doesn't add anything, except an undocumented date format.

All usages in the templates have been replaced with DateFmtShort and DateFmtLong for convenience.
Peter Smit 5cd887dba5 Fixes
Fixes  and makes the Mention regexp be in line with the others
Unknwon afccd0a3ee models/action.go: mirror fix on
- modules/base/markdown.go: fix issue link issue
- routers/repo/view.go: remove useless code
Unknwon 0669897226 modules/base: fix markdown mention regex for
- conf/locale: add mew translator profile
无闻 ddddad9792 Merge pull request from deringer/dev
Fix user mention bug when parsing markdown documents
Unknwon bfce0def25 modules/base: fix README filename checker, fix