]> source.dussan.org Git - gitea.git/log
gitea.git
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 22 Dec 2020 11:15:05 +0000 (11:15 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoInline manifest.json (#14038)
silverwind [Tue, 22 Dec 2020 11:13:50 +0000 (12:13 +0100)]
Inline manifest.json (#14038)

* Inline manifest.json

Improve performance by eliminating this separate request and just inline
this small JSON in HTML directly as a data uri.

Also update previously static app name scripts to use AppName.

I've confirmed this as working via "Add to Homescreen" feature which
offered to save the shortcut under the new app name.

* prerender manifest data on startup

* move to settings

* restore setting.AppStartTime and use it on admin page

* use double quotes because template.URL escapes everything

* fix lint

* move variable to global context variable

* delete template file

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 22 Dec 2020 03:48:23 +0000 (03:48 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd user filter to issueTrackedTimes, enable usage for issue managers (#14081)
Norwin [Tue, 22 Dec 2020 03:47:17 +0000 (03:47 +0000)]
Add user filter to issueTrackedTimes, enable usage for issue managers (#14081)

* add user filter to issueTrackedTimes

fixes #14024

* update swagger

* allow user filter for issue writers

* improve swagger doc

* return 404 on invalid user

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 22 Dec 2020 02:55:02 +0000 (02:55 +0000)]
[skip ci] Updated translations via Crowdin

3 years agorework heatmap permissions (#14080)
Norwin [Tue, 22 Dec 2020 02:53:37 +0000 (02:53 +0000)]
rework heatmap permissions (#14080)

* now uses the same permission model as for the activity feed:
  only include activities in repos, that the doer has access to.
  this might be somewhat slower.

* also improves handling of user.KeepActivityPrivate (still shows
  the heatmap to self & admins)

* extend tests

* adjust integration test to new behaviour

* add access to actions for admins

* extend heatmap unit tests

3 years agoStandardize Co-Authored-By / Reviewed-By strings (#14097)
Cirno the Strongest [Tue, 22 Dec 2020 02:19:33 +0000 (03:19 +0100)]
Standardize Co-Authored-By / Reviewed-By strings (#14097)

* Standardize Co-Authored-By / Reviewed-By strings

* Use lowercase variant

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoAdd StatDir and replace com.StatDir (#14099)
Lunny Xiao [Mon, 21 Dec 2020 23:40:57 +0000 (07:40 +0800)]
Add StatDir and replace com.StatDir (#14099)

* Add StatDir and replace com.StatDir

* a nit

* Remove wrong file

Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 21 Dec 2020 23:04:32 +0000 (23:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agomore test case for STORAGE_TYPE overrides (and fixes) (#14096)
胡玮文 [Mon, 21 Dec 2020 23:03:18 +0000 (07:03 +0800)]
more test case for STORAGE_TYPE overrides (and fixes) (#14096)

Signed-off-by: 胡玮文 <huww98@outlook.com>
3 years agoFix storage config implementation (#14091)
胡玮文 [Mon, 21 Dec 2020 17:59:18 +0000 (01:59 +0800)]
Fix storage config implementation (#14091)

The design is very flexible, but not implemented correctly.
This commit fixes several issues:
* Costom storage type stated in https://docs.gitea.io/en-us/config-cheat-sheet/#storage-storage
  not working
* [storage.attachments], [storage.minio] section not respected

Signed-off-by: 胡玮文 <huww98@outlook.com>
3 years agoAdd Test for Fix #14040 (#14045)
6543 [Mon, 21 Dec 2020 17:27:23 +0000 (17:27 +0000)]
Add Test for Fix #14040 (#14045)

Add Test for Fix #14040

3 years agoUse the text of pull-request as the squash commit's message (#13071)
Mura Li [Mon, 21 Dec 2020 16:46:14 +0000 (00:46 +0800)]
Use the text of pull-request as the squash commit's message (#13071)

Originally, it was filled by the commit messages of the involved
commits. In this change, we use the headline comment of the pull
request as the commit message when it is a squash merge.

Thanks to @zeripath for suggesting the idea.

Fixes #12365

Co-authored-by: Mura Li <typeless@users.noreply.github.com>
3 years agoAdd mentionable teams to tributeValues and change team mention rules to gh's style...
a1012112796 [Mon, 21 Dec 2020 15:39:28 +0000 (23:39 +0800)]
Add mentionable teams to tributeValues and change team mention rules to gh's style (#13198)

* Add mentionable teams to tributeValues

Signed-off-by: a1012112796 <1012112796@qq.com>
* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>
* Change team mention rules to gh's style

* use org's avator as team avator in ui

Signed-off-by: a1012112796 <1012112796@qq.com>
* Update modules/markup/html.go

* Update models/issue.go

Co-authored-by: Lauris BH <lauris@nix.lv>
* Update models/issue.go

* fix a small nit and update test code

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 21 Dec 2020 14:41:16 +0000 (14:41 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdded option to disable migrations (#13114)
Paweł Bogusławski [Mon, 21 Dec 2020 14:39:41 +0000 (15:39 +0100)]
Added option to disable migrations (#13114)

* Added option to disable migrations

This patch introduces DISABLE_MIGRATIONS parameter in [repository]
section of app.ini (by default set to false). If set to true
it blocks access to repository migration feature.

This mod hides also local repo import option in user editor if
local repo importing or migrations is disabled.

* Alter Example config

DISABLE_MIGRATIONS set to false in example config to
match its default value.

* HTTP error 403 instead of 500 on denied access to migration

* Parameter DISABLE_MIGRATIONS exposed via API

Fixes: 04b04cf854bcb3ed7659442bcf79822bdebe29e9
Author-Change-Id: IB#1105130

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 21 Dec 2020 13:13:27 +0000 (13:13 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoexpose translation of previously hardcoded string (#14087)
Norwin [Mon, 21 Dec 2020 13:12:13 +0000 (13:12 +0000)]
expose translation of previously hardcoded string (#14087)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 21 Dec 2020 08:32:25 +0000 (08:32 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoPresent repository name as {{name}}#{{index}} instead of label on dashboard issuelist...
Cirno the Strongest [Mon, 21 Dec 2020 08:31:20 +0000 (09:31 +0100)]
Present repository name as {{name}}#{{index}} instead of label on dashboard issuelist (#14085)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoLocale: say another issue instead of this issue (#14082)
DuckDuckWhale [Mon, 21 Dec 2020 06:11:39 +0000 (22:11 -0800)]
Locale: say another issue instead of this issue (#14082)

Saying "this issue" is confusing because it could be understood as the
issue that the user is currently viewing, not which the "issue" link
points to.

3 years agoAdd repo name label again on dashboard issue / pulls page (#14073)
Jimmy Praet [Sun, 20 Dec 2020 22:52:29 +0000 (23:52 +0100)]
Add repo name label again on dashboard issue / pulls page (#14073)

The label got removed in PR #13594

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoSearch and Diff CSS enhancements (#14050)
silverwind [Sun, 20 Dec 2020 18:00:03 +0000 (19:00 +0100)]
Search and Diff CSS enhancements (#14050)

* Search and Diff CSS enhancements

- Use flexbox for language stats
- Improve labels and code boxes on repo and code search
- Use flexbox on diff header and improve suppressed diff text
- Add dedicated color for diff expander

* more diff tweaks, less vertical padding on header

* more minor tweaks

* always show fold icon, image diff improvments

* remove margin

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agodep: update crypto. info: https://golangtutorial.dev/news/fix-in-crypto-package/...
techknowlogick [Sun, 20 Dec 2020 15:36:07 +0000 (10:36 -0500)]
dep: update crypto. info: https://golangtutorial.dev/news/fix-in-crypto-package/ (#14067)

Co-authored-by: zeripath <art27@cantab.net>
3 years agoShow dropdown with all statuses for commit (#13977)
Cirno the Strongest [Sun, 20 Dec 2020 03:13:12 +0000 (04:13 +0100)]
Show dropdown with all statuses for commit (#13977)

* Show dropdown with all statuses for commit

* Use popups

* Remove unnecessary change

* Style popup

* Use divided list

* As per @silverwind

* Refactor GetLastCommitStatus

* Missing dropdown on repo home and commit page

* Fix tests

* Make status icon be a part of a link on PR list

* Fix missing translation call

* Indent fix

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 20 Dec 2020 01:32:15 +0000 (01:32 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoManually approve new registration (#13083)
Jiri Vlasak [Sun, 20 Dec 2020 01:31:06 +0000 (02:31 +0100)]
Manually approve new registration (#13083)

* Add register manual confirm settings option

The new settings option is used when manually approving new
registrations.

* Enable manual confirmation of new registered user

When manual registration confirmation is desired (by default `false`)
create new user in the database that is *not active*. The user must then
be activated manually.

This change speeds up the process of adding new confirmed users for
Gitea instances without external auth mechanism. (Currently the option
is to manually create new user by admin.)

* Update docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoFix feed push tag (#14064)
Lunny Xiao [Sat, 19 Dec 2020 23:46:28 +0000 (07:46 +0800)]
Fix feed push tag (#14064)

* Fix dashboard feed bug when push tag

* Fix variable name

* Fix delete tag

Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 19 Dec 2020 22:31:48 +0000 (22:31 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoRefactor get tag to remove unnecessary steps (#14058)
Lunny Xiao [Sat, 19 Dec 2020 22:30:39 +0000 (06:30 +0800)]
Refactor get tag to remove unnecessary steps (#14058)

* Fix tag cache bug

3 years agoFix merge button dropdown triangle alignment (#14041)
silverwind [Sat, 19 Dec 2020 03:57:25 +0000 (04:57 +0100)]
Fix merge button dropdown triangle alignment (#14041)

https://github.com/go-gitea/gitea/pull/14028 had improved dropdown
triangle display for buttons with text but had regressed it for buttons
without. Fix this by adding a class to prevent horizontal margin adjustment.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoput ${CURDIR} in quotes to prevent make from splitting paths with spaces into separat...
Kyle D [Sat, 19 Dec 2020 02:54:01 +0000 (21:54 -0500)]
put ${CURDIR} in quotes to prevent make from splitting paths with spaces into separate strings (#14056)

3 years agogitea png to logo (#13974)
Kyle D [Sat, 19 Dec 2020 01:17:27 +0000 (20:17 -0500)]
gitea png to logo (#13974)

* gitea png to logo.svg

* gitea safari svg to logo

* minify svgs

* Update english docs

* Update missing section on customizing logo

3 years agoCommit list display tweaks (#14043)
silverwind [Fri, 18 Dec 2020 20:00:07 +0000 (21:00 +0100)]
Commit list display tweaks (#14043)

- Make plain <pre> inherit our monospace fonts, overriding fomantic's
  css reset which means expanded commit messages now follow the font
  settings.
- Adjust link styling and keyword highlighting in commit message
- Consolidate .commit-summary styles to single selector group

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAccept multiple SSH keys in single LDAP SSHPublicKey attribute (#13989)
zeripath [Fri, 18 Dec 2020 17:44:18 +0000 (17:44 +0000)]
Accept multiple SSH keys in single LDAP SSHPublicKey attribute (#13989)

* Accept multiple SSH keys in single LDAP SSHPublicKey attribute

Fix #13984

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoShow status check for merged PRs (#13975)
Cirno the Strongest [Fri, 18 Dec 2020 12:37:55 +0000 (13:37 +0100)]
Show status check for merged PRs (#13975)

* Show status check for merged PRs

* Handle PRs with no commits

* Styling

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoAdd whiteline after label on Signing Verification Settings (#14042)
Cirno the Strongest [Fri, 18 Dec 2020 10:27:42 +0000 (11:27 +0100)]
Add whiteline after label on Signing Verification Settings (#14042)

3 years ago[Refactor] CombinedStatus and CommitStatus related functions & structs (#14026)
6543 [Fri, 18 Dec 2020 03:33:32 +0000 (03:33 +0000)]
[Refactor] CombinedStatus and CommitStatus related functions & structs (#14026)

* RM unused struct

* rename (*CommitStatus) loadRepo() -> loadAttributes()

* move ToCommitStatus into its own file

* use CommitStatusState instead of StatusState

* move CombinedStatus convertion into convert package

* let models.GetLatestCommitStatus use repoID direct and accept ListOptions

* update swagger docs

* fix tests

* Fix swagger docs

* rm page

* fix swagger docs!!!

* return json null

* always return json

* rename api.Status to api.CommitStatus

* fix swagger docs

* sec swagger fix

3 years agoFix panic in BasicAuthDecode (#14046)
silverwind [Fri, 18 Dec 2020 01:51:28 +0000 (02:51 +0100)]
Fix panic in BasicAuthDecode (#14046)

* Fix panic in BasicAuthDecode

If the string does not contain ":" that function would run into an
`index out of range [1] with length 1` error. prevent that.

* Update BasicAuthDecode()

Co-authored-by: 6543 <6543@obermui.de>
3 years agoMakefile cleanup & double golangci-lint timeout (#14044)
silverwind [Thu, 17 Dec 2020 22:55:52 +0000 (23:55 +0100)]
Makefile cleanup & double golangci-lint timeout (#14044)

* Makefile cleanup

The xmldom dependency is no longer required since #13680. Also,
whitespace cleanup.

* double the golangci-lint timeout

3 years agoClean up SVG (#13680)
techknowlogick [Thu, 17 Dec 2020 21:33:53 +0000 (16:33 -0500)]
Clean up SVG (#13680)

* Clean up SVG

* update per feedback

* fix css style

* Delete gitea.png

* no new line at end of file

* fix newline?

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix bug in commit verification introduced in #13673 (#14040)
zeripath [Thu, 17 Dec 2020 20:42:33 +0000 (20:42 +0000)]
Fix bug in commit verification introduced in #13673 (#14040)

There is a slight bug in the commit_reader introduced in #13673 whereby
commit messages which have a final unterminated line miss their final line.

This PR fixes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoDashboard search tweaks (#14008)
silverwind [Thu, 17 Dec 2020 19:58:21 +0000 (20:58 +0100)]
Dashboard search tweaks (#14008)

- Fix color of inactive pagination parts caused by overreaching CSS
selector.
- Slightly reduce horizontal padding on list items
- Add spacing around pagination and move it outside of <ul>

3 years agoDiff and code review refactors and improvements (#13922)
silverwind [Thu, 17 Dec 2020 15:52:58 +0000 (16:52 +0100)]
Diff and code review refactors and improvements (#13922)

* Diff CSS refactors and misc tweaks

- Simplify Diff CSS styling
- Add color variables for diff
- Fix vertical centering of inline comment button
- Slightly adjust text colors, e.g. in comment header

* Code review improvments

* selector tweak

* fix diff issues, add inactive bg color

Co-authored-by: 6543 <6543@obermui.de>
3 years agoDropdown triangle fixes (#14028)
silverwind [Thu, 17 Dec 2020 14:37:56 +0000 (15:37 +0100)]
Dropdown triangle fixes (#14028)

* Dropdown triangle fixes

Fomantic's CSS assumes the dropdown triangles are fonts but we've recently
swapped them for SVG so we need to wrestle a bit with Fomantic to get it
to display properly and not cause buttons to resize.

Fixes: https://github.com/go-gitea/gitea/issues/14014
* move css and add link

3 years agoUse native git variants by default with go-git variants as build tag (#13673)
zeripath [Thu, 17 Dec 2020 14:00:47 +0000 (14:00 +0000)]
Use native git variants by default with go-git variants as build tag (#13673)

* Move last commit cache back into modules/git

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove go-git from the interface for last commit cache

Signed-off-by: Andrew Thornton <art27@cantab.net>
* move cacheref to last_commit_cache

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove go-git from routers/private/hook

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move FindLFSFiles to pipeline

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make no-go-git variants

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

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

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

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

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

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

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

* As per @lunny

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

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
* default to use no-go-git variants and add gogit build tag

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

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoCause NotifyMigrateRepository to emit a repo create webhook (#14004)
zeripath [Thu, 17 Dec 2020 12:26:22 +0000 (12:26 +0000)]
Cause NotifyMigrateRepository to emit a repo create webhook (#14004)

* Cause NotifyMigrateRepository to emit a repo create webhook

This PR simply makes NotifyMigrateRepository emit a Create Repo webhook.
The reason for no new payload is that the information sent to
NotifyMigrateRepository is only essentially the same as
NotifyCreateRepository

Fix #13996

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAlways wait for the cmd to finish (#14006)
zeripath [Thu, 17 Dec 2020 11:50:21 +0000 (11:50 +0000)]
Always wait for the cmd to finish (#14006)

After cancelling the context we still need to wait for the
command to finish otherwise zombie processes may occur

Fix #13987

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agofix label of --id in admin delete user (#14005)
zeripath [Thu, 17 Dec 2020 07:57:32 +0000 (07:57 +0000)]
fix label of --id in admin delete user (#14005)

* fix label of --id in admin delete user

This pr fixes the label descriptor of `gitea admin delete user`
but also adds a `--username` option.

Fix #13995

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

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agodocs(docker): fix diff format. (#14035)
Bo-Yi Wu [Thu, 17 Dec 2020 05:00:43 +0000 (13:00 +0800)]
docs(docker): fix diff format. (#14035)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
3 years agoHotFix: Hide private partisipation in Orgs (#13994)
6543 [Wed, 16 Dec 2020 23:39:12 +0000 (23:39 +0000)]
HotFix: Hide private partisipation in Orgs (#13994)

* HotFix: Hide private partisipation in Orgs

* refactor & add node to fuc GetOrganizations

3 years agoAdd FAQ link to Issue template (#14020)
6543 [Wed, 16 Dec 2020 19:18:36 +0000 (19:18 +0000)]
Add FAQ link to Issue template (#14020)

3 years agoFix webhook list styling (#14001)
Cirno the Strongest [Wed, 16 Dec 2020 18:22:21 +0000 (19:22 +0100)]
Fix webhook list styling (#14001)

* Fix webhook list styling

* As per @silverwind

3 years agoSend webhook when tag is removed via Web UI (#14015)
Cirno the Strongest [Wed, 16 Dec 2020 16:00:46 +0000 (17:00 +0100)]
Send webhook when tag is removed via Web UI (#14015)

* Send webhook when tag is removed via Web UI

* Stray code

3 years agoSend push event when tag is created or deleted (#13999)
Cirno the Strongest [Wed, 16 Dec 2020 12:41:21 +0000 (13:41 +0100)]
Send push event when tag is created or deleted (#13999)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoFix correct diff view for PR review comments in PR view page (#14002)
Jimmy Praet [Wed, 16 Dec 2020 09:54:58 +0000 (10:54 +0100)]
Fix correct diff view for PR review comments in PR view page (#14002)

Fixes #13683.

The diff snippet that provides context for a code review comment on the pull request timeline page used to be calculated based on the headCommitID. But in 1.13, with PR #13448, this changed to the commitID from the blame for the commented line, which seems to cause these incorrect review comment diff snippets.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoStore repository data in data path if not previously set (#13991)
techknowlogick [Tue, 15 Dec 2020 21:52:59 +0000 (16:52 -0500)]
Store repository data in data path if not previously set (#13991)

* Store repository data in data path if not previously set

* update docs

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

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

Co-authored-by: silverwind <me@silverwind.io>
3 years agoadd @noerw to maintainers (#13997)
Norwin [Tue, 15 Dec 2020 19:19:26 +0000 (19:19 +0000)]
add @noerw to maintainers (#13997)

* add @noerw to maintainers

* format

Co-authored-by: 6543 <6543@obermui.de>
3 years ago[API] Add ref to create/edit issue options & deprecated assignee (#13992)
6543 [Tue, 15 Dec 2020 18:38:10 +0000 (18:38 +0000)]
[API] Add ref to create/edit issue options & deprecated assignee (#13992)

* API: Add ref to create/edit issue options

* deprecate Assignee in favour of Assignees

3 years agoStandardise logging of failed authentication attempts in internal SSH (#13962)
zeripath [Tue, 15 Dec 2020 08:45:13 +0000 (08:45 +0000)]
Standardise logging of failed authentication attempts in internal SSH (#13962)

Continuing on from #13953 continue to improve and standardise
logging from internal SSH.

Also updates the fail2ban setup

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix markdown checkboxes on Blink (#13988)
silverwind [Tue, 15 Dec 2020 07:00:41 +0000 (08:00 +0100)]
Fix markdown checkboxes on Blink (#13988)

Blink still requires a vendor prefix for `mask-image` and `mask-size`,
so add that here to fix the rendering.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoHide command line instructions when merge form is visible (#13956)
Cirno the Strongest [Tue, 15 Dec 2020 06:09:24 +0000 (07:09 +0100)]
Hide command line instructions when merge form is visible (#13956)

* Hide commandline instructions when merge form is visible

* As per @silverwind

Co-authored-by: zeripath <art27@cantab.net>
3 years agoTrim the branch prefix from action.GetBranch (#13981)
zeripath [Mon, 14 Dec 2020 17:08:37 +0000 (17:08 +0000)]
Trim the branch prefix from action.GetBranch (#13981)

* Trim the branch prefix from action.GetBranch

 #13882 has revealed that the refname of an action is actually only a
refname pattern and necessarily a branch. For examplem pushing to
refs/heads/master will result in action with refname refs/heads/master
but pushing to master will result in a refname master.

The simplest solution to providing a fix here is to trim the prefix
therefore this PR proposes this.

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

Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
3 years agoAdd emoji in label to project boards (#13978)
Rakshith Ravi [Mon, 14 Dec 2020 10:06:58 +0000 (15:36 +0530)]
Add emoji in label to project boards (#13978)

* Update view.tmpl

Added rendering of emoji to project label

* Add RenderEmojiPlain to the title and remove has-emoji

Co-authored-by: zeripath <art27@cantab.net>
3 years agoDo not display org avatar near icon for internal repos (#13957)
Cirno the Strongest [Sun, 13 Dec 2020 21:51:15 +0000 (22:51 +0100)]
Do not display org avatar near icon for internal repos (#13957)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoadd thumbnail preview section to issue attachments (#13826)
bobemoe [Sun, 13 Dec 2020 19:12:27 +0000 (19:12 +0000)]
add thumbnail preview section to issue attachments (#13826)

* add thumbnail preview section to attachments

* dont show thumbnail if the image is already shown inline

* update router to pass the `content` to the attachemnts template

* limit attachment preview height to 150px (same as width)

* remove unused css (referance removed in https://github.com/go-gitea/gitea/pull/11141/files#diff-9faae32445ed9673de2830c9fc35e93f44487f0a0068202988adaf00a5bac850L66 )

* dont show divider after edit if no attachemnts

Co-authored-by: James <inbox.dev@jhodges.co.uk>
Co-authored-by: 6543 <6543@obermui.de>
3 years ago[API] Add Ref to Issue (#13946)
zeripath [Sun, 13 Dec 2020 11:34:11 +0000 (11:34 +0000)]
[API] Add Ref to Issue (#13946)

* Add Ref to api.Issue

This PR adds Ref to api.Issue and adds the backend parts to the migrator.

Fix #13918

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 13 Dec 2020 02:49:02 +0000 (02:49 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoRemoves dangling < on emails/list.tmpl (#13970)
WeebDataHoarder [Sun, 13 Dec 2020 02:48:03 +0000 (03:48 +0100)]
Removes dangling < on emails/list.tmpl (#13970)

This dangling character was leftover from commit c85bb6263503ebd335863f413214a775973a1fac from PR #13860

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 13 Dec 2020 01:06:57 +0000 (01:06 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoMarkdown task list improvements (#13952)
silverwind [Sun, 13 Dec 2020 01:05:50 +0000 (02:05 +0100)]
Markdown task list improvements (#13952)

* Markdown task list improvements

- Remove `.ui` class and wrappers to prevent fomantic from messing with it.
- Change rendered HTML to match GitHub.
- Add custom styling for the checkboxes.

* fix unittest

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoWhenever the password is updated ensure that the hash algorithm is too (#13966)
zeripath [Sat, 12 Dec 2020 18:59:49 +0000 (18:59 +0000)]
Whenever the password is updated ensure that the hash algorithm is too (#13966)

`user.HashPassword` may potentially - and in fact now likely does - change
the `passwd_hash_algo` therefore whenever the `passwd` is updated, this
also needs to be updated.

Fix #13832

Thanks @fblaese for the hint

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 12 Dec 2020 15:34:20 +0000 (15:34 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoPossible fix the webhook API creation (#13960)
Lunny Xiao [Sat, 12 Dec 2020 15:33:19 +0000 (23:33 +0800)]
Possible fix the webhook API creation (#13960)

* Possible fix the webhook API creation

* Fix api create webhook bug

3 years agoFix missing username on dashboard context switch navbar (#13959)
Cirno the Strongest [Sat, 12 Dec 2020 13:10:20 +0000 (14:10 +0100)]
Fix missing username on dashboard context switch navbar (#13959)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 12 Dec 2020 11:21:18 +0000 (11:21 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoEnforce setting HEAD in wiki to master (#13950)
zeripath [Sat, 12 Dec 2020 11:20:14 +0000 (11:20 +0000)]
Enforce setting HEAD in wiki to master (#13950)

The default branch in wikis must be master - therefore forcibly set the HEAD
to master.

Fix #13846

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoDiff stat improvements (#13954)
silverwind [Sat, 12 Dec 2020 01:06:22 +0000 (02:06 +0100)]
Diff stat improvements (#13954)

* Diff stat improvements

- Combine number to just total number of changes
- Add tooltip over stats bar
- Increase contrast on file name
- Refactor classes and CSS to be more reusable

* misc tweaks

* make count bold

3 years agoUpdate github.com/blevesearch/bleve v1.0.13 -> v1.0.14 (#13947)
6543 [Sat, 12 Dec 2020 00:16:53 +0000 (00:16 +0000)]
Update github.com/blevesearch/bleve v1.0.13 -> v1.0.14 (#13947)

3 years agoReport permissions denied in internal SSH (#13953)
zeripath [Fri, 11 Dec 2020 22:52:38 +0000 (22:52 +0000)]
Report permissions denied in internal SSH (#13953)

This PR standardizes reporting of permission denied from the internal ssh.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoEnsure that HEAD is updated to match default branch in template generation (#13948)
zeripath [Fri, 11 Dec 2020 21:41:59 +0000 (21:41 +0000)]
Ensure that HEAD is updated to match default branch in template generation (#13948)

Fix #13912

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoEnsure that pusher is not nil preventing panic in push (#13945)
zeripath [Fri, 11 Dec 2020 17:27:00 +0000 (17:27 +0000)]
Ensure that pusher is not nil preventing panic in push (#13945)

PR #13381 refactored notification actions to call NotifyCreateRef and
NotifyDeleteRef in a slightly different manner. This leads to the pusher
not being set before the call.

This PR ensures that the pusher is updated before the call.

Fix #13940

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoReorganize Chroma styles (#13934)
silverwind [Fri, 11 Dec 2020 16:38:47 +0000 (17:38 +0100)]
Reorganize Chroma styles (#13934)

This moves the Chroma styles into separate files with base,light and
dark variants. Should work exactly as before.

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 11 Dec 2020 16:05:31 +0000 (16:05 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix bug for webhook and feishu caused by API changed (#13937)
Lunny Xiao [Fri, 11 Dec 2020 16:04:04 +0000 (00:04 +0800)]
Fix bug for webhook and feishu caused by API changed (#13937)

* Fix bug for webhook

* Fix bug for feishu

3 years agoBump ini from 1.3.5 to 1.3.7 (#13941)
dependabot[bot] [Fri, 11 Dec 2020 14:56:57 +0000 (15:56 +0100)]
Bump ini from 1.3.5 to 1.3.7 (#13941)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agochore: use octicon-mirror for feeds display (#13928)
Gary Wang [Thu, 10 Dec 2020 23:06:45 +0000 (07:06 +0800)]
chore: use octicon-mirror for feeds display (#13928)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoBetter vertical align of buttons in headers (#13932)
silverwind [Thu, 10 Dec 2020 20:39:09 +0000 (21:39 +0100)]
Better vertical align of buttons in headers (#13932)

The previous method used `transform` which formed a CSS stacking context
which caused issues with dropdowns appearing behind other elements which
made `position: static` necessary but that again caused even more
issues.

This method achieves the same as before, but without the additional
stacking context.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAdded 2 fuzzers (#13818)
AdamKorcz [Thu, 10 Dec 2020 19:43:11 +0000 (19:43 +0000)]
Added 2 fuzzers (#13818)

* Added fuzzer

Signed-off-by: AdamKorcz <adam@adalogics.com>
* Added better fuzzer names

Signed-off-by: AdamKorcz <adam@adalogics.com>
* Moved fuzzer to /tools

* Update tools/fuzz.go

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

* Update tools/fuzz.go

Co-authored-by: silverwind <me@silverwind.io>
* Added tools to Makefile

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 10 Dec 2020 16:20:32 +0000 (16:20 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoRemove JS globals related to timetracking and due date (#13921)
silverwind [Thu, 10 Dec 2020 16:19:18 +0000 (17:19 +0100)]
Remove JS globals related to timetracking and due date (#13921)

Refactor to avoid these globals. Should work exactly as before.

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 10 Dec 2020 05:45:12 +0000 (05:45 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix avatar template error on repo collaborator page (#13924)
silverwind [Thu, 10 Dec 2020 05:44:13 +0000 (06:44 +0100)]
Fix avatar template error on repo collaborator page (#13924)

Fixes error `template: repo/settings/collaboration:16:16: executing
"repo/settings/collaboration" at <.>: wrong type for value; expected
*models.User; got *models.Collaborator` seen on repo collaborator page.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 10 Dec 2020 04:48:55 +0000 (04:48 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoMove diff split code into own template file (#13919)
mrsdizzie [Thu, 10 Dec 2020 04:47:48 +0000 (23:47 -0500)]
Move diff split code into own template file (#13919)

* Move diff split code into own template file

Separate split diff view same as unified already is. Mainly because I'm working on a separate PR with this change and merge conflicts for each change to box.tmpl are annoying and I'm worried about breaking something subtle while trying to resolve them.

* Fix error

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAdd pull request manually merge instruction (#13840)
Lunny Xiao [Thu, 10 Dec 2020 02:59:05 +0000 (10:59 +0800)]
Add pull request manually merge instruction (#13840)

* add pull request command line instructions

* Add pull request manually merge instuction

* Fix styles

* Fix lint

* Move inline style to class file

* add space between merge button and hint text

* Add sentence end charcter

* Change the language file

* adjust secondary bg

* further adjustment

Co-authored-by: silverwind <me@silverwind.io>
3 years agoReplace more icons with SVG, repo search tweaks (#13860)
silverwind [Wed, 9 Dec 2020 19:03:19 +0000 (20:03 +0100)]
Replace more icons with SVG, repo search tweaks (#13860)

* Replace more icons with SVG

- Replace remaining icons on admin page with SVG
- Fix vertical menu background on arc-green
- Minor improvments to frontpage repo search
- More icon replacements here and there

* fix integration

* whitespace tweak

* add comment

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix broken migration on webhook (#13911)
Lunny Xiao [Wed, 9 Dec 2020 17:20:13 +0000 (01:20 +0800)]
Fix broken migration on webhook (#13911)

* Fix broken migration on webhook

* Fix lint

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
3 years agoAdd Karl Heinz Marbaise as maintainer. (#13915)
Karl Heinz Marbaise [Wed, 9 Dec 2020 14:39:14 +0000 (15:39 +0100)]
Add Karl Heinz Marbaise as maintainer. (#13915)

3 years agoMarkdown: Enable wrapping in code blocks and a color tweak (#13894)
silverwind [Wed, 9 Dec 2020 14:03:45 +0000 (15:03 +0100)]
Markdown: Enable wrapping in code blocks and a color tweak (#13894)

- Enable wrapping of long lines in code blocks like already done in code
  view.
- Slightly lighten the background of code blocks on default theme
- Darken the background on inline code and kbd elements on arc-green

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