Commit graph

10730 commits

Author SHA1 Message Date
techknowlogick
e0a84d7880
dep: update crypto. info: https://golangtutorial.dev/news/fix-in-crypto-package/ (#14067)
Co-authored-by: zeripath <art27@cantab.net>
2020-12-20 17:36:07 +02:00
Cirno the Strongest
f3c4baa84b
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>
2020-12-20 11:13:12 +08:00
GiteaBot
029836c34c [skip ci] Updated translations via Crowdin 2020-12-20 01:32:15 +00:00
Jiri Vlasak
d7c67a9fb2
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>
2020-12-19 20:31:06 -05:00
Lunny Xiao
36bd5d70cd
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>
2020-12-20 07:46:28 +08:00
GiteaBot
e674478227 [skip ci] Updated translations via Crowdin 2020-12-19 22:31:48 +00:00
Lunny Xiao
1d3a580a3e
Refactor get tag to remove unnecessary steps (#14058)
* Fix tag cache bug
2020-12-20 00:30:39 +02:00
silverwind
4aabbacdfe
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>
2020-12-18 22:57:25 -05:00
Kyle D
4ef751215c
put ${CURDIR} in quotes to prevent make from splitting paths with spaces into separate strings (#14056) 2020-12-18 21:54:01 -05:00
Kyle D
4cd94e3689
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
2020-12-18 20:17:27 -05:00
silverwind
e25e7b9598
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>
2020-12-18 15:00:07 -05:00
zeripath
e2b069e577
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>
2020-12-18 17:44:18 +00:00
Cirno the Strongest
efa9a8a6e3
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>
2020-12-18 13:37:55 +01:00
Cirno the Strongest
48bd02e753
Add whiteline after label on Signing Verification Settings (#14042) 2020-12-18 11:27:42 +01:00
6543
e483220ea3
[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
2020-12-18 11:33:32 +08:00
silverwind
27edc1aa19
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>
2020-12-17 20:51:28 -05:00
silverwind
e9cc613c24
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
2020-12-17 23:55:52 +01:00
techknowlogick
f8a668ab0c
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>
2020-12-17 16:33:53 -05:00
zeripath
e4567d4285
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>
2020-12-17 21:42:33 +01:00
silverwind
3260e15668
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>
2020-12-17 19:58:21 +00:00
silverwind
8af9df0036
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>
2020-12-17 23:52:58 +08:00
silverwind
a8fa380c25
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
2020-12-17 15:37:56 +01:00
zeripath
511f6138d4
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>
2020-12-17 22:00:47 +08:00
zeripath
0851a89581
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>
2020-12-17 13:26:22 +01:00
zeripath
80a299d307
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>
2020-12-17 12:50:21 +01:00
zeripath
5e09de174c
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>
2020-12-17 02:57:32 -05:00
Bo-Yi Wu
c57e1f2653
docs(docker): fix diff format. (#14035)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-12-17 00:00:43 -05:00
6543
9e456b5a56
HotFix: Hide private partisipation in Orgs (#13994)
* HotFix: Hide private partisipation in Orgs

* refactor & add node to fuc GetOrganizations
2020-12-17 00:39:12 +01:00
6543
069acf6a21
Add FAQ link to Issue template (#14020) 2020-12-16 20:18:36 +01:00
Cirno the Strongest
5f55bab70e
Fix webhook list styling (#14001)
* Fix webhook list styling

* As per @silverwind
2020-12-16 19:22:21 +01:00
Cirno the Strongest
53308de0bf
Send webhook when tag is removed via Web UI (#14015)
* Send webhook when tag is removed via Web UI

* Stray code
2020-12-16 10:00:46 -06:00
Cirno the Strongest
66379ba7ae
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>
2020-12-16 14:41:21 +02:00
Jimmy Praet
e7a77d32cc
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>
2020-12-16 11:54:58 +02:00
techknowlogick
88b585c2e0
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>
2020-12-15 16:52:59 -05:00
Norwin
b8c58edf39
add @noerw to maintainers (#13997)
* add @noerw to maintainers

* format

Co-authored-by: 6543 <6543@obermui.de>
2020-12-15 14:19:26 -05:00
6543
e2aa701812
[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
2020-12-15 19:38:10 +01:00
zeripath
980b0df829
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>
2020-12-15 08:45:13 +00:00
silverwind
f547b27347
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>
2020-12-15 02:00:41 -05:00
Cirno the Strongest
27d0a5554f
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>
2020-12-15 01:09:24 -05:00
zeripath
c3fc190372
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>
2020-12-14 19:08:37 +02:00
Rakshith Ravi
729f0f5f7b
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>
2020-12-14 11:06:58 +01:00
Cirno the Strongest
633dc80077
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>
2020-12-13 16:51:15 -05:00
bobemoe
b35c1b5784
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>
2020-12-13 21:12:27 +02:00
zeripath
825efa2605
[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>
2020-12-13 11:34:11 +00:00
GiteaBot
cf6f8b22ca [skip ci] Updated translations via Crowdin 2020-12-13 02:49:02 +00:00
WeebDataHoarder
de0986d782
Removes dangling < on emails/list.tmpl (#13970)
This dangling character was leftover from commit c85bb62635 from PR #13860
2020-12-13 10:48:03 +08:00
GiteaBot
de06ee6a30 [skip ci] Updated translations via Crowdin 2020-12-13 01:06:57 +00:00
silverwind
41e8b834af
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>
2020-12-13 09:05:50 +08:00
zeripath
287b594803
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>
2020-12-12 19:59:49 +01:00
GiteaBot
d07b8a75d7 [skip ci] Updated translations via Crowdin 2020-12-12 15:34:20 +00:00