Lunny Xiao
5d40db629c
fix random avatars ( #1147 )
2017-03-08 23:05:15 +08:00
Lunny Xiao
2215840363
fix avatar bug #1114 ( #1122 )
...
This PR fix the avatar bug described in #1114 . This will fix random avatar is blank problem and potential delete avatars dir problem.
2017-03-06 16:15:40 +08:00
Lunny Xiao
0376029241
fix del org avatar potential delete all avtars ( #1120 )
2017-03-06 16:07:18 +08:00
Lunny Xiao
7b64b2ddab
fix install submit crash caused by xorm log ( #1119 )
2017-03-06 10:11:43 +08:00
Bo-Yi Wu
d76d67de23
feat: expose url field on issue api. ( #982 )
...
* Add api url func.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* fix: Add unit testing.
* fix: conflicts
* fix: remove trim
* fix: revert test function name.
2017-03-03 22:35:42 +08:00
Lunny Xiao
ef13bbaf7d
Don't rewrite non-gitea public keys ( #906 )
...
* don't rewrite non-gitea public keys
* add comment for public key
2017-03-03 00:36:47 +08:00
Lunny Xiao
9cb08a3cf5
fix wrong num of user repos because of duplicated click delete button & performance optimization ( #1092 )
2017-03-01 12:05:45 +08:00
Ethan Koenig
d21d5fd736
Remove unnecessary loads in org_team ( #1090 )
2017-03-01 09:09:49 +08:00
Ethan Koenig
22f7aa6e9c
LableIDs -> LabelIDs ( #1088 )
2017-03-01 09:08:45 +08:00
Bo-Yi Wu
e83c8afc56
refactor: move SearchRepositoryByName testing. ( #1083 )
2017-02-28 17:58:50 +08:00
Lunny Xiao
c2eef171ff
fix some typos ( #1082 )
2017-02-28 12:56:15 +08:00
Ethan Koenig
4b286f282a
Consistency checks for action unit tests ( #1079 )
2017-02-28 09:42:10 +08:00
Ethan Koenig
cf80e19157
Optimize and unit test Issue_ReplaceLabels ( #1080 )
2017-02-28 09:35:55 +08:00
Ethan Koenig
136e6beb0f
Fix unused Engine bugs ( #1064 )
2017-02-27 10:16:35 +08:00
Lunny Xiao
e4134debd1
Remove unused vars ( #1063 )
...
* remove unused vars
* remove unused comment
2017-02-27 09:22:15 +08:00
Lunny Xiao
32faec00e6
move all repo list functions as a standalone file ( #1061 )
2017-02-27 08:45:03 +08:00
Lunny Xiao
d4e38cf129
fix setMerged for remove unnecessary db connection ( #1067 )
2017-02-27 08:42:55 +08:00
Lunny Xiao
522f194983
Bug fixed for org avatar caused by #1049 ( #1070 )
...
* bug fixed for org avatar caused by #1049
* use isfile only
2017-02-27 08:42:22 +08:00
Bo-Yi Wu
95574a3640
fix: Admin can see all private repositories on Explore page. ( #1026 )
...
* fix: Admin can see all private repositories on Explore page.
* refactor: fix session
2017-02-26 13:59:31 +08:00
Sandro Santilli
bf24099114
Allow migrating installations with no local avatars ( #1056 )
2017-02-26 11:58:02 +08:00
Lunny Xiao
80f900ebae
Fix avatar enumable ( #1049 )
...
* fix avatar enumable
* fix import style
2017-02-25 22:58:57 +08:00
Lunny Xiao
19b3c45ca7
fix 500 when use a duplicat email instead of giving an error tip ( #1040 )
2017-02-25 22:57:06 +08:00
Lunny Xiao
cd1821a7e2
Move push update to post-receive and protected branch check to pre-receive ( #1030 )
...
* move all push update to git hook post-receive and protected branch check to git hook pre-receive
* add SSH_ORIGINAL_COMMAND check back
* remove all unused codes
* fix the import
2017-02-25 22:54:40 +08:00
Lunny Xiao
e8e56da9ac
fix #13 ( #1042 )
2017-02-25 22:53:57 +08:00
Andrey Nering
ddb0287bf6
Merge pull request #970 from andreynering/api-repo-mirror
...
Add "mirror" field to repo API
2017-02-25 11:35:03 -03:00
Lunny Xiao
fc4f7e82f9
refactor for searching user ( #1038 )
...
* refactor for searching user
* fix like bug
* better format for builder cond
2017-02-25 21:42:20 +08:00
Andrey Nering
946f3078d3
Add "mirror" field to repo API
2017-02-25 10:04:22 -03:00
Bo-Yi Wu
f1412142e0
refactor: repo counts for SearchRepositoryByName func ( #1045 )
2017-02-25 09:27:39 +08:00
Lunny Xiao
c0ea3963be
fix delete repo will hang on postgres ( #1044 )
2017-02-24 23:19:13 +08:00
Andrew Boyarshin
0602a44b27
Fix URL handling in the whole markdown module, improve test coverage ( #1027 )
...
Amended with string to bool change in API SDK.
Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
2017-02-24 22:59:56 +08:00
Ethan Koenig
76057105ca
Remove unnecessary loads in org_team ( #1035 )
2017-02-24 14:25:09 +08:00
Ethan Koenig
f1ab906c51
Unit tests for models/repo_collaboration ( #1032 )
2017-02-24 09:37:38 +08:00
bit
490d3771f7
s/fields/terms ( #1031 )
...
use terms instead of fields as variable name to avoid confusion: NewPhraseQuery(terms []string, field string)
2017-02-24 09:24:58 +08:00
Lunny Xiao
d077fd084a
added missing new struct sync ( #1021 )
2017-02-23 15:05:37 +08:00
Lunny Xiao
0e6b9ea786
Take back control of hooks ( #1006 )
...
* git: delegate all server-side Git hooks (#1623 )
* create hooks directories
* take control hooks back
* fix lint
* bug fixed and minor changes
* fix imports style
* fix migration scripts
2017-02-23 11:40:44 +08:00
Ethan Koenig
4f3880ff15
Bug fixes and unit tests for org_team ( #1016 )
2017-02-23 09:36:15 +08:00
Ethan Koenig
ec3a696e2d
Fix lint errors
2017-02-22 17:10:45 -05:00
Lunny Xiao
1f7837d6d6
Refactor for issues loadattributes of a repository ( #971 )
...
* refactor for issues loadattributes of a repository
* refactors
2017-02-22 22:03:59 +08:00
Bo-Yi Wu
83b6d03231
fix: Wrong repo list on Explore page if user already loggin. ( #1009 )
...
* fix: Wrong repo list on Explore page if user already loggin.
* fix: code readable.
* fix: declare variable
2017-02-22 21:15:14 +08:00
Willem van Dreumel
01d957677f
Oauth2 consumer ( #679 )
...
* initial stuff for oauth2 login, fails on:
* login button on the signIn page to start the OAuth2 flow and a callback for each provider
Only GitHub is implemented for now
* show login button only when the OAuth2 consumer is configured (and activated)
* create macaron group for oauth2 urls
* prevent net/http in modules (other then oauth2)
* use a new data sessions oauth2 folder for storing the oauth2 session data
* add missing 2FA when this is enabled on the user
* add password option for OAuth2 user , for use with git over http and login to the GUI
* add tip for registering a GitHub OAuth application
* at startup of Gitea register all configured providers and also on adding/deleting of new providers
* custom handling of errors in oauth2 request init + show better tip
* add ExternalLoginUser model and migration script to add it to database
* link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed
* remove the linked external account from the user his settings
* if user is unknown we allow him to register a new account or link it to some existing account
* sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers)
* from gorilla/sessions docs:
"Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!"
(we're using gorilla/sessions for storing oauth2 sessions)
* use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
2017-02-22 08:14:37 +01:00
Denis Denisov
fd941db246
Protected branches system ( #339 )
...
* Protected branches system
* Moved default branch to branches section (`:org/:reponame/settings/branches`).
* Initial support Protected Branch.
- Admin does not restrict
- Owner not to limit
- To write permission restrictions
* reformat tmpl
* finished the UI and add/delete protected branch response
* remove unused comment
* indent all the template files and remove ru translations since we use crowdin
* fix the push bug
2017-02-21 23:02:10 +08:00
Willem van Dreumel
5f234ce2a5
add missing copyright header ( #992 )
2017-02-21 08:46:14 +08:00
Lunny Xiao
04fdeb9d8d
Make Xorm log configurable ( #174 )
...
* make xorm log configable
* bug fixed for other sub commands except web
* rebase and fix xorm log
* bug fix for TrimSpace
2017-02-20 16:11:13 +08:00
Ethan Koenig
be48b32e63
Unit tests for repo watching ( #963 )
2017-02-17 16:02:11 +08:00
Lunny Xiao
847527fd6d
Fix all the bugs in issues and pulls on dashboard ( #943 )
...
* fix all the bugs in issues and pulls on dashboard
* small fix and refactor
* add method getRepoIDs for IssueList
2017-02-17 08:58:19 +08:00
Ethan Koenig
140967f002
Unit tests for repo redirects ( #961 )
2017-02-17 08:55:33 +08:00
Lunny Xiao
7fd14bf7bd
optimization for team get repos ( #953 )
2017-02-16 12:07:58 +08:00
Lunny Xiao
46320f9630
refactor notificationsForUser since xorm In support slice of customerize type ( #956 )
2017-02-16 12:07:00 +08:00
Lunny Xiao
0642cb330c
Small opitimization for getUserTeams ( #954 )
...
* Small opitimization for getUserTeams
* more compact
2017-02-16 12:06:23 +08:00
Bo-Yi Wu
43c94d0a6c
test: Add testing for GetUserFork function ( #944 )
2017-02-15 23:24:23 +08:00
Bo-Yi Wu
a31f64d639
fix: 500 error on /explore/repos page. ( #946 )
2017-02-15 22:28:11 +08:00
Bo-Yi Wu
9d2b830275
refactor: small optimize for sql query ( #940 )
...
* refactor: small optimize for sql query
* fix: get owner name if Searcher is not nil or user star page.
2017-02-15 14:01:50 +08:00
Lunny Xiao
837d346090
fix some older Gogs upgrade to Gitea ( #929 )
2017-02-15 09:32:03 +08:00
Lunny Xiao
9c645b54dc
bug fixed on issues and pulls
2017-02-15 01:17:07 +01:00
Lunny Xiao
4cfde304df
bug fixed for my repository ( #933 )
2017-02-14 23:37:44 +08:00
Lunny Xiao
7a9a5c8a69
Fix assigned issues dashboard ( #920 )
...
* Fix assigned/created issues in dashboard. (#3560 )
* 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.
* fix issues on dashboard
2017-02-14 22:15:18 +08:00
Lunny Xiao
3a91ac51a9
fix bug of multiple forks ( #928 )
2017-02-14 22:14:29 +08:00
Bo-Yi Wu
d67b278a0d
feat: Able to disable non-admin to create new organization ( #927 )
2017-02-14 20:16:00 +08:00
Bo-Yi Wu
23aba523b5
feat: support search bar on star tab of user profile. ( #917 )
...
* feat: support search bar on star tab of user profile.
* fix: update testing.
* fix: Using loadAttributes
* fix: remove empty line.
* remove LOWER
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-02-14 15:28:22 +08:00
Lunny Xiao
7eb8daffa3
Use fingerprint to check instead content for public key ( #911 )
...
* use fingerprint to check instead content for public key
* add fingerprint field for ErrKeyAlreadyExist
2017-02-14 14:12:52 +08:00
Lunny Xiao
55ae78208e
Small optimization for getTeamIDs ( #919 )
...
* small optimization for getTeamIDs
* rename getOrgTeamIDs to getUserTeamIDs and remove orderby
2017-02-14 11:46:46 +08:00
Bo-Yi Wu
1ec6b1a258
fix: gofmt error. ( #918 )
2017-02-14 10:12:03 +08:00
Bo-Yi Wu
5cc275b1de
feat: add git version on admin panel. ( #921 )
2017-02-13 19:49:42 +08:00
Ethan Koenig
076f940f1f
Fix logging bug
...
Error logged everytime an assignee was removed
2017-02-12 08:54:15 +01:00
Lunny Xiao
d76f34ef51
small optimization for get issue labels
2017-02-12 06:46:51 +01:00
Andrew
3f67676059
Implement basic Open Graph support. ( #901 )
2017-02-11 20:57:33 +08:00
Lunny Xiao
8a0be5e9f0
Bug fixed for deleted label in issue comment ( #904 )
...
* bug fixed for deleted label in issue comment
* fix indent
2017-02-11 20:56:57 +08:00
Morgan Bazalgette
442145dbd3
Fix public activity showing private repos ( #892 )
...
* Fix public activity showing private repos (#811 )
Signed-off-by: Morgan Bazalgette <the@howl.moe>
* error check after setting is_private to true
* Add test for UpdateRepository w/ visibility change
2017-02-11 18:57:57 +08:00
Andrew
42835c7f82
Implement archive cleanup ( #885 )
...
* Implement archive cleanup
Fixes #769
Signed-off-by: Andrew <write@imaginarycode.com>
* Make sure to close the directory file
* Resolve issues noted by @strk
* edit cheatsheet app.ini [ci skip]
* oops [ci skip]
2017-02-11 12:00:46 +08:00
Lunny Xiao
cf0f451c37
Add delete branch track on pull request comments ( #888 )
...
* add delete branch track on pull request comments
* don't change vendor
2017-02-11 12:00:29 +08:00
Lunny Xiao
b6dd6210ea
bug fixed for issue count ( #881 )
2017-02-09 17:59:57 +08:00
Ethan Koenig
a6751cec04
Unit tests for issue_milestone ( #878 )
2017-02-09 14:39:26 +08:00
Ethan Koenig
13973348df
Gogs -> Gitea ( #877 )
2017-02-09 13:44:18 +08:00
Ethan Koenig
e6b4448ba3
Fix bug in Issue.GetIsRead ( #876 )
2017-02-09 11:47:24 +08:00
Ethan Koenig
181c8d9c99
Fix consistency check ( #866 )
2017-02-08 14:29:21 +08:00
Ethan Koenig
d2329e1c26
Use assert in legacy unit tests ( #867 )
2017-02-08 14:29:07 +08:00
Ethan Koenig
5fbab97373
Fix broken test fixture ( #859 )
2017-02-07 22:49:37 +08:00
Bo-Yi Wu
b13232f524
feat: support paginater on star tab of user profile. ( #845 )
2017-02-07 19:54:16 +08:00
Ethan Koenig
ceae143e78
Consistency checks for unit tests ( #853 )
2017-02-07 19:47:55 +08:00
Bo-Yi Wu
71d35dae8c
fix: wrong pages number which includes private repository count. ( #844 )
2017-02-06 23:18:36 +08:00
Ethan Koenig
438e1a7d46
Fix inconsistencies in unit test fixtures
2017-02-05 22:43:31 -05:00
Lunny Xiao
f35b20b042
track issue title changes ( #841 )
2017-02-05 22:36:00 +08:00
Ethan Koenig
027591a3a5
Redirects for renamed repos ( #807 )
...
* Redirects for renamed repos
* Remove unused phrase from locales
2017-02-05 22:35:03 +08:00
Bwko
bf647ce143
Check for manual merging of a pull request ( #719 )
...
When an open pull request got manually merged mark the pull request as
merged
2017-02-05 21:07:44 +08:00
Andrey Nering
7c3dc51655
Merge pull request #839 from ethantkoenig/fix/remove_org_repo
...
Fix bug in removeOrgRepo
2017-02-04 14:55:02 -02:00
Ethan Koenig
f82ea42679
Fix bug in removeOrgRepo
2017-02-04 11:01:21 -05:00
Ethan Koenig
5972aa9af3
Fix inconsistencies in test fixtures
2017-02-04 11:01:06 -05:00
Lunny Xiao
8a421b1fd7
Add units concept for modulable functions of a repository ( #742 )
...
* Add units concept for modulable functions of a repository
* remove unused comment codes & fix lints and tests
* remove unused comment codes
* use struct config instead of map
* fix lint
* rm wrong files
* fix tests
2017-02-04 23:53:46 +08:00
Ethan Koenig
d0960b8035
Move IssueUser code to separate file ( #836 )
...
Also add unit tests
2017-02-04 20:37:26 +08:00
Andrey Nering
d4035d1cb1
Merge pull request #830 from appleboy/patch-2001
...
refactor: set default order by recently star on start tab
2017-02-04 10:32:55 -02:00
Bo-Yi Wu
a90a215662
feat: Add search bar on user profile page. ( #787 )
2017-02-04 20:20:20 +08:00
Bo-Yi Wu
b6da658553
test: Add user mail testing. ( #833 )
2017-02-04 09:20:56 +08:00
Lunny Xiao
3e0525b47d
Track assignee for issue ( #808 )
...
* track assignee for issue
* fix lint
* use getUserByID instead Get
2017-02-03 23:09:10 +08:00
Ethan Koenig
68bdaf0a6b
Drop redundant columns from issue_user table ( #638 )
2017-02-03 15:22:39 +08:00
Bo-Yi Wu
e2de16065a
refactor: set default order by recently star.
2017-02-03 12:03:49 +08:00
Gabriel Jackson
bf6f61cc69
Cleanup log messaging
...
This change corrects a few logging issues:
* Standardized formatting errors with '%v'.
* Standardized failure warning word usage.
* Corrected an instance of using the standard log library when
the gitea log library should be used instead.
2017-02-02 15:24:18 +01:00
Bo-Yi Wu
d7d094bd8a
fix: ignore email notifications if user is not active. ( #820 )
2017-02-02 20:33:36 +08:00
Anton Skorokhod
79ab69fe30
Add X-GitHub-* headers for webhook to get clubhouse.io integration working ( #809 )
2017-02-02 11:51:19 +08:00
Lunny Xiao
081485ecfd
add milestone changed traker on issue view ( #804 )
2017-02-01 10:36:08 +08:00
Ethan Koenig
10644d6dd7
Bug fixes and unit tests for models/issue_label ( #802 )
2017-02-01 09:31:35 +08:00