]> source.dussan.org Git - gitea.git/log
gitea.git
4 years agoAdopt repositories (#12920)
zeripath [Fri, 25 Sep 2020 04:09:23 +0000 (05:09 +0100)]
Adopt repositories (#12920)

* Don't automatically delete repository files if they are present

Prior to this PR Gitea would delete any repository files if they are
present during creation or migration. This can in certain circumstances
lead to data-loss and is slightly unpleasant.

This PR provides a mechanism for Gitea to adopt repositories on creation
and otherwise requires an explicit flag for deletion.

PushCreate is slightly different - the create will cause adoption if
that is allowed otherwise it will delete the data if that is allowed.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix tests and migrate overwrite

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @lunny

Only offer to adopt or overwrite if the user can do that.

Allow the site administrator to adopt or overwrite in all
circumstances

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Use setting.Repository.DefaultBranch for the default branch

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Always set setting.Repository.DefaultBranch

Signed-off-by: Andrew Thornton <art27@cantab.net>
* update swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>
* update templates

Signed-off-by: Andrew Thornton <art27@cantab.net>
* ensure repo closed

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Rewrite of adoption as per @6543 and @lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Apply suggestions from code review

* update swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>
* missing not

Signed-off-by: Andrew Thornton <art27@cantab.net>
* add modals and flash reporting

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make the unadopted page searchable

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add API

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Handle empty and non-master branched repositories

Signed-off-by: Andrew Thornton <art27@cantab.net>
* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove commented out code

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFixed count of filtered issues when api request. (#12275)
ひのしば / hinoshiba [Thu, 24 Sep 2020 23:30:40 +0000 (08:30 +0900)]
Fixed count of filtered issues when api request. (#12275)

* Improved total count of issue when filtered.

* Fixed size of slice when  selected 1 repository.

* Improved function of error check.

* improved comment

* Added parameter of return header.

Co-authored-by: 6543 <6543@obermui.de>
* Updated corresponded to the current vendored of "xorm.io/xorm".

* Dedublicated it by store the Options Struct into a variable.

* format code

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

Co-authored-by: 6543 <6543@obermui.de>
* Update routers/api/v1/repo/issue.go

Co-authored-by: 6543 <6543@obermui.de>
* Updated number of range.

Co-authored-by: 6543 <6543@obermui.de>
* Updated number of range.

Co-authored-by: 6543 <6543@obermui.de>
* Removed total value.

* make fmt

* Improved value of sql.

Co-authored-by: zeripath <art27@cantab.net>
* Improved value of sql.

* improved message

* improved message

* improved message

* fixed message

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 24 Sep 2020 22:38:04 +0000 (22:38 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAPI: GetReleaseByID return 404 if not found (#12933)
6543 [Thu, 24 Sep 2020 22:36:56 +0000 (00:36 +0200)]
API: GetReleaseByID return 404 if not found (#12933)

* API: GetReleaseByID return 404 if not found

* update swagger docs

4 years agoFix Create Repository Template (#12924)
6543 [Wed, 23 Sep 2020 21:53:06 +0000 (23:53 +0200)]
Fix Create Repository Template (#12924)

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 23 Sep 2020 20:26:51 +0000 (20:26 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix handling of migration errors (#12928)
zeripath [Wed, 23 Sep 2020 20:25:46 +0000 (21:25 +0100)]
Fix handling of migration errors (#12928)

* Fix handling of migration errors

The migration type selection screen PR did not correctly handle errors
and any user input error on the migration page would simply redirect
back to the selection page. This meant that the error would simply be
lost and the user would be none the wiser as to what happened.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* make gen-swagger

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 22 Sep 2020 17:03:23 +0000 (17:03 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoupdate revive lint to latest commit (#12921)
techknowlogick [Tue, 22 Sep 2020 17:02:16 +0000 (13:02 -0400)]
update revive lint to latest commit (#12921)

* update revive lint to latest commit

* make fmt

* change import

4 years agoDisable migration items when mirror is selected (#12918)
mrsdizzie [Mon, 21 Sep 2020 22:42:22 +0000 (18:42 -0400)]
Disable migration items when mirror is selected (#12918)

* Disable migration items when mirror is selected

Disable migration items when mirror option is selected to make it more clear that it isn't possible to mirror anything other than code.

* allow wiki checkbox for mirrors

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 21 Sep 2020 14:37:57 +0000 (14:37 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoHopefully support GH enterprise (#12863)
John Olheiser [Mon, 21 Sep 2020 14:36:51 +0000 (09:36 -0500)]
Hopefully support GH enterprise (#12863)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoAPI: NotificationSubject show Issue/Pull State (#12901)
6543 [Sun, 20 Sep 2020 23:10:53 +0000 (01:10 +0200)]
API: NotificationSubject show Issue/Pull State (#12901)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 20 Sep 2020 21:56:51 +0000 (21:56 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix ListUserOrgs (#12910)
赵智超 [Sun, 20 Sep 2020 21:55:48 +0000 (05:55 +0800)]
Fix ListUserOrgs (#12910)

fix #12891

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 20 Sep 2020 20:21:12 +0000 (20:21 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoNot using "ctx.ServerError" in api (#12907)
赵智超 [Sun, 20 Sep 2020 20:20:14 +0000 (04:20 +0800)]
Not using "ctx.ServerError" in api (#12907)

This function will render a whole html page which is not useful for API.

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 20 Sep 2020 17:56:20 +0000 (17:56 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUpdate only the repository columns that need updating (#12900)
zeripath [Sun, 20 Sep 2020 17:55:15 +0000 (18:55 +0100)]
Update only the repository columns that need updating (#12900)

We should only update is_empty, default_branch and updated time columns
during commitRepoAction and not update other columns as we risk
overwriting incorrect information.

Fix #11823
Fix #10536

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 19 Sep 2020 23:22:29 +0000 (23:22 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd the checkbox quick button to the comment tool bar also (#12885)
赵智超 [Sat, 19 Sep 2020 23:21:22 +0000 (07:21 +0800)]
Add the checkbox quick button to the comment tool bar also (#12885)

Just copy it from the WIKI tool bar :)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 19 Sep 2020 16:45:53 +0000 (16:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd configurable Trust Models (#11712)
zeripath [Sat, 19 Sep 2020 16:44:55 +0000 (17:44 +0100)]
Add configurable Trust Models (#11712)

* Add configurable Trust Models

Gitea's default signature verification model differs from GitHub. GitHub
uses signatures to verify that the committer is who they say they are -
meaning that when GitHub makes a signed commit it must be the committer.
The GitHub model prevents re-publishing of commits after revocation of a
key and prevents re-signing of other people's commits to create a
completely trusted repository signed by one key or a set of trusted
keys.

The default behaviour of Gitea in contrast is to always display the
avatar and information related to a signature. This allows signatures to
be decoupled from the committer. That being said, allowing arbitary
users to present other peoples commits as theirs is not necessarily
desired therefore we have a trust model whereby signatures from
collaborators are marked trusted, signatures matching the commit line
are marked untrusted and signatures that match a user in the db but not
the committer line are marked unmatched.

The problem with this model is that this conflicts with Github therefore
we need to provide an option to allow users to choose the Github model
should they wish to.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Adjust locale strings

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @6543

Co-authored-by: 6543 <6543@obermui.de>
* Update models/gpg_key.go

* Add migration for repository

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 18 Sep 2020 17:51:09 +0000 (17:51 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix panic when adding long comment (#12892)
mrsdizzie [Fri, 18 Sep 2020 17:50:06 +0000 (13:50 -0400)]
Fix panic when adding long comment (#12892)

Previous PR #12881 causes out of bounds panic by working on wrong string.

4 years agoSwitch to absolute latest pq driver (#12859)
zeripath [Fri, 18 Sep 2020 14:38:46 +0000 (15:38 +0100)]
Switch to absolute latest pq driver (#12859)

This PR updates the lib/pq driver to the current master head to
pick up the deadlock fix in lib/pq#993

Hopefully this will resolve our CI issues.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 18 Sep 2020 12:10:52 +0000 (12:10 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRefactor: move Commit To APIFormat Code & Lot of StopWatch related things (#12729)
6543 [Fri, 18 Sep 2020 12:09:26 +0000 (14:09 +0200)]
Refactor: move Commit To APIFormat Code & Lot of StopWatch related things (#12729)

* move GitCommit to APIFormat convertion into convert package

* rename Commit convert functions

* move stopwatch to api convertion into convert package & rm unused code & extend test

* fix compare time

* Gitea not Gogs ;)

4 years agoAdd size limit for content of comment on action ui (#12881)
赵智超 [Fri, 18 Sep 2020 07:38:21 +0000 (15:38 +0800)]
Add size limit for content of comment on action ui (#12881)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoFix pgsql migration test (#12844)
Lunny Xiao [Fri, 18 Sep 2020 01:36:14 +0000 (09:36 +0800)]
Fix pgsql migration test (#12844)

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoConvert User expose ID each time (#12855)
6543 [Thu, 17 Sep 2020 21:33:23 +0000 (23:33 +0200)]
Convert User expose ID each time (#12855)

* git blame tells me a lot of gitea things happen here around 2018, add header

* move user code int its own file

* expose user id

* adopt things from APIFormat

* fix test

* CI.restart()

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 17 Sep 2020 18:25:33 +0000 (18:25 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoSupport slashes in release tags (#12864)
zeripath [Thu, 17 Sep 2020 18:24:23 +0000 (19:24 +0100)]
Support slashes in release tags (#12864)

Fix #12861

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoUse a simple format for the big number on ui (#12822)
赵智超 [Wed, 16 Sep 2020 04:07:18 +0000 (12:07 +0800)]
Use a simple format for the big number on ui (#12822)

* Use a simple format for the big number on ui

Signed-off-by: a1012112796 <1012112796@qq.com>
* make fmt

* Apply review suggestion @silverwind

* Change name 2

* make fmt

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoAdd ui style for "Open a blank issue" button (#12824)
赵智超 [Wed, 16 Sep 2020 02:07:09 +0000 (10:07 +0800)]
Add ui style for "Open a blank issue" button (#12824)

* Add ui style for "Open a blank issue" button

Signed-off-by: a1012112796 <1012112796@qq.com>
* Apply review suggestion @silverwind

* format

* format 2

* fix message

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 15 Sep 2020 23:50:35 +0000 (23:50 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoSimplify CheckUnitUser logic (#12854)
赵智超 [Tue, 15 Sep 2020 23:49:34 +0000 (07:49 +0800)]
Simplify CheckUnitUser logic (#12854)

if check one user's unit in different repos, it's not necessary to
get user data every time.

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix [API] [Bug] CreateRepo missing information (#12848)
6543 [Tue, 15 Sep 2020 22:42:19 +0000 (00:42 +0200)]
Fix [API] [Bug] CreateRepo missing information (#12848)

* Fix [API] [Bug] CreateRepo missing information

* add code comment

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoAdd migration for password algorithm change (#12784)
zeripath [Tue, 15 Sep 2020 22:02:41 +0000 (23:02 +0100)]
Add migration for password algorithm change (#12784)

* Add migration for password algorithm change

#12688 changed the default for the user table leading to sync2 warnings

Unfortunately changing defaults requires a complete table rewrite in general.

However, just dropping columns could be bad - so this PR leverages the
techniques used in recreate table to recreate from the inferred schema
and recreates the user table.

This is not necessarily the correct thing to do - but code sometimes speaks
louder than words.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* oops

Signed-off-by: Andrew Thornton <art27@cantab.net>
* ok lets use the shorter bits for other dbs

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/migrations/v150.go

* Update models/migrations/v150.go

* fix migration

Signed-off-by: Andrew Thornton <art27@cantab.net>
* mv v150 to v151.go

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix line selection on blame view (#12857)
mrsdizzie [Tue, 15 Sep 2020 20:43:05 +0000 (16:43 -0400)]
Fix line selection on blame view (#12857)

Blame and regular code view have diverge slightly so line highlighting wasn't working properly anymore. Make work again in lieu of a larger refactor of blame HTML to move it outside of source and into templates to match code view.

Fixes #12836

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix anonymous GL migration (#12862)
John Olheiser [Tue, 15 Sep 2020 19:32:14 +0000 (14:32 -0500)]
Fix anonymous GL migration (#12862)

* Fix anonymous GL migration

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Rely on password instead

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoDon't keep running SetEngine in migration_test (#12860)
zeripath [Tue, 15 Sep 2020 18:44:52 +0000 (19:44 +0100)]
Don't keep running SetEngine in migration_test (#12860)

There's no need to keep repeatedly running SetEngine in migration_test,
as NewEngine calls it anyway.

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 15 Sep 2020 14:38:30 +0000 (14:38 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoOn Migration respect old DefaultBranch (#12843)
6543 [Tue, 15 Sep 2020 14:37:44 +0000 (16:37 +0200)]
On Migration respect old DefaultBranch (#12843)

* On Migration respect old DefaultBranch

* add DefaultBranch int test set

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 15 Sep 2020 11:29:56 +0000 (11:29 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix notifications page links (#12838)
zeripath [Tue, 15 Sep 2020 06:06:08 +0000 (07:06 +0100)]
Fix notifications page links (#12838)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoStop cloning unnecessarily on PR update (#12839)
zeripath [Tue, 15 Sep 2020 03:32:31 +0000 (04:32 +0100)]
Stop cloning unnecessarily on PR update (#12839)

* Stop cloning unnecessarily on PR update

Fix #12740

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove unnecessary delete

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoFix external renderers example (#12841)
Johan Van de Wauw [Mon, 14 Sep 2020 22:11:11 +0000 (00:11 +0200)]
Fix external renderers example (#12841)

* libffi-dev is required for building jupyter
* matplotlib can not be installed using wheels on the used version of alpine
  linux, which means it must be compiled and  a large number of other packages
  have to be installed as well.
  This is very inefficient: see eg.
  https://pythonspeed.com/articles/alpine-docker-python/

  Apart from that, matplotlib is actually not required for rendering
  notebook files in gitea and it will pull in other dependencies which take some
  time to build (ie numpy).

4 years agoFix background of signed-commits on arc-green (#12837)
zeripath [Mon, 14 Sep 2020 20:18:04 +0000 (21:18 +0100)]
Fix background of signed-commits on arc-green (#12837)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 14 Sep 2020 18:43:45 +0000 (18:43 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix git open close bug (#12834)
Lunny Xiao [Mon, 14 Sep 2020 18:42:40 +0000 (02:42 +0800)]
Fix git open close bug (#12834)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 14 Sep 2020 11:49:03 +0000 (11:49 +0000)]
[skip ci] Updated translations via Crowdin

4 years ago[API] Milestone endpoints accept names too (#12649)
6543 [Mon, 14 Sep 2020 11:48:03 +0000 (13:48 +0200)]
[API] Milestone endpoints accept names too (#12649)

* API: Milestone endpoints accept names too

* add test

* rename

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 14 Sep 2020 10:41:18 +0000 (10:41 +0000)]
[skip ci] Updated translations via Crowdin

4 years agofix: use Base36 for all code indexers (#12830)
Jui-Nan Lin [Mon, 14 Sep 2020 10:40:07 +0000 (18:40 +0800)]
fix: use Base36 for all code indexers (#12830)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 13 Sep 2020 01:49:50 +0000 (01:49 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix markdown meta parsing (#12817)
John Olheiser [Sun, 13 Sep 2020 01:48:47 +0000 (20:48 -0500)]
Fix markdown meta parsing (#12817)

* Fix meta parsing and add minimal test

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Require first separator and add more tests

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Go lets this work gracefully :pray:

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoDon't replace underscores in auto-generated IDs in goldmark (#12805)
zeripath [Sat, 12 Sep 2020 16:00:48 +0000 (17:00 +0100)]
Don't replace underscores in auto-generated IDs in goldmark (#12805)

Fix #12196

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 12 Sep 2020 12:32:50 +0000 (12:32 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix bug on elastic search (#12811)
Lunny Xiao [Sat, 12 Sep 2020 12:31:52 +0000 (20:31 +0800)]
Fix bug on elastic search (#12811)

* Fix bug on elastic search

* Add more comments for elastic search result startIndex and endIndex

* refactor indexPos

* refactor indexPos

* Fix bug

4 years agoTranslate two small lables on commit statuse list (#12821)
赵智超 [Sat, 12 Sep 2020 07:29:50 +0000 (15:29 +0800)]
Translate two small lables on commit statuse list (#12821)

* Requested
* Details

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 11 Sep 2020 20:20:02 +0000 (20:20 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMake SVG size argument optional (#12814)
silverwind [Fri, 11 Sep 2020 20:19:00 +0000 (22:19 +0200)]
Make SVG size argument optional (#12814)

Now defaults to 16 on both frontend and backend.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoIssue templates directory (#11450)
John Olheiser [Fri, 11 Sep 2020 14:48:39 +0000 (09:48 -0500)]
Issue templates directory (#11450)

* Issue templates

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add some comments, appease the linter

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add docs and re-use dir candidates

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add default labels to issue templates

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

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update issue.go

* Suggestions

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Extract metadata from legacy if possible

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoMove all push update operations to a queue (#10133)
Lunny Xiao [Fri, 11 Sep 2020 14:14:48 +0000 (22:14 +0800)]
Move all push update operations to a queue (#10133)

* Fix test

* Add no queue for test only

* improve code

* Auto watch whatever branch operation

* Fix lint

* Rename noqueue to immediate

* Remove old PushUpdate function

* Fix tests

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 11 Sep 2020 12:39:57 +0000 (12:39 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoShow PR settings on empty repos (#12808)
zeripath [Fri, 11 Sep 2020 12:39:01 +0000 (13:39 +0100)]
Show PR settings on empty repos (#12808)

Fix #12788

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoDisable watch and star if not signed in (#12807)
zeripath [Fri, 11 Sep 2020 11:01:51 +0000 (12:01 +0100)]
Disable watch and star if not signed in (#12807)

Fix #12070

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoAdd postgres schema to the search_path on database connection (#12634)
zeripath [Fri, 11 Sep 2020 09:30:19 +0000 (10:30 +0100)]
Add postgres schema to the search_path on database connection (#12634)

Rather than rely on the user running the gitea server and db setting the
schema search_path correctly - if gitea is run with a schema we should
simply set the search_path to have that schema first in the path.

Fix #12505

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoWhilst changing the character set to utf8mb4 we should set ROW_FORMAT=dynamic too...
zeripath [Fri, 11 Sep 2020 08:25:06 +0000 (09:25 +0100)]
Whilst changing the character set to utf8mb4 we should set ROW_FORMAT=dynamic too (#12804)

Fix #12801

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 11 Sep 2020 06:45:37 +0000 (06:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoSet opengraph attributes on org pages (#12803)
zeripath [Fri, 11 Sep 2020 06:41:43 +0000 (07:41 +0100)]
Set opengraph attributes on org pages (#12803)

Fix #12778

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoRemove double escape on labels addition in comments (#12809)
zeripath [Fri, 11 Sep 2020 04:06:41 +0000 (05:06 +0100)]
Remove double escape on labels addition in comments (#12809)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago[API] Migration: Change ServiceType String (#12672)
6543 [Thu, 10 Sep 2020 22:29:19 +0000 (00:29 +0200)]
[API] Migration:  Change ServiceType String (#12672)

* use different structs for MigrateRepoOptions on UI and API

* Fix TokenAuth and rename UID to an understandable Name

* fix swagger doc

* simplify & mk redable

* R E F A C T O R:
migration has now internal 3 structs to store its options:
 * the Options for WebUI: modules/auth/repo_form.go
 * the Options for API: modules/structs/repo.go
 * the option struct with after validation for internal prossessing: modules/migrations/base/options.go

* Copyright Header

* Deprecate UID - add RepoOwner

* adopt repo.go -> migrate.go

* add comment about each struct purpose

* lint

4 years agoUpdate gitea.com/macaron/i18n (#12806)
zeripath [Thu, 10 Sep 2020 21:32:58 +0000 (22:32 +0100)]
Update gitea.com/macaron/i18n (#12806)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoAdd Primary Key to Topic and RepoTopic (#12639)
zeripath [Thu, 10 Sep 2020 19:45:01 +0000 (20:45 +0100)]
Add Primary Key to Topic and RepoTopic (#12639)

Add a primary key to Topic and RepoTopic tables

Fix #8920

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoui: change commentTag style (#11668)
赵智超 [Thu, 10 Sep 2020 18:09:14 +0000 (02:09 +0800)]
ui: change commentTag style (#11668)

* ui: change commentTag style

* Add comment tag in first comment (issue content)
* Show CommentTagPoster in other way

Signed-off-by: a1012112796 <1012112796@qq.com>
* Update routers/repo/issue.go

Co-authored-by: Lauris BH <lauris@nix.lv>
* fix lint

* revert CommentTagPoster

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 10 Sep 2020 17:06:38 +0000 (17:06 +0000)]
[skip ci] Updated translations via Crowdin

4 years agofix readme format (#12797)
Marshmallow [Thu, 10 Sep 2020 17:05:15 +0000 (01:05 +0800)]
fix readme format (#12797)

Originally, the tabbed content under 'If pre-built frontend files are present it is possible to only build the backend:‘ has tab within the tabbed content. This commit fixed it.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoAdd check for LDAP group membership (#10869)
John Olheiser [Thu, 10 Sep 2020 15:30:07 +0000 (10:30 -0500)]
Add check for LDAP group membership (#10869)

This is a port of gogs/gogs#4398

The only changes made by myself are:

Add locales
Add some JS to the UI
Otherwise all code credit goes to @aboron

Resolves #10829

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoAdd placeholder text for bio profile text form (#12792)
Bagas Sanjaya [Thu, 10 Sep 2020 14:29:26 +0000 (21:29 +0700)]
Add placeholder text for bio profile text form (#12792)

* Add placeholder text
  * Localize

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 10 Sep 2020 13:05:36 +0000 (13:05 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoGitLab DL: normalizeColor (#12793)
6543 [Thu, 10 Sep 2020 13:04:30 +0000 (15:04 +0200)]
GitLab DL: normalizeColor (#12793)

4 years agoreturn error when create gitlabdownloader (#12790)
Lunny Xiao [Thu, 10 Sep 2020 08:27:49 +0000 (16:27 +0800)]
return error when create gitlabdownloader (#12790)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 10 Sep 2020 04:17:37 +0000 (04:17 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUpdate JS dependencies (#12782)
silverwind [Thu, 10 Sep 2020 04:16:40 +0000 (06:16 +0200)]
Update JS dependencies (#12782)

- Update all dependencies
- Add explicit postcss dependency as dictated by postcss-loader
- Adapt for new postcss-loader syntax
- Move sourceMap options to top for consistency

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoSet language via AJAX (#12785)
techknowlogick [Thu, 10 Sep 2020 01:09:23 +0000 (21:09 -0400)]
Set language via AJAX (#12785)

* Set language via AJAX

* fix lint

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 9 Sep 2020 19:09:54 +0000 (19:09 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix "only mail on mention" bug (#12775)
赵智超 [Wed, 9 Sep 2020 19:08:55 +0000 (03:08 +0800)]
Fix "only mail on mention" bug (#12775)

* fix mail mention bug

fix #12774

Signed-off-by: a1012112796 <1012112796@qq.com>
* fix test

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 9 Sep 2020 18:30:16 +0000 (18:30 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd a migrate service type switch page (#12697)
Lunny Xiao [Wed, 9 Sep 2020 18:29:10 +0000 (02:29 +0800)]
Add a migrate service type switch page (#12697)

* Add a migrat service type switch page

* Improve translations

* remove images

* Fix images

* remove extra create repo button on dashboard

* Follow reviewers' opinions

* Fix frontend lint

* Remove wrong submit file

* Fix tests

* Adjust the size of image

* Apply suggestions from code review

Co-authored-by: 赵智超 <1012112796@qq.com>
* Remove username and password from migration of github/gitlab

* Improve docs

* Improve interface docs

Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 9 Sep 2020 17:32:39 +0000 (17:32 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd MySQL FAQ section (#12780)
zeripath [Wed, 9 Sep 2020 17:31:31 +0000 (18:31 +0100)]
Add MySQL FAQ section (#12780)

* Add MySQL FAQ section

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update docs/content/doc/help/faq.en-us.md

* Update docs/content/doc/help/faq.en-us.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 9 Sep 2020 13:09:44 +0000 (13:09 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix yet another bug with diff file names (#12771)
zeripath [Wed, 9 Sep 2020 13:08:40 +0000 (14:08 +0100)]
Fix yet another bug with diff file names (#12771)

Following further testing it has become apparent that the diff line
cannot be used to determine filenames for diffs with any sort of predictability
the answer therefore is to use the other lines that are provided with a diff

Fix #12768

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 8 Sep 2020 22:07:38 +0000 (22:07 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoCheck passwords against HaveIBeenPwned (#12716)
John Olheiser [Tue, 8 Sep 2020 22:06:39 +0000 (17:06 -0500)]
Check passwords against HaveIBeenPwned (#12716)

* Implement pwn

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Apply suggestions mrsdizzie

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* Add link to HIBP

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add more details to admin command

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add context to pwn

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Consistency and making some noise ;)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoUpgrade xorm to v1.0.5 (#12765)
Lunny Xiao [Tue, 8 Sep 2020 17:57:19 +0000 (01:57 +0800)]
Upgrade xorm to v1.0.5 (#12765)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFile header tweaks, add CSS helpers (#12635)
silverwind [Tue, 8 Sep 2020 17:17:56 +0000 (19:17 +0200)]
File header tweaks, add CSS helpers (#12635)

- replace two instances of fontawesome with octicons
- add new "class" optional argument to "svg" helper
- add many new CSS helpers and move their import to the end for
  increaseed precedence

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoChange/remove a branch of an open issue (#9080)
Vedran [Tue, 8 Sep 2020 16:29:51 +0000 (18:29 +0200)]
Change/remove a branch of an open issue (#9080)

* Add field with isIssueWriter to front end

* Make branch field editable

* Switch frontend to form and POST from javascript

* Add /issue/id/ref endpoint to routes

* Use UpdateIssueTitle model to change ref in backend

* Removed crossreference check and adding comments on branch change

* Use ref returned from POST to update the field

* Prevent calling loadRepo from models/

* Branch/tag refreshed without page reload

* Remove filter for empty branch name

* Add clear option to tag list as well

* Delete button translation and coloring

* Fix for not showing selected branch name in new issue

* Check that branch is not being changed on a PR

* Change logic

* Notification when changing issue ref

* Fix for renamed permission parameter

* Fix for failing build

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>