Commit Graph

412 Commits

Author SHA1 Message Date
unknwon
e2629d7ea6 routes/api/srcgraph: initial support for General Protocol 2019-07-31 21:27:40 -07:00
Unknwon
f545faa06d templates: make state changing routes to POST method (#5541)
- pkg/context: add ParamsUser to unify the injection process
2018-12-06 22:58:02 -05:00
Unknwon
520530dfcf metrics: add initial Prometheus support (#4141) 2018-09-14 22:29:43 -04:00
Unknwon
376a629c9f repo: add changes to repository avatar feature (#5221) 2018-06-17 22:18:41 +08:00
Sergey Dryabzhinsky
303fa37b60 repo: support avatars (#5221)
* First code for repository avatars

* Last code for repository avatars

- add new option for repo avatars location on filesystem
- add route catch in web
- add new fields to repo model
- add migration
- update settings handlers
- update repo header template

* Update locale messages

* Add repo avatars to home page

* Add repo avatars to organization right panel

* Show repo avatars in repo list

* Remove AvatarEamil field, remove Gravatar support, use generic locale messages

* Fix migration

* Fix seed and not used tool

* Revert public css changes, add them to less files

* Latest lessc (2.6.0) don't put result into file but output to stdout

So redirect output to file

* Simplify things:

- migration don't needed, and table changes too
- just upload file to repo avatar storage
- or generate random image

* Fix repo image seed - name not unique

* Get rid of not needed model fields

* Class value is enough, remove height attribute

* Don't generate random avatar for repository

- use html and semantic ui icons if no avatar found

* Update styles and templates for repo

- use repo icon as default avatar
- use globe icon for public repos
- add micro style for repo avatars at dashboard

* Remvoe redundant empty line

* Fix nl2br filter - must return string

* Fix css style for micro-repo-avatar in dashboard list

* Remove `|len`, works fine w/o it.

* Update after review 2:

- use static route for repository avatar
- format images settings block in settings

* Update after review 2:

- no random avatar for repo

* Update after review 2:

- no random avatar for repo 2
- update imports
- update UploadAvatar* functions

* Update after review 2:

- update templates

* Fix trace call

* Remove unused immport since we use static route for repo avatars.
2018-06-17 20:21:52 +08:00
Unknwon
aff4208244 *: rename "gogits" to "gogs" 2018-05-27 08:53:48 +08:00
Unknwon
34bd04f925 MISC: fix typo and grammar
Reference: 932490d7f1 (commitcomment-28344918)
2018-03-30 04:40:13 -04:00
William Hilton
6a185e94b9 repo/http: add CORS headers to allow clone/push from browser agents (#4970) 2018-03-14 11:08:00 -04:00
Unknwon
4a669f5478 web: support HTTP HEAD requests (#2857) 2018-03-06 01:21:13 -05:00
Athurg Feng
52f3833811 Add Dingtalk webhook support (#4773)
* Add dingtalk webhook into html template

* Add Dingtalk's icon

* Insert dingtalk into repo's webhook page template

* Insert dingtalk into org's webhook page

* Add dingtalk into default webhook config

* Add locale string for add_dingtalk_hook_desc

* Update bindata

* Add dingtalk webhook form validator

* Add dingtalk hook task

* Add dingtalk hook create handler

* Add dingtalk hook edit handler

* Add dingtalk router

* Add dingtalk webhook task skeleton

* Add markdown link formatter

* Add Dingtalk ActionCard create wrapper

* Add support for dingtalk create event payload

* Add support for dingtalk delete event payload

* Add support for dingtalk fork event payload

* Add support for dingtalk push event payload

* Add support for dingtalk issue event payload

* Add support for dingtalk issue comment payload

* Add support for dingtalk pull event payload

* Add support for dingtalk release event payload
2017-09-21 14:32:48 -04:00
Unknwon
4400d2fdd9 Refactoring: rename package routers -> routes 2017-06-11 00:34:14 -04:00
Unknwon
2478b87432 Refactoring: rename ctx -> c 2017-06-03 07:26:09 -04:00
spacetourist
0a6ceabb9b Allow configurable HTTPS SSL/TLS version(#4451) 2017-05-20 08:31:25 -04:00
Unknwon
90b9f7e08c pkg/setting: rename {AppUrl, AppSubUrl} -> {AppURL, AppSubURL} 2017-04-06 17:27:57 -04:00
Unknwon
a617d52374 2fa: initial support (#945) 2017-04-06 00:14:30 -04:00
Unknwon
497cdc9250 user/setting: reorder navbar 2017-04-05 09:27:42 -04:00
Unknwon
d05395fe90 Refactoring: rename modules -> pkg
Reasons to change:

1. Shorter than 'modules'
2. More generally used by other Go projects
3. Corresponds to the naming of '$GOPATH/pkg' directory
2017-04-04 19:29:59 -04:00
Unknwon
ab634ce61a cmd/web: fix routes requires sign in (#4359)
Redirect user to sign in page when visit private repository with
public issues if user want to post comment or create new issue.
2017-03-30 00:34:20 -04:00
Unknwon
c238647020 cmd/web: remove dependency version checker 2017-03-25 04:17:55 -04:00
Unknwon
674106c7b6 repo: cleanup some code 2017-03-24 16:32:14 -04:00
Unknwon
8196430f47 repo: allow private repository to have public wiki or issues
Relates to #649 and #2157
2017-03-24 16:25:40 -04:00
Unknwon
66c1e6b0e8 user/settings: complete repositories panel (#4312) 2017-03-23 14:28:31 -04:00
Rob Richards
902372067c user/settings: add repositories panel (#4312)
* Add Repositories panel to user settings
issue #4277

* modified personal repo settings format
2017-03-23 12:57:43 -04:00
Unknwon
bb86d66496 repo: rename PageIsViewCode -> PageIsViewFiles
Also highlight 'Files' tab when use editor.
2017-03-22 12:58:12 -04:00
Unknwon
2807274e2d repo/webhook: able to retrigger delivery history (#2187) 2017-03-19 17:44:46 -04:00
Unknwon
171f97868d repo: allow issues and wiki for bare repository (#4104) 2017-03-16 23:10:45 -04:00
Unknwon
24734a33e7 release: improve attachment handle 2017-03-13 05:26:17 -04:00
Unknwon
1df54ea0cd release: able to add attchments to release (#1614)
Added new config section '[release.attachment]’.
2017-03-13 04:32:20 -04:00
Unknwon
61e2bff757 repo: commits, branches and releases should highlight files tab 2017-03-11 02:13:42 -05:00
Unknwon
5c7cb1594b repo/branches: overview and all (#2310) 2017-03-11 01:43:45 -05:00
Unknwon
8fa6d0d302 repo/pull: handle head repository of merged pull requests deleted 2017-03-10 16:58:41 -05:00
Unknwon
aa99e805c8 repo/release: 404 when edit draft (4262) 2017-03-10 15:27:55 -05:00
Unknwon
e9838a83ce routers/repo/http: only prompt HTTP Basic Authentication when intended
Sometimes user could simply request wrong URL, but if that wrong URL
has nothing related Git HTTP operations, HTTP Basic Authentication
should not prompted. Instead, clean 404 page should be presented.

The patch also supports Git HTTP operations without '.git' suffix
to the repository name, which addresses #4226 and #4189.
2017-03-04 21:26:32 -05:00
Unknwon
ca2cfaf71e cmd: able to backup and restore
Not very robust, must execute under correct workdir.

Addresses #2072, #3708, #648
2017-02-27 22:48:19 -05:00
Unknwon
7fe13e72d8 cmd: refactoring command name 2017-02-27 22:47:12 -05:00
Unknwon
4f9c5981a9 refactoring: modules/auth/*_form.go -> modules/form 2017-02-27 22:45:35 -05:00
Unknwon
266c8f5a85 release: fix unable to edit release of a fork repository 2017-02-23 11:35:33 -05:00
Unknwon
6002d72603 router: fix 404 when repository name contains dot
E.g. atomi.github.io
2017-02-20 18:05:34 -05:00
Unknwon
0bef74d499 vendor: update github.com/go-macaron/toolbox (#2857)
Support HEAD requests of '/healthcheck' for service monitoring.
2017-02-20 13:39:46 -05:00
Unknwon
7de71333c6 repo: several minor improvements
1. Fix sample content didn't show up when hook doesn't exist.
2. Fix CSS 'word-break' to use 'break-word' not 'break-all'.
3. Fix single quote in 'locale_en-US.ini' file.
2017-02-19 13:18:16 -05:00
Unknwon
c69900325d commits: able to specify pageSize dynamically (#3965)
Usage: <url>?page={page}&pageSize={pageSize}

Also avoid/removed getting total commits count for pagination,
users are only allowed navigation by 'newer' and 'older'.
2017-02-18 18:37:47 -05:00
Unknwon
a07b1f630a webhook: add native Discord support 2017-02-18 00:54:56 -05:00
Unknwon
07801cbf09 repo/release: add pagination (#2164) 2017-02-17 17:41:55 -05:00
Unknwon
7e09d210ba Initial version of protected branches (#776)
- Able to restrict force push and deletion
- Able to restrict direct push
2017-02-17 15:10:50 -05:00
Unknwon
d521e716dd refactoring: SSH and HTTP push procees is now unified
We used to handle SSH and HTTP push separately which produces
duplicated code, but now with post-receive hook, the process
is unified to one single place and much cleaner.
Thus, UpdateTask struct is removed.

Narrow down the range of Git HTTP routes to reduce condufsing
HTTP Basic Authentication window popup on browser.

By detecting <old-commit, new-commit, ref-name> inside post-receive
hook, Git HTTP doesn't need to read the whole content body anymore,
which completely solve the RAM problem reported in #636.
2017-02-16 16:33:49 -05:00
Unknwon
3b49a99b60 wiki: fix crash with blob name contains tab (#3916) 2017-02-16 11:47:54 -05:00
Unknwon
b9560ec9cb vendor: update git-module (#4128) 2017-02-15 18:34:02 -05:00
Unknwon
039dc33367 git: delegate all server-side Git hooks (#1623) 2017-02-14 16:22:16 -05:00
Aaron Wood
68ead67a63 Use very strong ciphers (#4116)
* Use very strong ciphers

* Remove TLS_RSA_WITH_AES_256_GCM_SHA384 to be compatible with Go 1.5
2017-02-12 19:12:07 -05:00
Unknwon
2d38b75400 diff: fix can't show compare page for fork repository (#4110) 2017-02-12 18:43:26 -05:00