aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-142-2/+35
|
* Add test for git + git lfs (#9753)guillep2k2020-01-141-6/+13
|
* Restricted users (#6274)Manush Dodunekov2020-01-1331-124/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Restricted users (#4334): initial implementation * Add User.IsRestricted & UI to edit it * Pass user object instead of user id to places where IsRestricted flag matters * Restricted users: maintain access rows for all referenced repos (incl public) * Take logged in user & IsRestricted flag into account in org/repo listings, searches and accesses * Add basic repo access tests for restricted users Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Mention restricted users in the faq Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert unnecessary change `.isUserPartOfOrg` -> `.IsUserPartOfOrg` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Remove unnecessary `org.IsOrganization()` call Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert to an `int64` keyed `accessMap` * Add type `userAccess` * Add convenience func updateUserAccess() * Turn accessMap into a `map[int64]userAccess` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * or even better: `map[int64]*userAccess` * updateUserAccess(): use tighter syntax as suggested by lafriks * even tighter * Avoid extra loop * Don't disclose limited orgs to unauthenticated users * Don't assume block only applies to orgs * Use an array of `VisibleType` for filtering * fix yet another thinko * Ok - no need for u * Revert "Ok - no need for u" This reverts commit 5c3e886aabd5acd997a3b35687d322439732c200. Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* [API] Add "before" query to ListIssueComments and ListRepoIssue… (#9685)65432020-01-135-14/+73
| | | | | | | | | * add "before" query to ListIssueComments and ListRepoIssueComments * Add TEST Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-131-0/+2
|
* ci: go back to golangci-lint 1.20.0 (#9742)Antoine GIRARD2020-01-131-1/+1
| | | Revert https://github.com/go-gitea/gitea/pull/9711
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-131-1/+28
|
* ci: re-ordering Drone CI for optimizing time (#9719)Antoine GIRARD2020-01-131-81/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try offloading mysql8 to arm64 * Revert "ci: try offloading mysql8 to arm64" This reverts commit c60de5db1cf8b5984c3014a57da6490f06c8d980. * ci: try offloading pgsql to arm64 * ci: activate ldap on arm64 * ci: test mysql8 in place pgsql arm64 * chore: clean un-needed move * typo * ci: revert runnning mysql on arm64 * ci: run compliance on arm * chore: limit change * chore: readd maybe need for release fetch-tags * ci: remove docker-linux-amd64-dry-run * ci: remove docker-linux-amd64-dry-run * Revert "ci: remove docker-linux-amd64-dry-run" This reverts commit 0715f65b11c37869359aaaa5d22901da512e8184. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* add package-lock=true in .npmrc (#9736)silverwind2020-01-131-0/+1
| | | | | | | | | | Some users (like me) have this option disabled in their global npm config which can lead to package-lock.json not being updated. This explicitely enables the option for this repo, so that the file is always updated when adding/removing dependencies. Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* ci: use docker image for golangci-lint (#9737)Antoine GIRARD2020-01-121-1/+6
|
* fix webpack polyfills (#9735)silverwind2020-01-121-1/+1
| | | | | | | | | | | | webpack polyfills did not work because useBuiltIns: 'entry' expects a explicit core-js import. Changed it to 'usage' which does not require these explicit imports and polyfills based on browserslist. As a result, the built index.js now went from 128kB to 192kB. Ref: https://babeljs.io/docs/en/babel-preset-env#usebuiltins Co-authored-by: zeripath <art27@cantab.net>
* remove deprecated targets from Makefile (#9729)silverwind2020-01-121-24/+0
| | | | | | | - remove deprecated targets - ensure 1 empty line between targets Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-121-0/+54
|
* [API] add GET /orgs endpoint (#9560)65432020-01-128-9/+108
| | | | | | | | | | | | | | * introduce `GET /orgs` * add TEST * show also other VisibleType's * update description * refactor a lot * SearchUserOptions by default return only public
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-121-1/+35
|
* Move create/fork repository from models to modules/repository (#9489)Lunny Xiao2020-01-1222-794/+894
| | | | | | | | | | | | | | | | | | | | * 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
* Add owner_name column for table repository for maintaince reason (#9717)Lunny Xiao2020-01-1218-102/+129
| | | | | | | | | | | | | | * 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>
* Make hook status printing configurable with delay (#9641)zeripath2020-01-123-26/+128
| | | | | | | | | | | | | | * 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>
* [BugFix] [API] ​/repos​/issues​/search (#9698)65432020-01-122-12/+61
| | | | | | | | | | * fix * fix options * add TEST Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* silence fomantic error regarding tabs (#9713)silverwind2020-01-121-0/+3
| | | | | | | 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.
* golangci-lint 1.22.2 (#9711)techknowlogick2020-01-111-1/+1
|
* Remove unused lock (#9709)zeripath2020-01-112-1/+3
|
* Missed q.lock.Unlock() will cause panic (#9705)zeripath2020-01-111-1/+0
|
* Add a new command doctor to check if some wrong configurations on gitea ↵Lunny Xiao2020-01-113-0/+156
| | | | | | | | | | | | | | 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
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-1112-14/+52
|
* Restore IsPasswordSet previous value (#9682)zeripath2020-01-111-1/+1
|
* Allow repo admin to merge PR regardless of review status (#9611)David Svantesson2020-01-1113-119/+231
| | | | * Allow repo admin to merge even if review is not ok.
* Move tracked time api convert to convert package (#9665)Lunny Xiao2020-01-103-34/+44
|
* Don't attempt to close issue if already closed (#9696)guillep2k2020-01-112-5/+9
| | | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Remove deprecation comment for CreateOrgRepo (#9670)Ryan2020-01-102-2/+0
| | | | Remove mistakenly added `deprecated: true` swagger comment from the `/orgs/{orgr}/repos` handler
* Load milestone in API PR list (#9671)John Olheiser2020-01-101-1/+2
| | | | | | | | | | | | | | * 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>
* Remove un-needed script import since #9554 (#9694)Antoine GIRARD2020-01-101-1/+0
| | | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix wrong original git service type on a migrated repository (#9693)Lunny Xiao2020-01-107-44/+76
|
* update js dependencies (#9676)silverwind2020-01-102-1201/+2073
| | | | | Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move push commits from models to modules/repository (#9370)Lunny Xiao2020-01-1020-436/+482
| | | | | | | | | | | | | | | | * 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>
* Move pull request api convert to convert package (#9664)Lunny Xiao2020-01-107-160/+198
| | | | | | * Move pull request api convert to convert package * Rename ToPullRequest to ToAPIPullRequest
* Fix lint (#9688)Lunny Xiao2020-01-102-2/+4
|
* Move Errored PRs out of StatusChecking (#9675)zeripath2020-01-102-1/+6
| | | | | | | | | | | | * 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>
* Prevent redirect to Host (#9678)zeripath2020-01-091-1/+2
|
* remove google font call (#9668)techknowlogick2020-01-092-3/+1
|
* eliminate horizontal scroll caused by footer (#9669)silverwind2020-01-091-0/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-091-0/+14
|
* [API] creat org repo call same as github (#9186)65432020-01-093-11/+84
| | | | | | | | | | | | | | | * 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>
* chore(PR): Add Reviewed-on in commit message (#9623)Bo-Yi Wu2020-01-091-3/+3
|
* [API] orgEditTeam make Fields optional (#9556)65432020-01-094-26/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [skip ci] Updated translations via CrowdinGiteaBot2020-01-091-0/+2
|
* [API] Add notification endpoint (#9488)65432020-01-0915-28/+1124
| | | | | | | | | | | | | | | | | | | | | | | | | * [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
* Fix nil reference in repo generation (#9660)John Olheiser2020-01-091-29/+31
| | | | | | | | | | * Fix nil reference Signed-off-by: jolheiser <john.olheiser@gmail.com> * Tighten Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532)David Svantesson2020-01-0918-40/+241
| | | | | | | 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
* Add HTML URL to API Issues (#9654)John Olheiser2020-01-087-4/+10
| | | | | | | | | | | | * 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>