Commit graph

2344 commits

Author SHA1 Message Date
Gusted
cdd6371ad4 [skip ci] Updated translations via Crowdin 2022-06-28 00:09:43 +00:00
Gusted
0048595811
Remove U2F support (#20141)
- Completely remove U2F support from 1.18.0, 1.17.0 will be the last
release that U2F is somewhat supported. Users who used U2F would already
be warned about using U2F for a while now and should hopefully already
be migrated. But starting 1.18 definitely remove it.
2022-06-26 21:20:58 -05:00
Lunny Xiao
3ba09103a4 [skip ci] Updated translations via Crowdin 2022-06-23 00:10:20 +00:00
SteveTheEngineer
e67e685ed8 [skip ci] Updated translations via Crowdin 2022-06-21 00:10:11 +00:00
Gusted
3289abcefc [skip ci] Updated translations via Crowdin 2022-06-20 00:10:43 +00:00
a1012112796
cc42c6488a
fix delete pull head ref for DeleteIssue (#20032)
* fix delete pull head ref for DeleteIssue

fix #19655

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

* add different help message for delete pull request

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

Co-authored-by: 6543 <6543@obermui.de>
2022-06-19 18:05:15 +08:00
zeripath
870d7f90e7 [skip ci] Updated translations via Crowdin 2022-06-18 13:10:18 +00:00
zeripath
af7cfdee0e [skip ci] Updated translations via Crowdin 2022-06-18 10:11:27 +00:00
zeripath
7fbf002403 [skip ci] Updated translations via Crowdin 2022-06-18 09:10:16 +00:00
zeripath
46e50bcbfc [skip ci] Updated translations via Crowdin 2022-06-18 00:10:15 +00:00
wxiaoguang
89b0aac374 [skip ci] Updated translations via Crowdin 2022-06-16 16:10:29 +00:00
Gusted
70ce051f1a [skip ci] Updated translations via Crowdin 2022-06-16 15:10:36 +00:00
a1012112796
d05fb6f6c9 [skip ci] Updated translations via Crowdin 2022-06-16 14:10:29 +00:00
Gusted
881646520e [skip ci] Updated translations via Crowdin 2022-06-15 22:10:15 +00:00
singuliere
f6e2dbaf1e [skip ci] Updated translations via Crowdin 2022-06-15 00:10:14 +00:00
singuliere
460c03ca49 [skip ci] Updated translations via Crowdin 2022-06-14 00:10:10 +00:00
Lunny Xiao
5f136783d1 [skip ci] Updated translations via Crowdin 2022-06-13 00:10:09 +00:00
Gusted
796c4eca0b
Prettify number of issues (#17760)
* Prettify number of issues

- Use the PrettyNumber function to add commas in large amount of issues.

* Use client-side formatting

* prettify on both server and client

* remove unused i18n entries

* handle more cases, support other int types in PrettyNumber

* specify locale to avoid issues with node default locale

* remove superfluos argument

* introduce template helper, octicon tweaks, js refactor

* Update modules/templates/helper.go

* Apply some suggestions.

* Add comment

* Update templates/user/dashboard/issues.tmpl

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-06-12 20:08:23 +08:00
Gusted
edf14202fe
Unify repo settings & show better error (#19828)
* Unify context data
* Actually show invalid url in error
2022-06-12 13:43:27 +08:00
xkcdstickfigure
3898fc5bda [skip ci] Updated translations via Crowdin 2022-06-12 00:10:13 +00:00
6543
a9cc9c0f7a
Auto merge pull requests when all checks succeeded via WebUI (#19648)
Add WebUI part of Auto merge feature

close #19621

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2022-06-11 16:44:20 +02:00
silverwind
23422f9909 [skip ci] Updated translations via Crowdin 2022-06-11 00:10:12 +00:00
Sandro Santilli
52c2e82813
Custom regexp external issues (#17624)
* Implement custom regular expression for external issue tracking.

Signed-off-by: Alexander Beyn <malex@fatelectrons.org>

* Fix syntax/style

* Update repo.go

* Set metas['regexp']

* gofmt

* fix some tests

* fix more tests

* refactor frontend

* use LRU cache for regexp

* Update modules/markup/html_internal_test.go

Co-authored-by: Alexander Beyn <malex@fatelectrons.org>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-06-10 13:39:53 +08:00
Roger Luo
e26f84a9b7 [skip ci] Updated translations via Crowdin 2022-06-10 00:10:33 +00:00
Roger Luo
2ae45cebbf
Feature: Find files in repo (#15028)
* Create finding files page ui in repo page

* Get tree entries for find repo files.

* Move find files JS to individual file.

* gen swagger.

* Add enry.IsVendor to exclude entries

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-06-09 14:15:08 +03:00
Lauris BH
d087554d81 [skip ci] Updated translations via Crowdin 2022-06-09 00:10:14 +00:00
André Jaenisch
c1c07e533c
Improve wording on delete access token modal (#19909)
This PR highlights the nature of the destructive action.
It also rewords the action buttons to remove ambiguity.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>

Co-authored-by: Lauris BH <lauris@nix.lv>
2022-06-07 20:28:10 -04:00
Gusted
d78ea362d4 [skip ci] Updated translations via Crowdin 2022-06-08 00:10:16 +00:00
zeripath
d8236f1b16
Ensure minimum mirror interval is reported on settings page (#19895)
* Ensure minimum mirror interval is reported on settings page

Expecting users to guess the minimum mirror interval appears a little unkind.
In this PR we simply change the locale string to include the minimum interval.
This will of course be affected by our current localization framework but...
we can fix that else where.

This PR also includes some fixes for error handling on the settings page as
previously the mirror block amongst others would simply disappear on error.

Fix #3737

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

* Update options/locale/locale_en-US.ini

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* placate lint

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

* Update options/locale/locale_en-US.ini

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-06-07 13:40:12 -04:00
wxiaoguang
23dd0f3456 [skip ci] Updated translations via Crowdin 2022-06-07 00:10:19 +00:00
Wim
0a8c030600 [skip ci] Updated translations via Crowdin 2022-06-06 00:10:13 +00:00
André Jaenisch
73382d2132
Add alt text to logo (#19892)
The recommended way is to use the name of the organisation followed
by "logo". however, since this is my first contribution, I am not
entirely sure, whether this is the best approach here.

The organisation is different from the organisation you can create as
part of the application. Instead, it is more related to the site
hosting the instance. Plus, I don't know how to best handle it when
the logo image is swapped out. Therefore, I use plain "Logo" and hope
that the person visiting the site has enough context.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-06-05 17:41:51 +08:00
Paweł Bogusławski
14d96ff7ac
Disable unnecessary mirroring elements (#18527)
* Disable unnecessary mirroring elements

This mod fixes disabling unnecessary mirroring elements.

Related: https://github.com/go-gitea/gitea/pull/16957
Related: https://github.com/go-gitea/gitea/pull/13084
Author-Change-Id: IB#1105104

* Checkbox rendering disabled instead of hiding it

Fixes: 02b4505150
Related: https://github.com/go-gitea/gitea/pull/18527#pullrequestreview-878061913
Author-Change-Id: IB#1105104

* Update custom/conf/app.example.ini

Co-authored-by: silverwind <me@silverwind.io>

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-authored-by: silverwind <me@silverwind.io>

* Mirror filter removed only when whole mirroring feature is disabled

Fixes: 02b4505150
Related: https://github.com/go-gitea/gitea/pull/18527#discussion_r883268890
Author-Change-Id: IB#1105104

Co-authored-by: silverwind <me@silverwind.io>
2022-06-04 19:42:17 +08:00
wxiaoguang
867b34d5e9 [skip ci] Updated translations via Crowdin 2022-06-04 00:10:09 +00:00
zeripath
808a780309 [skip ci] Updated translations via Crowdin 2022-06-03 00:11:14 +00:00
zeripath
5283d1ead5 [skip ci] Updated translations via Crowdin 2022-06-02 00:10:13 +00:00
GiteaBot
e31c6166ee [skip ci] Updated translations via Crowdin 2022-05-31 00:10:30 +00:00
GiteaBot
fe4c846ccb [skip ci] Updated translations via Crowdin 2022-05-30 00:10:14 +00:00
wxiaoguang
e0273bad72
Fix i18n for Link Account button, re-format tmpl (#19835) 2022-05-29 16:19:56 +08:00
GiteaBot
76681883ec [skip ci] Updated translations via Crowdin 2022-05-29 00:10:54 +00:00
GiteaBot
cfb4c23a50 [skip ci] Updated translations via Crowdin 2022-05-28 00:10:25 +00:00
GiteaBot
7671a3322b [skip ci] Updated translations via Crowdin 2022-05-24 00:10:14 +00:00
GiteaBot
d2a91e5e59 [skip ci] Updated translations via Crowdin 2022-05-23 00:10:14 +00:00
GiteaBot
fa5dec966c [skip ci] Updated licenses and gitignores 2022-05-22 00:10:22 +00:00
zeripath
ffb7ab31f2
Estimate Action Count in Statistics (#19775) 2022-05-21 14:50:50 -04:00
GiteaBot
6d54799bbc [skip ci] Updated translations via Crowdin 2022-05-17 00:10:28 +00:00
GiteaBot
761d4f40be [skip ci] Updated translations via Crowdin 2022-05-15 00:10:15 +00:00
GiteaBot
cafa2dcb87 [skip ci] Updated translations via Crowdin 2022-05-13 00:10:14 +00:00
GiteaBot
d985dcc922 [skip ci] Updated translations via Crowdin 2022-05-12 00:10:15 +00:00
GiteaBot
9fc194d2d9 [skip ci] Updated translations via Crowdin 2022-05-10 00:10:16 +00:00
Jack Hay
7e19200e53
Add tooltip to pending PR comments (#19662) 2022-05-09 21:04:27 +02:00
GiteaBot
cd99540cdc [skip ci] Updated translations via Crowdin 2022-05-09 00:10:13 +00:00
Lunny Xiao
9efa47131f
Admin should not delete himself (#19423)
Admin should not be able to delete themselves.

Also partially fix #15449
2022-05-08 21:22:55 +01:00
Lunny Xiao
d4834071da
Repository level enable package or disable (#19323) 2022-05-08 17:51:50 +02:00
delvh
5ca224a789
Allow to mark files in a PR as viewed (#19007)
Users can now mark files in PRs as viewed, resulting in them not being shown again by default when they reopen the PR again.
2022-05-07 20:28:10 +02:00
kolaente
59b30f060a
Auto merge pull requests when all checks succeeded via API (#9307)
* Fix indention

Signed-off-by: kolaente <k@knt.li>

* Add option to merge a pr right now without waiting for the checks to succeed

Signed-off-by: kolaente <k@knt.li>

* Fix lint

Signed-off-by: kolaente <k@knt.li>

* Add scheduled pr merge to tables used for testing

Signed-off-by: kolaente <k@knt.li>

* Add status param to make GetPullRequestByHeadBranch reusable

Signed-off-by: kolaente <k@knt.li>

* Move "Merge now" to a seperate button to make the ui clearer

Signed-off-by: kolaente <k@knt.li>

* Update models/scheduled_pull_request_merge.go

Co-authored-by: 赵智超 <1012112796@qq.com>

* Update web_src/js/index.js

Co-authored-by: 赵智超 <1012112796@qq.com>

* Update web_src/js/index.js

Co-authored-by: 赵智超 <1012112796@qq.com>

* Re-add migration after merge

* Fix frontend lint

* Fix version compare

* Add vendored dependencies

* Add basic tets

* Make sure the api route is capable of scheduling PRs for merging

* Fix comparing version

* make vendor

* adopt refactor

* apply suggestion: User -> Doer

* init var once

* Fix Test

* Update templates/repo/issue/view_content/comments.tmpl

* adopt

* nits

* next

* code format

* lint

* use same name schema; rm CreateUnScheduledPRToAutoMergeComment

* API: can not create schedule twice

* Add TestGetBranchNamesForSha

* nits

* new go routine for each pull to merge

* Update models/pull.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* Update models/scheduled_pull_request_merge.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* fix & add renaming sugestions

* Update services/automerge/pull_auto_merge.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* fix conflict relicts

* apply latest refactors

* fix: migration after merge

* Update models/error.go

Co-authored-by: delvh <dev.lh@web.de>

* Update options/locale/locale_en-US.ini

Co-authored-by: delvh <dev.lh@web.de>

* Update options/locale/locale_en-US.ini

Co-authored-by: delvh <dev.lh@web.de>

* adapt latest refactors

* fix test

* use more context

* skip potential edgecases

* document func usage

* GetBranchNamesForSha() -> GetRefsBySha()

* start refactoring

* ajust to new changes

* nit

* docu nit

* the great check move

* move checks for branchprotection into own package

* resolve todo now ...

* move & rename

* unexport if posible

* fix

* check if merge is allowed before merge on scheduled pull

* debugg

* wording

* improve SetDefaults & nits

* NotAllowedToMerge -> DisallowedToMerge

* fix test

* merge files

* use package "errors"

* merge files

* add string names

* other implementation for gogit

* adapt refactor

* more context for models/pull.go

* GetUserRepoPermission use context

* more ctx

* use context for loading pull head/base-repo

* more ctx

* more ctx

* models.LoadIssueCtx()

* models.LoadIssueCtx()

* Handle pull_service.Merge in one DB transaction

* add TODOs

* next

* next

* next

* more ctx

* more ctx

* Start refactoring structure of old pull code ...

* move code into new packages

* shorter names ... and finish **restructure**

* Update models/branches.go

Co-authored-by: zeripath <art27@cantab.net>

* finish UpdateProtectBranch

* more and fix

* update datum

* template: use "svg" helper

* rename prQueue 2 prPatchCheckerQueue

* handle automerge in queue

* lock pull on git&db actions ...

* lock pull on git&db actions ...

* add TODO notes

* the regex

* transaction in tests

* GetRepositoryByIDCtx

* shorter table name and lint fix

* close transaction bevore notify

* Update models/pull.go

* next

* CheckPullMergable check all branch protections!

* Update routers/web/repo/pull.go

* CheckPullMergable check all branch protections!

* Revert "PullService lock via pullID (#19520)" (for now...)

This reverts commit 6cde7c9159a5ea75a10356feb7b8c7ad4c434a9a.

* Update services/pull/check.go

* Use for a repo action one database transaction

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: delvh <dev.lh@web.de>

* Update services/issue/status.go

Co-authored-by: delvh <dev.lh@web.de>

* Update services/issue/status.go

Co-authored-by: delvh <dev.lh@web.de>

* use db.WithTx()

* gofmt

* make pr.GetDefaultMergeMessage() context aware

* make MergePullRequestForm.SetDefaults context aware

* use db.WithTx()

* pull.SetMerged only with context

* fix deadlock in `test-sqlite\#TestAPIBranchProtection`

* dont forget templates

* db.WithTx allow to set the parentCtx

* handle db transaction in service packages but not router

* issue_service.ChangeStatus just had caused another deadlock :/
it has to do something with how notification package is handled

* if we merge a pull in one database transaktion, we get a lock, because merge infoce internal api that cant handle open db sessions to the same repo

* ajust to current master

* Apply suggestions from code review

Co-authored-by: delvh <dev.lh@web.de>

* dont open db transaction in router

* make generate-swagger

* one _success less

* wording nit

* rm

* adapt

* remove not needed test files

* rm less diff & use attr in JS

* ...

* Update services/repository/files/commit.go

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

* ajust db schema for PullAutoMerge

* skip broken pull refs

* more context in error messages

* remove webUI part for another pull

* remove more WebUI only parts

* API: add CancleAutoMergePR

* Apply suggestions from code review

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

* fix lint

* Apply suggestions from code review

* cancle -> cancel

Co-authored-by: delvh <dev.lh@web.de>

* change queue identifyer

* fix swagger

* prevent nil issue

* fix and dont drop error

* as per @zeripath

* Update integrations/git_test.go

Co-authored-by: delvh <dev.lh@web.de>

* Update integrations/git_test.go

Co-authored-by: delvh <dev.lh@web.de>

* more declarative integration tests (dedup code)

* use assert.False/True helper

Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-05-08 01:05:52 +08:00
GiteaBot
5a9c505e14 [skip ci] Updated translations via Crowdin 2022-05-07 00:10:19 +00:00
neon
0483ee8f69
Add "Reference" section to Issue view sidebar (#19609)
* Add "Reference" section to Issue view sidebar

* Removed unneeded tailored CSS, added Fomantic UI classes

* Removed tailored CSS in favour of HTML-only approach

Kindly provided by @Gusted

* Added i18 translation key for reference link string

* Corrected spelling of "References:" to "Reference:" for reference link text

* Removed `Issue.ReferenceLink` in favour of a local template variable
2022-05-05 20:58:37 +02:00
GiteaBot
5a75a5463e [skip ci] Updated translations via Crowdin 2022-05-05 00:10:22 +00:00
GiteaBot
05234adfa8 [skip ci] Updated translations via Crowdin 2022-05-02 00:10:25 +00:00
GiteaBot
094c8fdc87 [skip ci] Updated licenses and gitignores 2022-05-01 00:25:27 +00:00
GiteaBot
bf7258be9c [skip ci] Updated translations via Crowdin 2022-04-30 00:10:15 +00:00
GiteaBot
53829b84f0 [skip ci] Updated translations via Crowdin 2022-04-29 00:10:15 +00:00
qwerty287
8eb1cd9264
Add "Allow edits from maintainer" feature (#18002)
Adds a feature [like GitHub has](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) (step 7).
If you create a new PR from a forked repo, you can select (and change later, but only if you are the PR creator/poster) the "Allow edits from maintainers" option.
Then users with write access to the base branch get more permissions on this branch:
* use the update pull request button
* push directly from the command line (`git push`)
* edit/delete/upload files via web UI
* use related API endpoints

You can't merge PRs to this branch with this enabled, you'll need "full" code write permissions.

This feature has a pretty big impact on the permission system. I might forgot changing some things or didn't find security vulnerabilities. In this case, please leave a review or comment on this PR.

Closes #17728

Co-authored-by: 6543 <6543@obermui.de>
2022-04-28 17:45:33 +02:00
GiteaBot
960b813a33 [skip ci] Updated translations via Crowdin 2022-04-28 00:10:43 +00:00
Lunny Xiao
03eba32bd9
Add a new menu in file view to open blame view and fix blame view select range bug (#19500) 2022-04-26 13:54:40 +03:00
GiteaBot
741c55b4ea [skip ci] Updated translations via Crowdin 2022-04-26 00:10:13 +00:00
GiteaBot
5e4134b117 [skip ci] Updated translations via Crowdin 2022-04-25 00:10:29 +00:00
ktprograms
ef164d33c2
Add RSS Feed buttons to Repo, User and Org pages (#19370) 2022-04-24 22:03:39 +02:00
GiteaBot
0abd8b0abc [skip ci] Updated translations via Crowdin 2022-04-24 00:10:14 +00:00
GiteaBot
9550e5a23e [skip ci] Updated translations via Crowdin 2022-04-23 00:10:15 +00:00
GiteaBot
0dfc2e55ea [skip ci] Updated translations via Crowdin 2022-04-22 00:10:36 +00:00
GiteaBot
f7a8e5c8f2 [skip ci] Updated translations via Crowdin 2022-04-21 00:10:26 +00:00
KN4CK3R
18727df73a
Add Helm Chart registry (#19406) 2022-04-19 12:55:35 -04:00
GiteaBot
b74322dfce [skip ci] Updated translations via Crowdin 2022-04-18 00:10:09 +00:00
GiteaBot
490065b93b [skip ci] Updated licenses and gitignores 2022-04-17 00:10:24 +00:00
GiteaBot
3255ba9305 [skip ci] Updated translations via Crowdin 2022-04-13 00:10:15 +00:00
GiteaBot
72479bff89 [skip ci] Updated translations via Crowdin 2022-04-10 00:10:15 +00:00
GiteaBot
c6531de3f5 [skip ci] Updated translations via Crowdin 2022-04-08 00:17:39 +00:00
GiteaBot
bb7e0619c3 [skip ci] Updated translations via Crowdin 2022-04-07 00:17:35 +00:00
原俊杰
184302665f
Show ssh command directly in template instead of i18n translation (#19335)
* add missing space for generate ssh token command

Signed-off-by: Junjie Yuan <yuan@junjie.pro>

* Do not use i18n for ssh command

* Remove unnecessary settings.ssh_token_code

* Revert locale_zh-CN.ini

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-04-06 19:35:04 +08:00
GiteaBot
8ddcd37f13 [skip ci] Updated translations via Crowdin 2022-04-06 00:17:36 +00:00
GiteaBot
5ae875a1ae [skip ci] Updated translations via Crowdin 2022-04-05 00:17:38 +00:00
GiteaBot
256204befa [skip ci] Updated translations via Crowdin 2022-04-04 00:17:51 +00:00
Steven
be9ef15f8a
Fix links to packages documentation (#19315) 2022-04-04 00:22:01 +08:00
GiteaBot
27c34dd011 [skip ci] Updated translations via Crowdin 2022-04-03 00:17:41 +00:00
GiteaBot
ba2592c380 [skip ci] Updated translations via Crowdin 2022-04-01 00:17:38 +00:00
zeripath
c88547ce71
Add Goroutine stack inspector to admin/monitor (#19207)
Continues on from #19202.

Following the addition of pprof labels we can now more easily understand the relationship between a goroutine and the requests that spawn them. 

This PR takes advantage of the labels and adds a few others, then provides a mechanism for the monitoring page to query the pprof goroutine profile.

The binary profile that results from this profile is immediately piped in to the google library for parsing this and then stack traces are formed for the goroutines.

If the goroutine is within a context or has been created from a goroutine within a process context it will acquire the process description labels for that process. 

The goroutines are mapped with there associate pids and any that do not have an associated pid are placed in a group at the bottom as unbound.

In this way we should be able to more easily examine goroutines that have been stuck.

A manager command `gitea manager processes` is also provided that can export the processes (with or without stacktraces) to the command line.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-03-31 19:01:43 +02:00
GiteaBot
84038f33f4 [skip ci] Updated translations via Crowdin 2022-03-31 00:18:20 +00:00
Norwin
9cbeab440e
fix link to package registry docs (#19268) 2022-03-30 15:17:05 -04:00
KN4CK3R
1d332342db
Add Package Registry (#16510)
* Added package store settings.

* Added models.

* Added generic package registry.

* Added tests.

* Added NuGet package registry.

* Moved service index to api file.

* Added NPM package registry.

* Added Maven package registry.

* Added PyPI package registry.

* Summary is deprecated.

* Changed npm name.

* Sanitize project url.

* Allow only scoped packages.

* Added user interface.

* Changed method name.

* Added missing migration file.

* Set page info.

* Added documentation.

* Added documentation links.

* Fixed wrong error message.

* Lint template files.

* Fixed merge errors.

* Fixed unit test storage path.

* Switch to json module.

* Added suggestions.

* Added package webhook.

* Add package api.

* Fixed swagger file.

* Fixed enum and comments.

* Fixed NuGet pagination.

* Print test names.

* Added api tests.

* Fixed access level.

* Fix User unmarshal.

* Added RubyGems package registry.

* Fix lint.

* Implemented io.Writer.

* Added support for sha256/sha512 checksum files.

* Improved maven-metadata.xml support.

* Added support for symbol package uploads.

* Added tests.

* Added overview docs.

* Added npm dependencies and keywords.

* Added no-packages information.

* Display file size.

* Display asset count.

* Fixed filter alignment.

* Added package icons.

* Formatted instructions.

* Allow anonymous package downloads.

* Fixed comments.

* Fixed postgres test.

* Moved file.

* Moved models to models/packages.

* Use correct error response format per client.

* Use simpler search form.

* Fixed IsProd.

* Restructured data model.

* Prevent empty filename.

* Fix swagger.

* Implemented user/org registry.

* Implemented UI.

* Use GetUserByIDCtx.

* Use table for dependencies.

* make svg

* Added support for unscoped npm packages.

* Add support for npm dist tags.

* Added tests for npm tags.

* Unlink packages if repository gets deleted.

* Prevent user/org delete if a packages exist.

* Use package unlink in repository service.

* Added support for composer packages.

* Restructured package docs.

* Added missing tests.

* Fixed generic content page.

* Fixed docs.

* Fixed swagger.

* Added missing type.

* Fixed ambiguous column.

* Organize content store by sha256 hash.

* Added admin package management.

* Added support for sorting.

* Add support for multiple identical versions/files.

* Added missing repository unlink.

* Added file properties.

* make fmt

* lint

* Added Conan package registry.

* Updated docs.

* Unify package names.

* Added swagger enum.

* Use longer TEXT column type.

* Removed version composite key.

* Merged package and container registry.

* Removed index.

* Use dedicated package router.

* Moved files to new location.

* Updated docs.

* Fixed JOIN order.

* Fixed GROUP BY statement.

* Fixed GROUP BY #2.

* Added symbol server support.

* Added more tests.

* Set NOT NULL.

* Added setting to disable package registries.

* Moved auth into service.

* refactor

* Use ctx everywhere.

* Added package cleanup task.

* Changed packages path.

* Added container registry.

* Refactoring

* Updated comparison.

* Fix swagger.

* Fixed table order.

* Use token auth for npm routes.

* Enabled ReverseProxy auth.

* Added packages link for orgs.

* Fixed anonymous org access.

* Enable copy button for setup instructions.

* Merge error

* Added suggestions.

* Fixed merge.

* Handle "generic".

* Added link for TODO.

* Added suggestions.

* Changed temporary buffer filename.

* Added suggestions.

* Apply suggestions from code review

Co-authored-by: Thomas Boerger <thomas@webhippie.de>

* Update docs/content/doc/packages/nuget.en-us.md

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Thomas Boerger <thomas@webhippie.de>
2022-03-30 16:42:47 +08:00
GiteaBot
ea8622d454 [skip ci] Updated translations via Crowdin 2022-03-30 00:17:38 +00:00
zeripath
90e0a402c1
Show last cron messages on monitor page (#19223)
As discussed on #19221 we should store the results of the last task message on the
crontask and show them on the monitor page.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-03-29 02:31:07 +01:00
Pilou
893c8938fc
New cron task: delete old system notices (#19219)
Add a new cron task which deletes the old system notices.
2022-03-28 13:54:59 +01:00
GiteaBot
04601d22f5 [skip ci] Updated translations via Crowdin 2022-03-28 00:17:27 +00:00
GiteaBot
71a5aaef32 [skip ci] Updated licenses and gitignores 2022-03-27 00:17:35 +00:00
GiteaBot
e48f3b0527 [skip ci] Updated translations via Crowdin 2022-03-25 00:17:35 +00:00
MeIchthys
f7883a6aec
Update issue_no_dependencies description (#19112)
To be more consistent and concise we could change the issue_no_dependencies from: `This issue currently doesn't have any dependencies. ` to `No dependencies set.` like we do for the due date and others.

Co-authored-by: delvh <dev.lh@web.de>
2022-03-23 16:46:50 +00:00
GiteaBot
db6080f4f8 [skip ci] Updated translations via Crowdin 2022-03-23 00:24:20 +00:00
GiteaBot
572c63d237 [skip ci] Updated translations via Crowdin 2022-03-21 00:24:03 +00:00
GiteaBot
83a2f79d5d [skip ci] Updated licenses and gitignores 2022-03-20 00:24:18 +00:00
zeripath
7fc5fd6415
Do not send activation email if manual confirm is set (#19119)
If the mailer is configured then even if Manual confirm is set an activation email
is still being sent because `handleUserCreated` is not checking for this case.

Fix #17263

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

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-03-18 17:57:07 +08:00
GiteaBot
cc6ff74253 [skip ci] Updated translations via Crowdin 2022-03-17 00:24:18 +00:00
GiteaBot
3ad6cf2069 [skip ci] Updated translations via Crowdin 2022-03-14 00:11:34 +00:00
GiteaBot
780cf76f6e [skip ci] Updated licenses and gitignores 2022-03-13 00:11:52 +00:00
GiteaBot
a0c043f5c6 [skip ci] Updated translations via Crowdin 2022-03-12 00:11:48 +00:00
GiteaBot
7443213707 [skip ci] Updated translations via Crowdin 2022-03-10 00:11:57 +00:00
Otto Richter (fnetX)
ea46142bce
Add button for issue deletion (#19032)
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-03-09 01:38:11 +01:00
Roger Luo
bbce905b6a
Feature: show issue assignee on project board (#15232)
* Show assignees in project boards.
2022-03-09 00:42:28 +08:00
GiteaBot
98f54081d6 [skip ci] Updated translations via Crowdin 2022-03-07 00:11:49 +00:00
Jimmy Praet
5184c83f6b
Add config option to disable "Update branch by rebase" (#18745) 2022-03-04 03:30:49 -05:00
GiteaBot
3ba9dcf4b4 [skip ci] Updated licenses and gitignores 2022-02-27 00:16:04 +00:00
GiteaBot
2f2f11e45d [skip ci] Updated translations via Crowdin 2022-02-25 00:16:08 +00:00
GiteaBot
15a4b1d42b [skip ci] Updated translations via Crowdin 2022-02-21 00:15:46 +00:00
GiteaBot
d5a4c5530a [skip ci] Updated licenses and gitignores 2022-02-20 00:16:03 +00:00
GiteaBot
833f291c40 [skip ci] Updated translations via Crowdin 2022-02-18 00:16:14 +00:00
GiteaBot
1eb6bb9028 [skip ci] Updated translations via Crowdin 2022-02-16 00:16:06 +00:00
GiteaBot
2be49dee71 [skip ci] Updated translations via Crowdin 2022-02-15 00:15:56 +00:00
GiteaBot
27af864cc2 [skip ci] Updated translations via Crowdin 2022-02-14 00:16:00 +00:00
GiteaBot
f1d8030310 [skip ci] Updated translations via Crowdin 2022-02-13 00:16:01 +00:00
zeripath
4e57bd1d30
Add number in queue status to monitor page (#18712)
Add number in queue status to the monitor page so that administrators can
assess how much work is left to be done in the queues.

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

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-02-12 13:31:26 +08:00
GiteaBot
5aa4eeb180 [skip ci] Updated translations via Crowdin 2022-02-12 00:16:01 +00:00
Sven Seeberg
832ce406ae
Add LDAP group sync to Teams, fixes #1395 (#16299)
* Add setting for a JSON that maps LDAP groups to Org Teams.
* Add log when removing or adding team members.
* Sync is being run on login and periodically.
* Existing group filter settings are reused.
* Adding and removing team members.
* Sync not existing LDAP group.
* Login with broken group map JSON.
2022-02-11 22:24:58 +08:00
GiteaBot
f9e7edc5d9 [skip ci] Updated translations via Crowdin 2022-02-11 00:16:26 +00:00
Lunny Xiao
0c70b4c211
Fix bug for version update hint (#18701)
Co-authored-by: silverwind <me@silverwind.io>
2022-02-10 15:37:10 +01:00
GiteaBot
e034d3a710 [skip ci] Updated translations via Crowdin 2022-02-10 00:16:23 +00:00
zeripath
eb748f5f3c
Add apply-patch, basic revert and cherry-pick functionality (#17902)
This code adds a simple endpoint to apply patches to repositories and
branches on gitea. This is then used along with the conflicting checking
code in #18004 to provide a basic implementation of cherry-pick revert.

Now because the buttons necessary for cherry-pick and revert have 
required us to create a dropdown next to the Browse Source button
I've also implemented Create Branch and Create Tag operations.

Fix #3880 
Fix #17986 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-09 20:28:55 +00:00
GiteaBot
4160aff86e [skip ci] Updated translations via Crowdin 2022-02-09 00:16:04 +00:00
GiteaBot
8422b1c55c [skip ci] Updated translations via Crowdin 2022-02-08 00:15:59 +00:00
wxiaoguang
c2a3e38194
Fix the missing i18n key for update checker (#18646) 2022-02-07 15:43:53 +08:00
GiteaBot
3b33507c73 [skip ci] Updated licenses and gitignores 2022-02-06 00:16:02 +00:00
GiteaBot
319d191afc [skip ci] Updated translations via Crowdin 2022-02-04 00:16:04 +00:00
GiteaBot
5469e61a8e [skip ci] Updated translations via Crowdin 2022-02-02 00:16:04 +00:00
GiteaBot
1de5028394 [skip ci] Updated translations via Crowdin 2022-02-01 00:16:43 +00:00
GiteaBot
db7c3ecc1f [skip ci] Updated translations via Crowdin 2022-01-31 00:05:29 +00:00
GiteaBot
74dcdadf08 [skip ci] Updated licenses and gitignores 2022-01-30 00:28:19 +00:00
GiteaBot
726715fcfb [skip ci] Updated translations via Crowdin 2022-01-29 00:28:21 +00:00
Gusted
7b04c97b7b
Fix typo (#18436)
As title

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-01-28 21:56:31 +08:00
GiteaBot
668718c67e [skip ci] Updated translations via Crowdin 2022-01-28 00:28:20 +00:00
Lauris BH
8038610a42
Automatically pause queue if index service is unavailable (#15066)
* Handle keyword search error when issue indexer service is not available

* Implement automatic disabling and resume of code indexer queue
2022-01-27 10:30:51 +02:00
GiteaBot
2649eddcf0 [skip ci] Updated translations via Crowdin 2022-01-27 00:28:24 +00:00
GiteaBot
4889ab52de [skip ci] Updated translations via Crowdin 2022-01-26 00:28:46 +00:00
GiteaBot
8053b60b4f [skip ci] Updated translations via Crowdin 2022-01-25 00:28:50 +00:00
wxiaoguang
5506cb92da
Refactor webhooks i18n (#18380) 2022-01-24 19:36:54 +08:00
GiteaBot
4bfd749fc5 [skip ci] Updated translations via Crowdin 2022-01-24 00:28:24 +00:00
Dr. Tobias Quathamer
3349fd8f79
Add packagist webhook (#18224)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-23 21:46:30 +08:00
GiteaBot
e040eca727 [skip ci] Updated translations via Crowdin 2022-01-23 00:28:40 +00:00
zeripath
a82fd98d53
Pause queues (#15928)
* Start adding mechanism to return unhandled data

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

* Create pushback interface

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

* Add Pausable interface to WorkerPool and Manager

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

* Implement Pausable and PushBack for the bytefifos

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

* Implement Pausable and Pushback for ChannelQueues and ChannelUniqueQueues

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

* Wire in UI for pausing

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

* add testcases and fix a few issues

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

* fix build

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

* prevent "race" in the test

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

* fix jsoniter mismerge

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

* fix conflicts

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

* fix format

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

* Add warnings for no worker configurations and prevent data-loss with redis/levelqueue

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

* Use StopTimer

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

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-22 21:22:14 +00:00
GiteaBot
f91092453e [skip ci] Updated translations via Crowdin 2022-01-22 00:28:20 +00:00
qwerty287
1f40933d38
Add config options to hide issue events (#17414)
* Add config option to hide issue events
Adds a config option `HIDE_ISSUE_EVENTS` to hide most issue events (changed labels, milestones, projects...) on the issue detail page.
If this is true, only the following events (comment types) are shown:
* plain comments
* closed/reopned/merged
* reviews

* Make configurable using a list

* Add docs

* Add missing newline

* Fix merge issues

* Allow changes per user settings

* Fix lint

* Rm old docs

* Apply suggestions from code review

* Use bitsets

* Rm comment

* fmt

* Fix lint

* Use variable/constant to provide key

* fmt

* fix lint

* refactor

* Add a prefix for user setting key

* Add license comment

* Add license comment

* Update services/forms/user_form_hidden_comments.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* check len == 0

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-01-21 18:59:26 +01:00
GiteaBot
6c7084cbee [skip ci] Updated translations via Crowdin 2022-01-21 00:30:19 +00:00
GiteaBot
b7c6457648 [skip ci] Updated translations via Crowdin 2022-01-19 21:28:43 +00:00
GiteaBot
c68f1281f6 [skip ci] Updated translations via Crowdin 2022-01-19 20:29:22 +00:00
GiteaBot
531b6d60e1 [skip ci] Updated translations via Crowdin 2022-01-19 18:28:18 +00:00
GiteaBot
eed8633fb0 [skip ci] Updated translations via Crowdin 2022-01-18 00:31:56 +00:00
GiteaBot
bd7680f450 [skip ci] Updated translations via Crowdin 2022-01-17 00:28:33 +00:00
GiteaBot
a15353dc00 [skip ci] Updated translations via Crowdin 2022-01-16 00:28:39 +00:00
zeripath
d7c2a2951c
Webauthn nits (#18284)
This contains some additional fixes and small nits related to #17957 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-15 17:52:56 +01:00
Lunny Xiao
35c3553870
Support webauthn (#17957)
Migrate from U2F to Webauthn

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-14 16:03:31 +01:00
GiteaBot
8808293247 [skip ci] Updated translations via Crowdin 2022-01-14 00:29:34 +00:00
GiteaBot
ed6757ecdc [skip ci] Updated translations via Crowdin 2022-01-11 00:28:42 +00:00
luzpaz
8c647bf0f6
Fix various typos (#18219)
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon`

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-01-10 17:32:37 +08:00
GiteaBot
60b945565d [skip ci] Updated translations via Crowdin 2022-01-10 00:28:05 +00:00
GiteaBot
de578bff8c [skip ci] Updated licenses and gitignores 2022-01-09 00:28:45 +00:00
GiteaBot
69a4bd02f0 [skip ci] Updated translations via Crowdin 2022-01-08 00:28:35 +00:00
KN4CK3R
e30b20dc68
Show OAuth callback error message (#18185)
* Show callback error message.

* lint

* Use error code to display a message.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-01-07 21:02:09 +00:00
zeripath
21ed4fd8da
Add warning for BIDI characters in page renders and in diffs (#17562)
Fix #17514

Given the comments I've adjusted this somewhat. The numbers of characters detected are increased and include things like the use of U+300 to make à instead of à and non-breaking spaces.

There is a button which can be used to escape the content to show it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Gwyneth Morgan <gwymor@tilde.club>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-07 02:18:52 +01:00
GiteaBot
ee60f27aec [skip ci] Updated translations via Crowdin 2022-01-07 00:28:31 +00:00
KN4CK3R
bf7b083cfe
Add replay of webhooks. (#18191) 2022-01-05 15:00:20 -06:00
Lunny Xiao
8760af752a
Team permission allow different unit has different permission (#17811)
* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* fix

* gofumpt

* Integration test for migration (#18124)

integrations: basic test for Gitea {dump,restore}-repo
This is a first step for integration testing of DumpRepository and
RestoreRepository. It:

runs a Gitea server,
dumps a repo via DumpRepository to the filesystem,
restores the repo via RestoreRepository from the filesystem,
dumps the restored repository to the filesystem,
compares the first and second dump and expects them to be identical

The verification is trivial and the goal is to add more tests for each
topic of the dump.

Signed-off-by: Loïc Dachary <loic@dachary.org>

* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* Fix bug

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Aravinth Manivannan <realaravinth@batsense.net>
2022-01-05 11:37:00 +08:00
GiteaBot
0848c716bf [skip ci] Updated translations via Crowdin 2022-01-04 00:28:34 +00:00
GiteaBot
f499f23039 [skip ci] Updated translations via Crowdin 2022-01-03 00:28:34 +00:00
GiteaBot
6a3611cc3d [skip ci] Updated licenses and gitignores 2022-01-02 00:28:42 +00:00
GiteaBot
a3d685077f [skip ci] Updated translations via Crowdin 2021-12-31 00:28:31 +00:00
GiteaBot
ccb7978538 [skip ci] Updated translations via Crowdin 2021-12-30 00:28:34 +00:00
Gusted
e4e3df6c66
Handle invalid issues (#18111)
* Handle invalid issues

- When you hover over a issue reference, and the issue doesn't exist, it
will just hang on the loading animation.
- This patch fixes that by showing them the pop-up with a "Error
occured" message.

* Add I18N

* refactor

* fix comment for lint

* fix unit test for i18n

* fix unit test for i18n

* add comments

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-12-28 21:28:27 +08:00
GiteaBot
d2fac636d1 [skip ci] Updated translations via Crowdin 2021-12-27 00:28:36 +00:00
GiteaBot
13d002a755 [skip ci] Updated translations via Crowdin 2021-12-26 00:28:42 +00:00
Lunny Xiao
d7770539f6
Improve interface when comparing a branch which has created a pull request (#17911)
* Improve interface when comparing a branch which has created a pull request

* Take the note back
2021-12-24 12:14:42 +00:00
qwerty287
5754080eb9
Fix various typos of software names (#18083)
* `git` -> `Git`
* `Github` and `github` -> `GitHub`
* `crowdin` -> `Crowdin`
* `git-lfs` -> `Git LFS`
* `githooks`, `git hooks`, `git-hooks` -> `Git Hooks`
* `discord` -> `Discord`
* `2fa` -> `2FA`
* `gitlab` and `Gitlab` -> `GitLab`
* `web hook` -> `webhook`
* `linux` -> `Linux`
* `sqlite` -> `SQLite`
* `MYSQL` and `mysql` -> `MySQL`
* rename refs to `master` branch -> `main`
* Fix English grammar
2021-12-24 11:56:57 +08:00
GiteaBot
d155ffc610 [skip ci] Updated translations via Crowdin 2021-12-22 00:28:37 +00:00
GiteaBot
be91df42d1 [skip ci] Updated translations via Crowdin 2021-12-21 00:28:39 +00:00
zeripath
e4e411821d
Abort merge if head has been updated before pressing merge (#18032)
* Abort merge if head has been updated before pressing merge

It is possible that a PR head may be pushed to between the merge page being shown
and the merge button being pressed. Pass the current expected head in as a parameter
and cancel the merge if it has changed.

Fix #18028

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

* adjust swagger

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

* fix test

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

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-12-20 08:32:54 +08:00
Wim
6fe756dc93
Add support for ssh commit signing (#17743)
* Add support for ssh commit signing

* Split out ssh verification to separate file

* Show ssh key fingerprint on commit page

* Update sshsig lib

* Make sure we verify against correct namespace

* Add ssh public key verification via ssh signatures

When adding a public ssh key also validate that this user actually
owns the key by signing a token with the private key.

* Remove some gpg references and make verify key optional

* Fix spaces indentation

* Update options/locale/locale_en-US.ini

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Update templates/user/settings/keys_ssh.tmpl

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Update options/locale/locale_en-US.ini

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Update options/locale/locale_en-US.ini

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Update models/ssh_key_commit_verification.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Reword ssh/gpg_key_success message

* Change Badsignature to NoKeyFound

* Add sign/verify tests

* Fix upstream api changes to user_model User

* Match exact on SSH signature

* Fix code review remarks

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-12-19 00:37:18 -05:00
GiteaBot
487ce3b49e [skip ci] Updated licenses and gitignores 2021-12-19 00:29:01 +00:00
GiteaBot
8662ff68da [skip ci] Updated translations via Crowdin 2021-12-18 00:28:35 +00:00
zeripath
8354670708
Prevent hang in git cat-file if repository is not a valid repository and other fixes (#17991)
This PR contains multiple fixes. The most important of which is:

* Prevent hang in git cat-file if the repository is not a valid repository 
    
    Unfortunately it appears that if git cat-file is run in an invalid
    repository it will hang until stdin is closed. This will result in
    deadlocked /pulls pages and dangling git cat-file calls if a broken
    repository is tried to be reviewed or pulls exists for a broken
    repository.

    Fix #14734
    Fix #9271
    Fix #16113

Otherwise there are a few small other fixes included which this PR was initially intending to fix:

* Fix panic on partial compares due to missing PullRequestWorkInProgressPrefixes
* Fix links on pulls pages  due to regression from #17551 - by making most /issues routes match /pulls too - Fix #17983
* Fix links on feeds pages due to another regression from #17551 but also fix issue with syncing tags - Fix #17943
* Add missing locale entries for oauth group claims
* Prevent NPEs if ColorFormat is called on nil users, repos or teams.
2021-12-16 19:01:14 +00:00
zeripath
e0e3ba6c12
Add Reindex buttons to repository settings page (#17494)
This PR adds reindexing request buttons to the repository settings page.

Fix #3796

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

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-12-16 23:55:12 +08:00
GiteaBot
e78ee73d71 [skip ci] Updated translations via Crowdin 2021-12-16 00:28:34 +00:00
GiteaBot
790e6cfeec [skip ci] Updated translations via Crowdin 2021-12-15 00:25:11 +00:00
zeripath
0981ec30c3
Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766)
* Add setting to OAuth handlers to override local 2FA settings

This PR adds a setting to OAuth and OpenID login sources to allow the source to
override local 2FA requirements.

Fix #13939

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

* Fix regression from #16544

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

* Add scopes settings

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

* fix trace logging in auth_openid

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

* add required claim options

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

* Move UpdateExternalUser to externalaccount

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

* Allow OAuth2/OIDC to set Admin/Restricted status

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

* Allow use of the same group claim name for the prohibit login value

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

* fixup! Move UpdateExternalUser to externalaccount

* as per wxiaoguang

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

* add label back in

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

* adjust localisation

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

* placate lint

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

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-12-14 16:37:11 +08:00
zeripath
b4782e24d2
Return nicer error for ForcePrivate (#17971) 2021-12-14 00:08:09 -05:00
KN4CK3R
8e9140dd69
Fixed wording. (#17973)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-12-14 09:45:39 +08:00
GiteaBot
bd475f5c9d [skip ci] Updated translations via Crowdin 2021-12-14 00:25:09 +00:00
qwerty287
c3eea2f8af
Improve behavior of "Fork" button (#17288)
* Improbe behaviour of fork button

* Apply suggestions from code review

* Remove old lines

* Apply suggestions

* Fix test

* Remove unnecessary or

* Update templates/repo/header.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Add comment

* Fix situation if you can't fork but don't have forks

* Fix lint

* Apply changes from #17783

* fmt

* fmt

* Apply tweaks

Co-authored by: silverwind <me@silverwind.io>

* Rm dupl css

* Fix build

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-12-13 09:59:09 +08:00
GiteaBot
0a7e8327a0 [skip ci] Updated licenses and gitignores 2021-12-12 00:25:18 +00:00
GiteaBot
fb8166c6c6 [skip ci] Updated translations via Crowdin 2021-12-10 00:25:26 +00:00
GiteaBot
183175263d [skip ci] Updated translations via Crowdin 2021-12-09 00:25:09 +00:00
wxiaoguang
a6f961fba4
Refactor install page (db type) (#17919)
* Refactor install page (db type)

* set correct default DB HOST for different DB TYPE
* remove legacy TiDB from documents
* unify the usage of DB TYPE, in code we only use "mysql". "MySQL" is only shown to users for friendly name.

* Gitea can use TiDB via MySQL protocol

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-12-07 13:44:08 +08:00
GiteaBot
b30870ef8b [skip ci] Updated translations via Crowdin 2021-12-07 00:25:13 +00:00
GiteaBot
6c34f6b954 [skip ci] Updated translations via Crowdin 2021-12-06 00:24:54 +00:00
GiteaBot
98d903a3c6 [skip ci] Updated licenses and gitignores 2021-12-05 00:25:15 +00:00
wxiaoguang
a1dca00974
fix i18n (#17906) 2021-12-04 23:24:10 +08:00
GiteaBot
c7c723c548 [skip ci] Updated translations via Crowdin 2021-12-04 00:26:13 +00:00
n
6791aae8de
Add hints for special Wiki pages (#17283)
* Add UI hints to create a Wiki sidebar and footer
2021-12-03 15:28:54 +08:00
GiteaBot
365b16cde1 [skip ci] Updated translations via Crowdin 2021-12-03 00:25:09 +00:00
KN4CK3R
87be76213a
Add migrate from Codebase (#16768)
This PR adds [Codebase](https://www.codebasehq.com/) as migration source.

Supported:
- Milestones
- Issues
- Pull Requests
- Comments
- Labels
2021-12-02 23:24:02 +01:00
GiteaBot
7026a30fdc [skip ci] Updated translations via Crowdin 2021-12-02 00:25:09 +00:00
wxiaoguang
042cac5fed
Improve install code to avoid low-level mistakes. (#17779)
* Improve install code to avoid low-level mistakes.

If a user tries to do a re-install in a Gitea database, they gets a warning and double check.
When Gitea runs, it never create empty app.ini automatically.

Also some small (related) refactoring:

* Refactor db.InitEngine related logic make it more clean (especially for the install code)
* Move some i18n strings out from setting.go to make the setting.go can be easily maintained.
* Show errors in CLI code if an incorrect app.ini is used.
* APP_DATA_PATH is created when installing, and checked when starting (no empty directory is created any more).
2021-12-01 15:50:01 +08:00
GiteaBot
a3517d8668 [skip ci] Updated translations via Crowdin 2021-12-01 00:25:14 +00:00
zeripath
01087e9eef
Make Requests Processes and create process hierarchy. Associate OpenRepository with context. (#17125)
This PR registers requests with the process manager and manages hierarchy within the processes.

Git repos are then associated with a context, (usually the request's context) - with sub commands using this context as their base context.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-11-30 20:06:32 +00:00
GiteaBot
eb8513a690 [skip ci] Updated translations via Crowdin 2021-11-30 00:25:14 +00:00
GiteaBot
789d251ae4 [skip ci] Updated translations via Crowdin 2021-11-27 00:25:11 +00:00
GiteaBot
f23851f690 [skip ci] Updated translations via Crowdin 2021-11-26 00:25:09 +00:00
GiteaBot
4f99697888 [skip ci] Updated translations via Crowdin 2021-11-25 00:25:19 +00:00
GiteaBot
3d996c85a5 [skip ci] Updated translations via Crowdin 2021-11-24 00:25:19 +00:00
GiteaBot
c79cc2d3e8 [skip ci] Updated translations via Crowdin 2021-11-23 00:31:08 +00:00
zeripath
1dbc58f742
More pleasantly handle broken or missing git repositories (#17747)
* More pleasantly handle broken or missing git repositories

In #17742 it was noted that there a completely invalid git repository underlying a
repo on gitea.com. This happened due to a problem during a migration however, it
is not beyond the realms of possibility that a corruption could occur to another
user.

This PR adds a check to RepoAssignment that will detect if a repository loading has
failed due to an absent git repository. It will then show a page suggesting the user
contacts the administrator or deletes the repository.

Fix #17742

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

* Update options/locale/locale_en-US.ini

Co-authored-by: techknowlogick <techknowlogick@gitea.io>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-11-22 22:32:16 +00:00
GiteaBot
55e9228866 [skip ci] Updated translations via Crowdin 2021-11-22 00:24:56 +00:00
zeripath
8511eec4d4
Allow Loading of Diffs that are too large (#17739)
* Allow Loading of Diffs that are too large

This PR allows the loading of diffs that are suppressed because the file
is too large. It does not handle diffs of files which have lines which
are too long.

Fix #17738

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-11-22 00:51:08 +08:00
GiteaBot
ab09296d37 [skip ci] Updated licenses and gitignores 2021-11-21 00:25:17 +00:00
wxiaoguang
013fb73068
Use hostmatcher to replace matchlist, improve security (#17605)
Use hostmacher to replace matchlist.

And we introduce a better DialContext to do a full host/IP check, otherwise the attackers can still bypass the allow/block list by a 302 redirection.
2021-11-20 17:34:05 +08:00
GiteaBot
52869ef386 [skip ci] Updated translations via Crowdin 2021-11-20 00:25:08 +00:00
Gusted
381e131fc8
Added comment for changing issue ref (#17672)
* Added comment for changing issue ref
- Add a comment when someone changes the ref(erence?) of a issue.
2021-11-19 17:54:31 +08:00
GiteaBot
72b0882a45 [skip ci] Updated translations via Crowdin 2021-11-19 00:25:46 +00:00
GiteaBot
b01f6c1a8c [skip ci] Updated translations via Crowdin 2021-11-18 00:25:14 +00:00
KN4CK3R
ea42d3c04e
Fixed commit count. (#17698)
Added "Tag" label.
Unified branch, tag and commit name.
2021-11-17 23:50:17 +00:00
GiteaBot
171f2d066e [skip ci] Updated translations via Crowdin 2021-11-17 00:25:11 +00:00
qwerty287
3be156f66a
Allow admins to change user avatars (#17661)
Adds the avatar change panel to the edit user page (bottom) and allows admins to change it this way

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2021-11-16 19:13:13 +00:00
zeripath
bbffcc3aec
Multiple Escaping Improvements (#17551)
There are multiple places where Gitea does not properly escape URLs that it is building and there are multiple places where it builds urls when there is already a simpler function available to use this.
    
This is an extensive PR attempting to fix these issues.

1. The first commit in this PR looks through all href, src and links in the Gitea codebase and has attempted to catch all the places where there is potentially incomplete escaping.
2. Whilst doing this we will prefer to use functions that create URLs over recreating them by hand.
3. All uses of strings should be directly escaped - even if they are not currently expected to contain escaping characters. The main benefit to doing this will be that we can consider relaxing the constraints on user names and reponames in future. 
4. The next commit looks at escaping in the wiki and re-considers the urls that are used there. Using the improved escaping here wiki files containing '/'. (This implementation will currently still place all of the wiki files the root directory of the repo but this would not be difficult to change.)
5. The title generation in feeds is now properly escaped.
6. EscapePound is no longer needed - urls should be PathEscaped / QueryEscaped as necessary but then re-escaped with Escape when creating html with locales Signed-off-by: Andrew Thornton <art27@cantab.net>

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-11-16 18:18:25 +00:00
silverwind
23bd7b1211
Add copy button to markdown code blocks (#17638)
* Add copy button to markdown code blocks

Done mostly in JS because I think it's better not to try getting buttons
past the markup sanitizer.

* add svg module tests

* fix sanitizer regexp

* remove outdated comment

* vertically center button in issue comments as well

* add comment to css

* fix undefined on view file line copy

* combine animation less files

* Update modules/markup/markdown/markdown.go

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

* add test for different sizes

* add cloneNode and add tests for it

* use deep clone

* remove useless optional chaining

* remove the svg node cache

* unify clipboard copy string and i18n

* remove unused var

* remove unused localization

* minor css tweaks to the button

* comment tweak

* remove useless attribute

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-11-16 16:16:05 +08:00
GiteaBot
3a60e0ad89 [skip ci] Updated translations via Crowdin 2021-11-16 00:25:21 +00:00
KN4CK3R
ff9564a679
Changed migration text. (#17654) 2021-11-15 18:12:09 -05:00
Gusted
562785ef4e
Add download button for file viewer (#17640)
- Resolves #17286
- Use the `download` attribute such that the browser will natively
initate a download dialog for the given URL.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-11-15 09:05:12 +08:00
GiteaBot
10db864c66 [skip ci] Updated translations via Crowdin 2021-11-15 00:24:54 +00:00
KN4CK3R
42ea0023a3
Add migration from GitBucket (#16767)
This PR adds [GitBucket](https://gitbucket.github.io/) as migration source.

Supported:
- Milestones
- Issues
- Pull Requests
- Comments
- Reviews
- Labels

There is no public usable instance so no integration tests added.
2021-11-14 20:11:10 +01:00
GiteaBot
424959e07c [skip ci] Updated licenses and gitignores 2021-11-14 00:26:06 +00:00
zeripath
bab95c3a86
Correctly handle failed migrations (#17575)
* Correctly handle failed migrations

There is a bug in handling failed migrations whereby the migration task gets decoupled
from the migration repository. This leads to a failure of the task to get deleted with
the repository and also leads to the migration failed page resulting in a ISE.

This PR removes the zeroing out of the task id from the migration but also makes
the migration handler tolerate missing tasks much nicer.

Fix #17571

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-11-13 19:28:50 +08:00
GiteaBot
465fb4169e [skip ci] Updated translations via Crowdin 2021-11-10 00:25:15 +00:00
Kamil Domański
021df29623
Allow U2F 2FA without TOTP (#11573)
This change enables the usage of U2F without being forced to enroll an TOTP authenticator.
The `/user/auth/u2f` has been changed to hide the "use TOTP instead" bar if TOTP is not enrolled.

Fixes #5410
Fixes #17495
2021-11-08 23:47:19 +01:00
GiteaBot
c9110eb5e4 [skip ci] Updated translations via Crowdin 2021-11-07 00:25:43 +00:00
Yuwei Ba
5e0cf4b82e
Update locale_en-US.ini (#17553) 2021-11-05 15:23:55 -04:00
GiteaBot
de9625e485 [skip ci] Updated translations via Crowdin 2021-11-05 00:25:11 +00:00
GiteaBot
1ff944f698 [skip ci] Updated licenses and gitignores 2021-10-31 00:25:12 +00:00
GiteaBot
f5bb788c4e [skip ci] Updated translations via Crowdin 2021-10-30 00:25:09 +00:00
GiteaBot
9733b60430 [skip ci] Updated translations via Crowdin 2021-10-29 00:25:11 +00:00
zeripath
3fc465ba5e
Fix mispelling of starred as stared (#17465)
There was a recent spelling mistake added to the locale file where stared was used
instead of starred.

This PR changes this to starred.

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

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-10-28 15:05:00 +08:00
qwerty287
01fc24c78c
Add appearance section in settings (#17433)
* Add appearance section in settings

* Fix lint

* Fix lint

* Apply suggestions from code review

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2021-10-27 23:40:08 +08:00
GiteaBot
843bc9deeb [skip ci] Updated translations via Crowdin 2021-10-25 00:25:06 +00:00
GiteaBot
07c7100c60 [skip ci] Updated translations via Crowdin 2021-10-24 00:25:14 +00:00
GiteaBot
2a9aefdabb [skip ci] Updated translations via Crowdin 2021-10-23 00:28:47 +00:00
GiteaBot
23d36929bc [skip ci] Updated translations via Crowdin 2021-10-22 00:25:10 +00:00
zeripath
09938ccd99
Re-separate the color translation strings (#17390)
Fix #17384

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-10-21 23:51:03 +02:00
GiteaBot
9046c022d2 [skip ci] Updated translations via Crowdin 2021-10-21 00:25:11 +00:00
Mario Lubenka
0208ea0248
"Copy branch name" button in pull request (#17323)
* Drop data-original from clipboard

data-original attribute was removed. Instead, the original value from
data-content is set after success/fail message was displayed.

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

* "Copy branch name" button in pull request

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

* Update templates/repo/issue/view_title.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
2021-10-19 13:32:11 -04:00
GiteaBot
1f41fcc342 [skip ci] Updated translations via Crowdin 2021-10-19 00:25:06 +00:00
GiteaBot
62a6717701 [skip ci] Updated translations via Crowdin 2021-10-18 00:25:12 +00:00
GiteaBot
8af5450cf7 [skip ci] Updated translations via Crowdin 2021-10-17 00:29:40 +00:00
6543
3728f1daa0
Add RSS/Atom feed support for user actions (#16002)
Return rss/atom feed for user based on rss url suffix or Content-Type header.
2021-10-16 16:21:16 +02:00
GiteaBot
74b6805225 [skip ci] Updated translations via Crowdin 2021-10-16 00:25:26 +00:00
zeripath
a889d0cc8c
Add buttons to allow loading of incomplete diffs (#16829)
This PR adds two buttons to the stats and the end of the diffs list to load the (some of) the remaining incomplete diff sections.

Contains #16775
    
Signed-off-by: Andrew Thornton <art27@cantab.net>


## Screenshots

### Show more button at the end of the diff
![Screenshot from 2021-09-04 11-12-37](https://user-images.githubusercontent.com/1824502/132091009-b1f6113e-2c04-4be5-8a04-b8ecea56887b.png)

### Show more button at the end of the diff stats box
![Screenshot from 2021-09-04 11-14-54](https://user-images.githubusercontent.com/1824502/132091063-86da5a6d-6628-4b82-bea9-3655cd9f40f6.png)
2021-10-15 17:05:33 +01:00
Lunny Xiao
bdfd751af8
Multiple tokens support for migrating from github (#17134)
* multiple tokens support for migrating from github

* improve code and token description

* Fix bug

* Add comment for get client
2021-10-15 13:47:15 +08:00
GiteaBot
96ff3e310f [skip ci] Updated translations via Crowdin 2021-10-15 00:25:10 +00:00
GiteaBot
bd14c40461 [skip ci] Updated translations via Crowdin 2021-10-14 00:25:07 +00:00
wxiaoguang
7bcbdd0707
Add user status filter to admin user management page (#16770)
It makes Admin's life easier to filter users by various status.

* introduce window.config.PageData to pass template data to javascript module and small refactor

move legacy window.ActivityTopAuthors to window.config.PageData.ActivityTopAuthors
make HTML structure more IDE-friendly in footer.tmpl and head.tmpl
remove incorrect <style class="list-search-style"></style> in head.tmpl
use log.Error instead of log.Critical in admin user search

* use LEFT JOIN instead of SubQuery when admin filters users by 2fa. revert non-en locale.

* use OptionalBool instead of status map

* refactor SearchUserOptions.toConds to SearchUserOptions.toSearchQueryBase

* add unit test for user search

* only allow admin to use filters to search users
2021-10-12 20:11:35 +02:00
GiteaBot
7b8723158e [skip ci] Updated translations via Crowdin 2021-10-12 00:25:09 +00:00
GiteaBot
758c8c8446 [skip ci] Updated translations via Crowdin 2021-10-11 00:25:06 +00:00
wxiaoguang
c5c88f2f18
Save and view issue/comment content history (#16909)
* issue content history

* Use timeutil.TimeStampNow() for content history time instead of issue/comment.UpdatedUnix (which are not updated in time)

* i18n for frontend

* refactor

* clean up

* fix refactor

* re-format

* temp refactor

* follow db refactor

* rename IssueContentHistory to ContentHistory, remove empty model tags

* fix html

* use avatar refactor to generate avatar url

* add unit test, keep at most 20 history revisions.

* re-format

* syntax nit

* Add issue content history table

* Update models/migrations/v197.go

Co-authored-by: 6543 <6543@obermui.de>

* fix merge

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-10-10 18:40:03 -04:00
GiteaBot
ff9a8a2231 [skip ci] Updated translations via Crowdin 2021-10-10 00:25:11 +00:00
GiteaBot
6d30a00762 [skip ci] Updated translations via Crowdin 2021-10-09 00:25:09 +00:00
a1012112796
bb39359668
Add a simple way to rename branch like gh (#15870)
- Update default branch if needed
- Update protected branch if needed
- Update all not merged pull request base branch name
- Rename git branch
- Record this rename work and auto redirect for old branch on ui

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: delvh <dev.lh@web.de>
2021-10-08 19:03:04 +02:00
GiteaBot
f4ea6cc4b4 [skip ci] Updated translations via Crowdin 2021-10-05 00:25:07 +00:00
GiteaBot
dd22c65002 [skip ci] Updated translations via Crowdin 2021-10-04 00:25:03 +00:00
qwerty287
47193dbcd9
Add option to copy line permalink (#17145)
* Add option to copy line permalink

* Fix lint

* Apply review suggestions

* Update code and fix lint

* Use features/clipboard.js framework
2021-10-02 10:46:43 +03:00
GiteaBot
5b2b2cf923 [skip ci] Updated translations via Crowdin 2021-10-02 00:25:02 +00:00
GiteaBot
347d48fdfe [skip ci] Updated translations via Crowdin 2021-10-01 00:25:01 +00:00
GiteaBot
ac10c4ecc2 [skip ci] Updated translations via Crowdin 2021-09-30 00:25:39 +00:00
zeripath
ddd3586c06
Fix missing repo link in issue/pull assigned emails (#17183)
There was a mistake in the template file: `templates/mail/issue/assigned.tmpl`
where the repourl was generated from a non-existent release instead of the issue.

This PR changes this to use the issue but also ensure that the issue repo is loaded.

It also slightly improves the English locale string.

Fix #17160

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
2021-09-30 01:20:18 +02:00
Romain
ecfac78f6e
Kanban colored boards (#16647)
Add a column Color in ProjectBoard and color picker in new / edit project board form.
2021-09-29 22:53:12 +02:00
GiteaBot
51bfe62bd9 [skip ci] Updated translations via Crowdin 2021-09-29 00:25:04 +00:00
GiteaBot
4389b2cacf [skip ci] Updated translations via Crowdin 2021-09-28 00:05:15 +00:00
zeripath
920608e592
Support direct comparison (git diff a..b) as well merge comparison (a...b) (#16635)
This PR changes the compare page to make the "..." in the between branches a clickable
link. This changes the comparison type from "..." to "..". Similarly it makes the
initial compare icon clickable to switch the head and base branches.

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

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-09-27 13:19:34 +01:00
zeripath
123f0aea00
Allow LDAP Sources to provide Avatars (#16851)
* Allow LDAP Sources to provide Avatars

Add setting to LDAP source to allow it to provide an Avatar.

Currently this is required to point to the image bytes.

Fix #4144

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

* Rename as Avatar Attribute (drop JPEG)

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

* Always synchronize avatar if there is change

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

* Actually get the avatar from the ldap

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

* clean-up

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

* use len()>0 rather than != ""

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

* slight shortcut in IsUploadAvatarChanged

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-09-26 22:39:36 -04:00
GiteaBot
74542ad35b [skip ci] Updated translations via Crowdin 2021-09-26 00:05:01 +00:00
GiteaBot
cbd5dc4dd6 [skip ci] Updated translations via Crowdin 2021-09-25 00:04:51 +00:00
crapStone
4a2655098f
Unify issue and pr subtitles (#17133) 2021-09-23 18:57:52 +02:00
GiteaBot
d4bb8e0ae7 [skip ci] Updated translations via Crowdin 2021-09-20 00:04:38 +00:00
GiteaBot
462306e263 [skip ci] Updated licenses and gitignores 2021-09-19 00:05:00 +00:00
GiteaBot
693bea9780 [skip ci] Updated translations via Crowdin 2021-09-18 00:05:15 +00:00
GiteaBot
f96d0d3d5b [skip ci] Updated translations via Crowdin 2021-09-17 00:04:54 +00:00
GiteaBot
5a42e72c04 [skip ci] Updated translations via Crowdin 2021-09-15 00:05:33 +00:00
GiteaBot
132c8c43e1 [skip ci] Updated translations via Crowdin 2021-09-13 00:05:10 +00:00
GiteaBot
20a2e26e99 [skip ci] Updated translations via Crowdin 2021-09-12 00:05:05 +00:00
Jimmy Praet
3d6cb25e31
Support unprotected file patterns (#16395)
Fixes #16381

Note that changes to unprotected files via the web editor still cannot be pushed directly to the protected branch. I could easily add such support for edits and deletes if needed. But for adding, uploading or renaming unprotected files, it is not trivial.

* Extract & Move GetAffectedFiles to modules/git
2021-09-11 16:21:17 +02:00
GiteaBot
eb03e819d3 [skip ci] Updated translations via Crowdin 2021-09-11 00:05:02 +00:00
zeripath
9ca0e7905c
Add setting to OAuth handlers to skip local 2FA authentication (#16594)
This PR adds a setting to OAuth and OpenID login sources to allow the source to
skip local 2FA authentication.

Fix #13939

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-10 18:37:57 +02:00
zeripath
248b96d8a3
Use git attributes to determine generated and vendored status for language stats and diffs (#16773)
Replaces #16262
Replaces #16250
Replaces #14833

This PR first implements a `git check-attr` pipe reader - using `git check-attr --stdin -z --cached` - taking account of the change in the output format in git 1.8.5 and creates a helper function to read a tree into a temporary index file for that pipe reader.

It then wires this in to the language stats helper and into the git diff generation.

Files which are marked generated will be folded by default.

Fixes #14786
Fixes #12653
2021-09-09 21:13:36 +01:00
GiteaBot
df2c7901e6 [skip ci] Updated translations via Crowdin 2021-09-09 00:04:58 +00:00
GiteaBot
ded438fb1a [skip ci] Updated translations via Crowdin 2021-09-07 00:04:55 +00:00
GiteaBot
5a73153493 [skip ci] Updated translations via Crowdin 2021-09-04 00:04:54 +00:00
GiteaBot
219dec030d [skip ci] Updated translations via Crowdin 2021-09-03 00:04:56 +00:00
GiteaBot
9b4280ea4b [skip ci] Updated translations via Crowdin 2021-09-02 00:04:56 +00:00
a1012112796
cbf05c3f79
Add option to update pull request by rebase (#16125)
* add option to update pull request by `rebase`

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-08-31 16:03:45 +02:00
GiteaBot
b0ff429882 [skip ci] Updated translations via Crowdin 2021-08-30 00:04:50 +00:00
GiteaBot
5e71b9c200 [skip ci] Updated translations via Crowdin 2021-08-29 00:04:59 +00:00
zeripath
e37342db0c
Add modals to Organization and Team remove/leave (#16471)
* Add modals to Organization and Team remove/leave

Add confirmation modals to Organization and Team remove and leave.

Fix #16215

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

* avoid for-in

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

* Revert "avoid for-in"

This reverts commit 2af9a6f9d4.

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-08-26 22:57:40 -04:00
GiteaBot
3289aceec2 [skip ci] Updated translations via Crowdin 2021-08-27 00:04:45 +00:00
GiteaBot
c446901a5d [skip ci] Updated translations via Crowdin 2021-08-26 00:04:46 +00:00
delvh
20efc6b56c
Unify migration descriptions (#16781)
* Unify migration descriptions

* Clarify that pure Git migration differs from other migrations

Co-authored-by: Norwin <noerw@users.noreply.github.com>

* Use Pull Requests for Gitea migration

Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
2021-08-25 21:47:05 +08:00
John Olheiser
648464b504
Add bundle download for repository (#14538)
* Add bundle download

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

* Fix fmt

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

* Fix build tags

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

* Download specific commit

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2021-08-24 11:47:09 -05:00
GiteaBot
d22cb600ed [skip ci] Updated translations via Crowdin 2021-08-24 00:04:47 +00:00
GiteaBot
94f529af02 [skip ci] Updated translations via Crowdin 2021-08-23 00:04:31 +00:00
GiteaBot
208ae9e996 [skip ci] Updated licenses and gitignores 2021-08-22 00:06:14 +00:00
KN4CK3R
cee5f7c5e2
Add migrate from OneDev (#16356)
* Use context to simplify logic.

* Added migration from OneDev.
This PR adds [OneDev](https://code.onedev.io/) as migration source.

Supported:
- [x] Milestones
- [x] Issues
- [x] Pull Requests
- [x] Comments
- [x] Reviews
- [x] Labels
2021-08-22 00:47:45 +02:00
Steven
3ecc4a1b9e
Fix dependency translations (#16753)
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-08-21 00:13:45 +01:00
GiteaBot
65c6acccf6 [skip ci] Updated translations via Crowdin 2021-08-18 00:04:48 +00:00
GiteaBot
cf4328359b [skip ci] Updated translations via Crowdin 2021-08-17 00:07:42 +00:00
GiteaBot
fe3299614a [skip ci] Updated translations via Crowdin 2021-08-16 00:07:41 +00:00
GiteaBot
f5158b4304 [skip ci] Updated translations via Crowdin 2021-08-15 00:07:47 +00:00
delvh
d17f555fe3
Improve resource string (#16691)
* Improve resource string

Co-authored-by: zeripath <art27@cantab.net>
2021-08-14 16:10:39 +02:00
GiteaBot
bbf9f41354 [skip ci] Updated translations via Crowdin 2021-08-14 00:07:48 +00:00
GiteaBot
6bf5afe5de [skip ci] Updated translations via Crowdin 2021-08-13 00:07:45 +00:00
a1012112796
ca13e1d56c
Add link to vscode to repo header (#16664)
add link to vscode to repo header

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-08-12 14:21:34 +02:00
zeripath
e29e163737
Improve SMTP authentication and Fix user creation bugs (#16612)
* Improve SMTP authentication, Fix user creation bugs and add LDAP cert/key options

This PR has two parts:

Improvements for SMTP authentication:

* Default to use SMTPS if port is 465, and allow setting of force SMTPS.
* Always use STARTTLS if available
* Provide CRAM-MD5 mechanism
* Add options for HELO hostname disabling
* Add options for providing certificates and keys
* Handle application specific password response as a failed user login
instead of as a 500.

Close #16104

Fix creation of new users:

* A bug was introduced when allowing users to change usernames which
prevents the creation of external users.
* The LoginSource refactor also broke this page.

Close #16104

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-08-11 21:42:58 +01:00
GiteaBot
2eeae4edb6 [skip ci] Updated translations via Crowdin 2021-08-11 00:07:40 +00:00
GiteaBot
1dc41c47b9 [skip ci] Updated translations via Crowdin 2021-08-09 00:07:47 +00:00
GiteaBot
07bc380c9f [skip ci] Updated translations via Crowdin 2021-08-08 00:07:46 +00:00
GiteaBot
2bbf1313b4 [skip ci] Updated translations via Crowdin 2021-08-07 00:07:42 +00:00
zeripath
ab9bb54144
Add microsoft oauth2 providers (#16544)
* Clean up oauth2 providers

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

* Add AzureAD, AzureADv2, MicrosoftOnline OAuth2 providers

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

* Apply suggestions from code review

* remove unused Scopes

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-08-05 21:11:08 -04:00
GiteaBot
7e7006e00d [skip ci] Updated translations via Crowdin 2021-08-06 00:08:10 +00:00
GiteaBot
f03abe8fb1 [skip ci] Updated translations via Crowdin 2021-08-04 00:07:39 +00:00
Albert ARIBAUD
a51cb3d4cb
Make PR merge options more intuitive (#5863) (#16582)
Reword options making clear whether the PRed branch is rebased or not, and which type of commit will be created if any.
2021-08-02 20:23:57 +01:00
GiteaBot
3375e7658e [skip ci] Updated translations via Crowdin 2021-08-02 00:07:40 +00:00
GiteaBot
b73e421646 [skip ci] Updated translations via Crowdin 2021-08-01 00:07:51 +00:00
GiteaBot
e8306505f2 [skip ci] Updated translations via Crowdin 2021-07-31 00:07:42 +00:00
Marty
4e68d6f41d
Show correct text when comparing commits on empty pull request (#16569)
* fix

* use own text

* Update templates/repo/commits_table.tmpl

Co-authored-by: marty <m.karkossa@ultraware.nl>
Co-authored-by: zeripath <art27@cantab.net>
2021-07-29 03:32:48 +01:00
GiteaBot
4b6370c46d [skip ci] Updated translations via Crowdin 2021-07-27 00:07:52 +00:00
GiteaBot
e76f8cac9a [skip ci] Updated translations via Crowdin 2021-07-26 00:07:41 +00:00
GiteaBot
4f23624b16 [skip ci] Updated licenses and gitignores 2021-07-25 00:07:38 +00:00
GiteaBot
342f338bda [skip ci] Updated translations via Crowdin 2021-07-24 00:07:49 +00:00
lengyuqu
078e2b2c39
Add support for corporate WeChat webhooks (#15910)
* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* Update templates/admin/hook_new.tmpl

Co-authored-by: a1012112796 <1012112796@qq.com>

* Update services/webhook/wechatwork.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* 修善wechatwork

* 修善wechatwork

* fix

* Update locale_cs-CZ.ini

fix

* fix build

* fix

* fix build

* make webhooks.zh-cn.md

* delet unnecessary blank line

* delet unnecessary blank line

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* Update templates/admin/hook_new.tmpl

Co-authored-by: a1012112796 <1012112796@qq.com>

* Update services/webhook/wechatwork.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* 修善wechatwork

* 修善wechatwork

* fix

* fix build

* fix

* fix build

* make webhooks.zh-cn.md

* delet unnecessary blank line

* delet unnecessary blank line

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix

* fix

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix wechat

* fix wechat

* fix wechat

* fix wechat

* Fix invalid params and typo of email templates (#16394)

Signed-off-by: Meano <meanocat@gmail.com>

* Add LRU mem cache implementation (#16226)

The current default memory cache implementation is unbounded in size and number of
objects cached. This is hardly ideal.

This PR proposes creating a TwoQueue LRU cache as the underlying cache for Gitea.
The cache is limited by the number of objects stored in the cache (rather than size)
for simplicity. The default number of objects is 50000 - which is perhaps too small
as most of our objects cached are going to be much less than 1kB.

It may be worth considering using a different LRU implementation that actively limits
sizes or avoids GC - however, this is just a beginning implementation.

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

* [skip ci] Updated translations via Crowdin

* Replace `plugins/docker` with `techknowlogick/drone-docker`in ci (#16407)

* plugins/docker -> techknowlogick/drone-docker

* It is multi-arch

* docs: rewrite email setup (#16404)

* Add intro for both the docs page and mailer methods
  * Fix numbering level in SMTP section
  * Recommends implicit TLS

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

* Validate Issue Index before querying DB (#16406)

* Fix external renderer (#16401)

* fix external renderer

* use GBackground context as fallback

* no fallback, return error

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

* Add checkbox to delete pull branch after successful merge (#16049)

* Add checkbox to delete pull branch after successful merge

* Omit DeleteBranchAfterMerge field in json

* Log a warning instead of error when PR head branch deleted

* Add DefaultDeleteBranchAfterMerge to PullRequestConfig

* Add support for delete_branch_after_merge via API

* Fix for API: the branch should be deleted from the HEAD repo

If head and base repo are the same, reuse the already opened ctx.Repo.GitRepo

* Don't delegate to CleanupBranch, only reuse branch deletion code

CleanupBranch contains too much logic that has already been performed by the Merge

* Reuse gitrepo in MergePullRequest

Co-authored-by: Andrew Thornton <art27@cantab.net>

* [skip ci] Updated translations via Crowdin

* Detect encoding changes while parsing diff (#16330)

* Detect encoding changes while parsing diff

* Let branch/tag name be a valid ref to get CI status (#16400)

* fix #16384#

* refactor: move shared helper func to utils package

* extend Tests

* use ctx.Repo.GitRepo if not nil

* fix

* fix

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix build

* fix build

* Apply suggestions from code review

Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: myheavily <myheavily>
Co-authored-by: zhaoxin <gitea@fake.local>
Co-authored-by: Meano <Meano@foxmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: GiteaBot <teabot@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Bagas Sanjaya <bagasdotme@gmail.com>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-23 12:41:27 +08:00
GiteaBot
afb040e021 [skip ci] Updated translations via Crowdin 2021-07-23 00:07:51 +00:00
GiteaBot
9f02d1c3c0 [skip ci] Updated translations via Crowdin 2021-07-22 00:07:51 +00:00
GiteaBot
2256499db5 [skip ci] Updated translations via Crowdin 2021-07-19 00:07:50 +00:00
GiteaBot
29d4917660 [skip ci] Updated translations via Crowdin 2021-07-18 00:07:50 +00:00
a1012112796
ec357833bc
show tag name on dashboard items list (#16466)
fix #16458

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-07-17 23:21:04 +02:00
GiteaBot
e417cca777 [skip ci] Updated translations via Crowdin 2021-07-16 00:07:52 +00:00
GiteaBot
aed086f8b0 [skip ci] Updated translations via Crowdin 2021-07-15 15:07:57 +00:00
GiteaBot
8484ee2c28 [skip ci] Updated translations via Crowdin 2021-07-15 10:07:52 +00:00
GiteaBot
5cc5dfe036 [skip ci] Updated translations via Crowdin 2021-07-15 09:08:09 +00:00
GiteaBot
11c79b56da [skip ci] Updated translations via Crowdin 2021-07-14 20:07:55 +00:00
GiteaBot
14b6257160 [skip ci] Updated translations via Crowdin 2021-07-14 15:07:54 +00:00
GiteaBot
ee43d70a0c [skip ci] Updated translations via Crowdin 2021-07-14 14:07:52 +00:00
GiteaBot
0ead8cea6c [skip ci] Updated translations via Crowdin 2021-07-14 13:08:17 +00:00
6543
8798e3a098
Use TrN helper for email templates (#16425)
* Add TrN helper

* use TrN

* a nit
2021-07-14 15:06:09 +02:00
delvh
8464fa15d0
Make gpg resource string more readable (#16423) 2021-07-14 12:50:39 +02:00
GiteaBot
febee86d0d [skip ci] Updated translations via Crowdin 2021-07-14 00:07:53 +00:00
zeripath
b82293270c
Add option to provide signature for a token to verify key ownership (#14054)
* Add option to provide signed token to verify key ownership

Currently we will only allow a key to be matched to a user if it matches
an activated email address. This PR provides a different mechanism - if
the user provides a signature for automatically generated token (based
on the timestamp, user creation time, user ID, username and primary
email.

* Ensure verified keys can act for all active emails for the user

* Add code to mark keys as verified

* Slight UI adjustments

* Slight UI adjustments 2

* Simplify signature verification slightly

* fix postgres test

* add api routes

* handle swapped primary-keys

* Verify the no-reply address for verified keys

* Only add email addresses that are activated to keys

* Fix committer shortcut properly

* Restructure gpg_keys.go

* Use common Verification Token code

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-07-13 15:28:07 +02:00
GiteaBot
2614309a58 [skip ci] Updated translations via Crowdin 2021-07-13 00:07:51 +00:00
Jimmy Praet
78118a3b02
Add checkbox to delete pull branch after successful merge (#16049)
* Add checkbox to delete pull branch after successful merge

* Omit DeleteBranchAfterMerge field in json

* Log a warning instead of error when PR head branch deleted

* Add DefaultDeleteBranchAfterMerge to PullRequestConfig

* Add support for delete_branch_after_merge via API

* Fix for API: the branch should be deleted from the HEAD repo

If head and base repo are the same, reuse the already opened ctx.Repo.GitRepo

* Don't delegate to CleanupBranch, only reuse branch deletion code

CleanupBranch contains too much logic that has already been performed by the Merge

* Reuse gitrepo in MergePullRequest

Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-07-13 01:26:25 +02:00
GiteaBot
522b720954 [skip ci] Updated translations via Crowdin 2021-07-12 00:24:54 +00:00
Meano
07284792d4
Fix invalid params and typo of email templates (#16394)
Signed-off-by: Meano <meanocat@gmail.com>
2021-07-10 19:40:14 +02:00
GiteaBot
7a402067ce [skip ci] Updated translations via Crowdin 2021-07-10 00:24:52 +00:00
GiteaBot
6c6938e2ed [skip ci] Updated translations via Crowdin 2021-07-09 00:25:09 +00:00
zeripath
d06f9ce274
Redirect on bad CSRF instead of presenting bad page (#14937)
The current CSRF handler is a bit harsh with bad CSRF tokens on webpages
I think we can be a little kinder and redirect to base page with a flash error

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-07-08 15:57:24 +02:00
GiteaBot
bc6f060b8c [skip ci] Updated translations via Crowdin 2021-07-08 00:24:51 +00:00
GiteaBot
4fa791c47b [skip ci] Updated translations via Crowdin 2021-07-07 00:14:50 +00:00
GiteaBot
27c1578235 [skip ci] Updated translations via Crowdin 2021-07-06 00:14:50 +00:00
GiteaBot
65ae46bc20 [skip ci] Updated licenses and gitignores 2021-07-04 00:14:37 +00:00
GiteaBot
a9ba29b1cd [skip ci] Updated translations via Crowdin 2021-07-03 00:14:49 +00:00
GiteaBot
579fcad8cd [skip ci] Updated translations via Crowdin 2021-06-29 00:29:44 +00:00
GiteaBot
6ca667d3f2 [skip ci] Updated translations via Crowdin 2021-06-28 00:29:35 +00:00
Norwin
9c6aeb47f7
Link to previous blames in file blame page (#16259)
Adds a link to each blame hunk, to view the blame of an earlier version of the file, similar to GitHub. Also refactors the blame render from fmtstring based to template based.

* Fix blame bottom line and add blame prior button

* Jump to previous parent commit from the commit.

* Fix previous commit link

* Fix previous blame link

* Fix the given file not exist in the previous commit.

* Fix blameRow struct not export

* fix theming issues, rename template var

* remove unused LastCommit fetch

* fix location of blame-hunk divider

* rewrite previous commit checks

* remove duplicate commit lookup

its already resolved and stored in ctx.Repo.Commit!

* split out blamePart processing into function

Co-authored-by: rogerluo410 <rogerluo410@gmail.com>
2021-06-28 01:13:20 +02:00
GiteaBot
540215588a [skip ci] Updated licenses and gitignores 2021-06-27 00:29:32 +00:00
Sergey Dryabzhinsky
22a0636544
Add Visible modes function from Organisation to Users too (#16069)
You can limit or hide organisations. This pull make it also posible for users

- new strings to translte
- add checkbox to user profile form
- add checkbox to admin user.edit form
- filter explore page user search
- filter api admin and public user searches
- allow admins view "hidden" users
- add app option DEFAULT_USER_VISIBILITY
- rewrite many files to use Visibility field
- check for teams intersection
- fix context output
- right fake 404 if not visible

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-06-26 20:53:14 +01:00
John Olheiser
622f1e764c
Add better errors for disabled account recovery (#15117)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-06-25 23:16:36 -05:00
KN4CK3R
44b8b07631
Add tag protection (#15629)
* Added tag protection in hook.

* Prevent UI tag creation if protected.

* Added settings page.

* Added tests.

* Added suggestions.

* Moved tests.

* Use individual errors.

* Removed unneeded methods.

* Switched delete selector.

* Changed method names.

* No reason to be unique.

* Allow editing of protected tags.

* Removed unique key from migration.

* Added docs page.

* Changed date.

* Respond with 404 to not found tags.

* Replaced glob with regex pattern.

* Added support for glob and regex pattern.

* Updated documentation.

* Changed white* to allow*.

* Fixed edit button link.

* Added cancel button.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-06-25 16:28:55 +02:00
GiteaBot
837e8b30a7 [skip ci] Updated translations via Crowdin 2021-06-25 00:11:36 +00:00
GiteaBot
71c5a8f7f8 [skip ci] Updated translations via Crowdin 2021-06-24 00:11:37 +00:00
6543
5930d09096
Fix Nits (#16234)
* template fix

* nits

* add doer to "created issue/pull"
2021-06-23 19:43:33 +02:00
6543
be81dc8b20
Localize Email Templates (#16200)
close #14822
2021-06-23 14:33:21 +02:00
GiteaBot
8601440e81 [skip ci] Updated translations via Crowdin 2021-06-21 00:11:34 +00:00
GiteaBot
8fa3bbc424 [skip ci] Updated translations via Crowdin 2021-06-20 00:11:36 +00:00
GiteaBot
6667f52694 [skip ci] Updated translations via Crowdin 2021-06-19 00:11:34 +00:00
GiteaBot
d8792ebcef [skip ci] Updated translations via Crowdin 2021-06-18 00:12:01 +00:00
GiteaBot
fdf9ab11cd [skip ci] Updated translations via Crowdin 2021-06-17 00:11:43 +00:00
zeripath
6d69df2804
Add Status Updates whilst Gitea migrations are occurring (#15076)
* Add migrating message

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

* simplify messenger

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

* make messenger an interface

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

* rename

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

* prepare for merge

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

* as per tech

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

Co-authored-by: 6543 <6543@obermui.de>
2021-06-16 18:02:24 -04:00
GiteaBot
3bf7a83d7f [skip ci] Updated translations via Crowdin 2021-06-16 00:11:33 +00:00
GiteaBot
0adcea9ba6 [skip ci] Updated translations via Crowdin 2021-06-15 00:11:35 +00:00
Nils Dralle
f374789fe2
Fix private repo permission problem (#16142)
* Change user access permission

* Add string 'transfer_notices_3'

* Add 3rd transfer note to transfer dialog

* Add test

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-06-14 14:30:35 -04:00
KN4CK3R
440039c0cc
Add push to remote mirror repository (#15157)
* Added push mirror model.

* Integrated push mirror into queue.

* Moved methods into own file.

* Added basic implementation.

* Mirror wiki too.

* Removed duplicated method.

* Get url for different remotes.

* Added migration.

* Unified remote url access.

* Add/Remove push mirror remotes.

* Prevent hangs with missing credentials.

* Moved code between files.

* Changed sanitizer interface.

* Added push mirror backend methods.

* Only update the mirror remote.

* Limit refs on push.

* Added UI part.

* Added missing table.

* Delete mirror if repository gets removed.

* Changed signature. Handle object errors.

* Added upload method.

* Added "upload" unit tests.

* Added transfer adapter unit tests.

* Send correct headers.

* Added pushing of LFS objects.

* Added more logging.

* Simpler body handling.

* Process files in batches to reduce HTTP calls.

* Added created timestamp.

* Fixed invalid column name.

* Changed name to prevent xorm auto setting.

* Remove table header im empty.

* Strip exit code from error message.

* Added docs page about mirroring.

* Fixed date.

* Fixed merge errors.

* Moved test to integrations.

* Added push mirror test.

* Added test.
2021-06-14 19:20:43 +02:00
GiteaBot
5c2f9b3f83 [skip ci] Updated licenses and gitignores 2021-06-13 00:11:23 +00:00
GiteaBot
3dafb074c6 [skip ci] Updated translations via Crowdin 2021-06-10 00:11:49 +00:00
GiteaBot
b3ef6a61e5 [skip ci] Updated translations via Crowdin 2021-06-06 00:11:36 +00:00
GiteaBot
a38f62ad0f [skip ci] Updated translations via Crowdin 2021-06-04 00:11:34 +00:00
GiteaBot
6a7bf974be [skip ci] Updated translations via Crowdin 2021-06-03 00:11:34 +00:00
GiteaBot
c63d1d814c [skip ci] Updated translations via Crowdin 2021-06-01 00:11:31 +00:00
zeripath
7a484c0788
Hide mirror passwords on repo settings page (#16022)
This PR simply hides mirror passwords from being displayed on the repo settings page.

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-05-31 11:46:20 +01:00
GiteaBot
518ed504ef [skip ci] Updated translations via Crowdin 2021-05-31 00:11:22 +00:00
GiteaBot
d8c99c64d5 [skip ci] Updated licenses and gitignores 2021-05-30 00:11:22 +00:00