Commit Graph

8766 Commits

Author SHA1 Message Date
Manush Dodunekov 5c3e886aab Ok - no need for u 2020-01-12 18:25:02 +01:00
Manush Dodunekov 095bfa6139 Merge master & resolve conflicts 2020-01-12 18:06:10 +01:00
GiteaBot 625057c674 [skip ci] Updated translations via Crowdin 2020-01-12 16:34:48 +00:00
6543 10055bd2b1 [API] add GET /orgs endpoint (#9560)
* introduce `GET /orgs`

* add TEST

* show also other VisibleType's

* update description

* refactor a lot

* SearchUserOptions by default return only public
2020-01-12 23:43:44 +08:00
GiteaBot 497e15fdc2 [skip ci] Updated translations via Crowdin 2020-01-12 12:12:40 +00:00
Lunny Xiao b465d0d787
Move create/fork repository from models to modules/repository (#9489)
* Move create/fork repository from models to modules/repository

* fix wrong reference

* fix test

* fix test

* fix lint

* Fix DBContext

* remove duplicated TestMain

* fix lint

* fix conflicts
2020-01-12 20:11:17 +08:00
Lunny Xiao 5765212c6d
Add owner_name column for table repository for maintaince reason (#9717)
* Add owner_name column for table repository for maintaince reason

* refactor

* Fix tests

* fix test

* fix bug when fork repository

Co-authored-by: zeripath <art27@cantab.net>
2020-01-12 17:36:21 +08:00
zeripath 65baacf227
Make hook status printing configurable with delay (#9641)
* Delay printing hook statuses until after 1 second

* Move to a 5s delay, wrapped writer structure and add config

* Update cmd/hook.go

* Apply suggestions from code review

* Update cmd/hook.go

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-01-12 08:46:03 +00:00
6543 83f9359a75 [BugFix] [API] ​/repos​/issues​/search (#9698)
* fix

* fix options

* add TEST

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-01-12 14:35:11 +08:00
silverwind 86464de0c1 silence fomantic error regarding tabs (#9713)
Fomantic expects all tabs to have a target element with content as
defined by the data-tab attribute. All our usage of the tab module seems
to use <a> element tabs that link to new pages so these content elements
are never present and fomantic complains about that in the console with
an "Activated tab cannot be found" error. This silences that error.
2020-01-12 03:57:32 +01:00
techknowlogick fef49f5e2e golangci-lint 1.22.2 (#9711) 2020-01-11 22:33:40 +02:00
zeripath 960ac36099
Remove unused lock (#9709) 2020-01-11 19:06:35 +00:00
zeripath edd31770aa
Missed q.lock.Unlock() will cause panic (#9705) 2020-01-11 17:05:07 +00:00
Lunny Xiao f69f5a9f10 Add a new command doctor to check if some wrong configurations on gitea instance (#9095)
* add doctor

* Add a new command doctor to check if some wrong configurations on gitea instance

* fix import

* use regex match authorized_keys on doctor

* Add documentation
2020-01-11 15:24:57 +01:00
GiteaBot f2e6c4538e [skip ci] Updated translations via Crowdin 2020-01-11 10:51:31 +00:00
zeripath eadb45e891 Restore IsPasswordSet previous value (#9682) 2020-01-11 18:50:05 +08:00
Lauris BH 5ae6016fd9
Merge branch 'master' into feature/restricted-users 2020-01-11 12:34:38 +02:00
David Svantesson 32fb813133 Allow repo admin to merge PR regardless of review status (#9611)
* Allow repo admin to merge even if review is not ok.
2020-01-11 02:29:34 -05:00
Lunny Xiao 4d06d10dba Move tracked time api convert to convert package (#9665) 2020-01-10 21:59:41 -05:00
guillep2k 705b1e49a8 Don't attempt to close issue if already closed (#9696)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-11 09:20:11 +08:00
Manush Dodunekov d775c3b22b fix yet another thinko 2020-01-11 01:58:45 +01:00
Ryan 438e159d04 Remove deprecation comment for CreateOrgRepo (#9670)
Remove mistakenly added `deprecated: true` swagger comment from the `/orgs/{orgr}/repos` handler
2020-01-10 16:54:46 -05:00
John Olheiser 480ef9d410 Load milestone in API PR list (#9671)
* Load milestone for Issue API format

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move further down

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
2020-01-10 16:17:56 -05:00
Antoine GIRARD e90e435f04 Remove un-needed script import since #9554 (#9694)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-10 15:36:32 -05:00
Manush Dodunekov 57744b54c4 merge upstream & fix conflicts 2020-01-10 19:06:42 +01:00
Lunny Xiao 7a3a90aca3
Fix wrong original git service type on a migrated repository (#9693) 2020-01-10 23:35:17 +08:00
silverwind 3143bb10da update js dependencies (#9676)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-10 13:39:01 +01:00
Lunny Xiao 99d869fa63
Move push commits from models to modules/repository (#9370)
* Move push commits from models to modules/repository

* fix test

* fix test

* fix test

* fix test

* fix test

Co-authored-by: zeripath <art27@cantab.net>
2020-01-10 17:34:21 +08:00
Lunny Xiao 384c2b342e
Move pull request api convert to convert package (#9664)
* Move pull request api convert to convert package

* Rename ToPullRequest to ToAPIPullRequest
2020-01-10 15:53:53 +08:00
Lunny Xiao 8878cfa4a1
Fix lint (#9688) 2020-01-10 13:50:23 +08:00
zeripath 17b844a3ec Move Errored PRs out of StatusChecking (#9675)
* Set Errored PRs out of StatusChecking

* Ensure that api status is correctly set too

* Update models/pull.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
2020-01-10 08:14:14 +08:00
zeripath 6c46a56360 Prevent redirect to Host (#9678) 2020-01-09 16:34:25 -05:00
techknowlogick 8f31c2fc76
remove google font call (#9668) 2020-01-09 15:48:47 -05:00
silverwind b3722114ce eliminate horizontal scroll caused by footer (#9669) 2020-01-09 19:33:39 +00:00
GiteaBot a311ace354 [skip ci] Updated translations via Crowdin 2020-01-09 16:43:29 +00:00
6543 e8ea0695b0 [API] creat org repo call same as github (#9186)
* deprecate /api/v1/org/{org}/repos in favour of /api/v1/orgs/{org}/repos + cleanup api repository routes a bit

* remove redundant code

* use upstream function for api cal

* make generate-swagger

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-09 16:40:01 +00:00
Bo-Yi Wu 07520431ae chore(PR): Add Reviewed-on in commit message (#9623) 2020-01-09 14:31:09 +00:00
6543 1080c768d3 [API] orgEditTeam make Fields optional (#9556)
* API: orgEditTeam make Fields optional

* add TestCase

* Update integrations/api_team_test.go

* suggestions from lafriks

use len() to check if string is empty

Co-Authored-By: Lauris BH <lauris@nix.lv>

* change ...

* use Where not ID to get mssql

* add return and code format

* fix test

* fix test ... null pointer exept

* update specific colums

* only specific colums too

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-09 13:15:14 +00:00
GiteaBot 71fe018977 [skip ci] Updated translations via Crowdin 2020-01-09 11:58:47 +00:00
6543 6baa5d7588 [API] Add notification endpoint (#9488)
* [API] Add notification endpoints

 * add func GetNotifications(opts FindNotificationOptions)
 * add func (n *Notification) APIFormat()
 * add func (nl NotificationList) APIFormat()
 * add func (n *Notification) APIURL()
 * add func (nl NotificationList) APIFormat()
 * add LoadAttributes functions (loadRepo, loadIssue, loadComment, loadUser)
 * add func (c *Comment) APIURL()
 * add func (issue *Issue) GetLastComment()
 * add endpoint GET /notifications
 * add endpoint PUT /notifications
 * add endpoint GET /repos/{owner}/{repo}/notifications
 * add endpoint PUT /repos/{owner}/{repo}/notifications
 * add endpoint GET /notifications/threads/{id}
 * add endpoint PATCH /notifications/threads/{id}

* Add TEST

* code format

* code format
2020-01-09 11:56:32 +00:00
Manush Dodunekov eeecdab5db Use an array of `VisibleType` for filtering 2020-01-09 09:15:10 +01:00
Manush Dodunekov ee2f31f32b Don't assume block only applies to orgs 2020-01-09 08:43:15 +01:00
Manush Dodunekov b788ef32ff Don't disclose limited orgs to unauthenticated users 2020-01-09 08:28:11 +01:00
Manush Dodunekov 3459547fca merge upstream, resolve migration conflicts 2020-01-09 07:51:45 +01:00
John Olheiser ee9ce0cfa9 Fix nil reference in repo generation (#9660)
* Fix nil reference

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Tighten

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-01-09 08:22:37 +02:00
David Svantesson 25531c71a7 Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532)
Fix #5997.

If a push causes the patch/diff of a PR towards target branch to change, all existing reviews for the PR will be set and shown as stale.
New branch protection option to dismiss stale approvals are added.
To show that a review is not based on the latest PR changes, an hourglass is shown
2020-01-09 01:47:45 +00:00
Manush Dodunekov 7d74b8596c Avoid extra loop 2020-01-09 01:37:39 +01:00
Manush Dodunekov 7d17aad805 even tighter 2020-01-09 00:31:40 +01:00
Manush Dodunekov 10de9b6b89 updateUserAccess(): use tighter syntax as suggested by lafriks 2020-01-09 00:12:43 +01:00
John Olheiser 5b2d9333f1 Add HTML URL to API Issues (#9654)
* Add HTML URL to API Issues

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Swagger

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-08 23:10:34 +00:00