Commit Graph

7942 Commits (63c40796ef0b689350285c6aa6b5981e4a0844a9)

Author SHA1 Message Date
micw 63c40796ef Display description of 'make this repo private' as help text, not as tooltip (#8097) 2019-09-05 11:13:51 +02:00
nu_no 5fcef38f7f Fix broken link (#8091) 2019-09-05 00:31:43 +02:00
GiteaBot d0371ff058 [skip ci] Updated translations via Crowdin 2019-09-04 19:55:18 +00:00
Antoine GIRARD 9fe4437bda Use vendored go-swagger (#8087)
* Use vendored go-swagger

* vendor go-swagger

* revert un wanteed change

* remove un-needed GO111MODULE

* Update Makefile

Co-Authored-By: techknowlogick <matti@mdranta.net>
2019-09-04 22:53:54 +03:00
guillep2k 4cb1bdddc8 Strict name matching for Repository.GetTagID() (#8074)
* Strict name matching for Repository.GetTagID()

* Perform make swagger-check swagger-validate vendor

* Add test for GetTagID()
2019-09-04 08:48:17 +03:00
GiteaBot d9545f9ecc [skip ci] Updated translations via Crowdin 2019-09-03 17:29:10 +00:00
Mario Lubenka be29811f2f Fixes deformed emoji in pull request reviews (#8047)
* Fixes deformed emoji in pull request comments or reviews

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Generate css via command

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
2019-09-03 19:08:30 +02:00
GiteaBot 2bcd7f34e9 [skip ci] Updated translations via Crowdin 2019-09-03 15:48:35 +00:00
David Svantesson 1f951cdeba Add API endpoint for accessing repo topics (#7963)
* Create API endpoints for repo topics.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Generate swagger

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add documentation to functions

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Grammar fix

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix function comment

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics

* Ignore if topic is sent twice in same request, refactoring.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix topic dropdown with api changes.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Style fix

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Update API documentation

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Better way to handle duplicate topics in slice

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Make response element TopicName an array of strings, instead of using an array of TopicName

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add test cases for API Repo Topics.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix format of tests

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix comments

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix unit tests after adding some more topics to the test fixture.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Update models/topic.go

Limit multiple if else if ...

Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>

* Engine as first parameter in function

Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>

* Replace magic numbers with http status code constants.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix variable scope

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Test one read with login and one with token

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add some more tests

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Apply suggestions from code review

Use empty struct for efficiency

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

* Add test case to check access for user with write access

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix access, repo admin required to change topics

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Correct first test to be without token

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Any repo reader should be able to access topics.

* No need for string pointer

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
2019-09-03 23:46:24 +08:00
GiteaBot 99d6863238 [skip ci] Updated translations via Crowdin 2019-09-03 12:45:01 +00:00
Mura Li c027eac1d6 Avoid ambiguity of branch/directory names for the git-diff-tree command (#8066) 2019-09-03 15:42:01 +03:00
Lunny Xiao 6ed22ffd16 Add merged commit id on pull view when it's merged (#8062) 2019-09-03 09:29:36 +03:00
guillep2k 8ae96a37ce Add change title notification for issues (#8061) 2019-09-02 22:35:31 -04:00
Gary Kim ee11974719 Search Commits via Commit Hash (#7400)
* search commits via commit hash

Signed-off-by: Gary Kim <gary@garykim.dev>

* Also include all option for hash search

Signed-off-by: Gary Kim <gary@garykim.dev>

* Remove code duplication in commit search

Signed-off-by: Gary Kim <gary@garykim.dev>

* Add case ignore to commit hash search

Signed-off-by: Gary Kim <gary@garykim.dev>
2019-09-02 19:38:04 -04:00
guillep2k 6097ff68e7 Make encoding tests independent of LOCALE settings (#8018)
* Make encoding tests independent of LOCALE settings

* Fix fmt

* Force CI to restart
2019-09-02 19:08:07 -04:00
Mura Li 032c90e7c5 Add tooltip for the visibility checkbox in /repo/create (#8025)
* Add tooltip for the visibility checkbox in /repo/create

* Change the tooltip wording

* Update options/locale/locale_en-US.ini

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-09-02 18:29:04 -04:00
silverwind 577b1cb29b Update JS dependencies (#8051) 2019-09-02 17:02:53 -04:00
GiteaBot 5fc93b4005 [skip ci] Updated translations via Crowdin 2019-09-02 19:13:44 +00:00
guillep2k 765be70323 Make CI work (#8057)
* Use export GOPROXY=https://goproxy.cn before build

* Add go version to generate command

* Reproduced the entire build procedure - see notes

I've used:

sudo go clean -i -r -cache -testcache -modcache
make clean
make generate
make golangci-lint
make revive
make swagger-check
make swagger-validate
make test-vendor            <--- this now fails
make vendor                 <--- this now produced changes
git commit -a               <--- this commit

* Add fix from #8059 to complete CI tests
2019-09-02 15:12:29 -04:00
GiteaBot fe1a6a2d9a [skip ci] Updated translations via Crowdin 2019-09-02 16:14:21 +00:00
jaqra 016083b328 Add strike to old header on comment (#8046) 2019-09-03 00:11:23 +08:00
GiteaBot 0a1c824bc7 [skip ci] Updated translations via Crowdin 2019-08-29 21:33:03 +00:00
Km 18896d8df1 Propose some references about ci/cd solutions compatibles with gitea (#7996)
* Propose some references about ci/cd solutions compatibles with gitea

* No note about theirs integration level, only a starting point.

* Update docs/content/doc/advanced/ci-cd.en-us.md

Improve text

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

* Improve link to CI solutions

Update docs/content/doc/advanced/ci-cd.en-us.md

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

* Update docs/content/doc/advanced/ci-cd.en-us.md

Typo in name :/

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

* Remove redundant empty line

* Invite user to consult new CI/CD page

* Link target CI tools

* Jenkins and its plugin

* Update docs/content/doc/advanced/third-party-tools.en-us.md

Simplify link CI/CD

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

* Update docs/content/doc/advanced/ci-cd.en-us.md

Typo

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

* Provide gitea documentation about drone usage

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

* Update docs/content/doc/advanced/ci-cd.en-us.md

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

* Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-08-29 17:30:12 -04:00
Gary Kim f1c414882c Add Ability for User to Customize Email Notification Frequency (#7813)
* Add Backend Logic for Toggling Email Notification

This commit adds the backend logic for
allowing users to enable or disable email
notifications. The implementation ensures
that only issue notification emails get disabled
and important emails are still sent regardless
of the setting.

The UI to toggle this setting has not yet been
implemented.

* Add UI and complete user email notification enable

This commit completes the functionality to allow
users to disable their own email notifications.

Signed-off-by: Gary Kim <gary@garykim.dev>

* Add Third Option for Only Email on Mention

Signed-off-by: Gary Kim <gary@garykim.dev>

* Readd NOT NULL to new preference string

Signed-off-by: Gary Kim <gary@garykim.dev>

* Add Tests and Rewrite Comment

Signed-off-by: Gary Kim <gary@garykim.dev>

* Allow admin to set default email frequency

Signed-off-by: Gary Kim <gary@garykim.dev>

* Add new config option to docs

Signed-off-by: Gary Kim <gary@garykim.dev>

* Fix a few mistakes

Signed-off-by: Gary Kim <gary@garykim.dev>

* Only update required columns

Signed-off-by: Gary Kim <gary@garykim.dev>

* Simplify an error check

Signed-off-by: Gary Kim <gary@garykim.dev>

* Make email_notification_preference column in DB be VARCHAR(20)

Signed-off-by: Gary Kim <gary@garykim.dev>

* Handle errors

Signed-off-by: Gary Kim <gary@garykim.dev>

* Update models/migrations/v93.go

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-08-29 17:05:42 +03:00
Lauris BH 9ef1e5da27
Fix vendor modules.txt (#8032) 2019-08-29 16:16:09 +03:00
Antoine GIRARD 187ae109d0 Update to mod enabled version goquery (#8021)
* update to mod enabled version goquery

* manually set appengine new release
2019-08-29 11:18:42 +08:00
guillep2k cedb285e25 Update github.com/lafriks/xormstore and tidy up mod.go (#8020) 2019-08-28 23:17:14 +02:00
Mura Li dd3ba9bb6b Fix make-generate using non-vendor packages (#8008) 2019-08-28 22:18:15 +02:00
jaqra 13388258a4 Changed black to white for (read) number label on issue list (#8000)
* Changed black color to blue for read number label on issue list page

* Change color to white
2019-08-28 12:20:52 +02:00
Antoine GIRARD 256b178176
Update swagger to 0.20.1 (#8010)
* update swagger to 0.20.1

* fiw swagger version for validate
2019-08-28 08:55:22 +02:00
GiteaBot e0f95d1545 [skip ci] Updated translations via Crowdin 2019-08-28 02:26:14 +00:00
Lunny Xiao 5616356a0b keep blame view buttons sequence consistent with normal view when view a file (#8007) 2019-08-27 22:23:18 -04:00
GiteaBot 9a5c6f3da4 [skip ci] Updated translations via Crowdin 2019-08-27 23:01:14 +00:00
jaqra 245457d4d3 Move line number to :before attr to hide from search on browser (#8002)
* Move line number to :before attr to hide from search on browser

* Use same variable in WriteString

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-08-28 00:59:05 +02:00
GiteaBot a45909be90 [skip ci] Updated translations via Crowdin 2019-08-27 20:36:39 +00:00
kolaente b66b170199 Use "Pull Request" instead of "Merge Request" (#8003)
Signed-off-by: kolaente <k@knt.li>
2019-08-27 23:33:48 +03:00
dependabot[bot] ab0f378d7b Bump eslint-utils from 1.3.1 to 1.4.2 (#7993)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-27 00:29:25 -04:00
Richard Mahn 3302066f69 Fixes #7945 - makes sure we are only getting tag refs (#7990) 2019-08-26 23:11:24 -04:00
guillep2k 5fe2ec264f Retry create issue to cope with duplicate keys (#7898)
* Retry create issue to cope with duplicate keys

* Use  .SetExpr().Where().Insert()
2019-08-26 22:17:23 -04:00
Gary Kim 541fab196f Fix adding default Telegram webhook (#7972)
* Fix adding default Telegram webhook

Fixes #7932

Signed-off-by: Gary Kim <gary@garykim.dev>

* Run goimports

Signed-off-by: Gary Kim <gary@garykim.dev>
2019-08-26 18:59:10 -04:00
Richard Mahn bb5f7cdae6 Adds details about what tags can use the Git tags API (#7989) 2019-08-26 21:52:04 +02:00
Antoine GIRARD 954fe0e4e0
swagger/fix: []string are not enum by swagger definition (#7916)
* []string are not enum by swagger definition

* apply suggestion of @guillep2k

* re-generate swagger file
2019-08-26 20:13:10 +02:00
Mike Schwörer 042089fbaf API method to list all commits of a repository (#6408)
* Added API endpoint ListAllCommits (/repos/{owner}/{repo}/git/commits)

Signed-off-by: Mike Schwörer <mailport@mikescher.de>

* Fixed failing drone build

Signed-off-by: Mike Schwörer <mailport@mikescher.de>

* Implemented requested changes (PR reviews)

Signed-off-by: Mike Schwörer <mailport@mikescher.de>

* gofmt

Signed-off-by: Mike Schwörer <mailport@mikescher.de>

* Changed api route from "/repos/{owner}/{repo}/git/commits" to "/repos/{owner}/{repo}/commits"

* Removed unnecessary line

* better error message when git repo is empty

* make generate-swagger

* fixed removed return

* Update routers/api/v1/repo/commits.go

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

* Update routers/api/v1/repo/commits.go

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

* go fmt

* Refactored common code into ToCommit()

* made toCommit not exported

* added check for userCache == nil
2019-08-26 16:09:10 +02:00
Tamal Saha 6b3f52fe5f Run CORS handler first for /api routes (#7967)
Signed-off-by: Tamal Saha <tamal@appscode.com>
2019-08-26 13:33:06 +02:00
6543 5409dec8fd [Branch View] show "New Pull Request" Button only if posible (#7977)
* add check Commits Ahead is gt 0

* code format
to start drone-ci test again
and formate code is also nice :)
2019-08-26 13:47:41 +03:00
David Svantesson c9546d4cdd Include description in repository search. (#7942)
* Add description in repository search.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Refactor SearchRepositoryByName with a general function SearchRepository

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Allow to specify if description shall be included in API repo search.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add new app.ini setting for whether to search within repo description.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Search keyword in description (if setting enabled) on:
 - Explore page
 - Organization profile page
 - User profile page
 - Admin repo page

Do not search keyword in description on:
 - Any non-keyword search (not relevant)
 - Incremental search (uses API)

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Put parameters related to keyword directly after it

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add test cases for including (and not including) repository description in search.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Rename test function from TestSearchRepositoryByName to TestSearchRepository.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Make setting SEARCH_REPO_DESCRIPTION default to true

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
2019-08-25 20:06:36 +03:00
David Svantesson 8c24bb9e43 Abort syncrhonization from LDAP source if there is some error. (#7960)
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
2019-08-24 21:53:37 +03:00
guillep2k e3115cc019 Add support for DEFAULT_ORG_MEMBER_VISIBLE (#7669)
* Add support for DEFAULT_ORG_MEMBER_VISIBLE

* Correct formatting

* Improved description in cheat sheet.

* Add test for DefaultOrgMemberVisible

* Remove dead code
2019-08-24 15:28:59 +03:00
Lunny Xiao f83db078f0 Move database settings from models to setting (#7806)
* move database settings from models to setting

* update docs

* fix checkout pr

* fix tests

* fix lint

* remove unsupported tidb options

* correct wrong variable name

* remove tidb totally
2019-08-24 11:24:45 +02:00
David Svantesson 26af3401c3 Document possibility to limit API Repo search to topics only. (#7957)
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
2019-08-23 23:17:10 -04:00