]> source.dussan.org Git - gitea.git/log
gitea.git
2 years agodocs: zh-cn translations for fail2ban setup (#20588)
PEN² [Mon, 1 Aug 2022 15:36:50 +0000 (23:36 +0800)]
docs: zh-cn translations for fail2ban setup (#20588)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoShould also support upper-case README files (#20581)
Gary Wang [Mon, 1 Aug 2022 12:15:40 +0000 (20:15 +0800)]
Should also support upper-case README files (#20581)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoFix typos in backup documentation (#20567)
tryfail [Mon, 1 Aug 2022 05:16:38 +0000 (06:16 +0100)]
Fix typos in backup documentation (#20567)

Fixed multiple typos "/user/local/bin" to the proper path "/usr/local/bin"

2 years ago[skip ci] Updated translations via Crowdin
Gary Wang [Mon, 1 Aug 2022 00:20:39 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoSupport localized README (#20508)
Gary Wang [Sun, 31 Jul 2022 22:36:58 +0000 (06:36 +0800)]
Support localized README (#20508)

* Support localized README

* Slightly simplify getting the readme file and add some tests. Ensure that i18n also
works for docs/ etc.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update modules/markup/renderer.go

* Update modules/markup/renderer.go

* Update modules/markup/renderer.go

Co-authored-by: Andrew Thornton <art27@cantab.net>
2 years agoClean up and fix clone button script (#20415)
silverwind [Sun, 31 Jul 2022 18:29:55 +0000 (20:29 +0200)]
Clean up and fix clone button script (#20415)

The button 'primary' class needs to be set in a synchronous script to prevent flicker of the button which was regressed recently, fixed that.

Additionally, reduced the two script tags to just one, the previous scripts were actually initializing the buttons thrice on the empty repo page, now it only initializes once. Finally, removed duplicate code and re-used the inline function in the update code as well.

I had to split out the script into a separate template as on the empty repo page, the script needs access to the clone URL span in the example text, which is rendered below the clone buttons, so buttons and script could not be combined.

2 years agoAdd disable download source configuration (#20548)
Lunny Xiao [Sun, 31 Jul 2022 16:57:02 +0000 (00:57 +0800)]
Add disable download source configuration (#20548)

Add configuration to enable/disable download source from UI.

Co-authored-by: zeripath <art27@cantab.net>
2 years agoFix default merge style (#20564)
wxiaoguang [Sun, 31 Jul 2022 15:13:31 +0000 (23:13 +0800)]
Fix default merge style (#20564)

2 years agoUpdate login methods in package docs (#20561)
KN4CK3R [Sun, 31 Jul 2022 13:41:25 +0000 (15:41 +0200)]
Update login methods in package docs (#20561)

2 years agoAdd missing Tabs on organisation/package view (Frontport #20539) (#20540)
6543 [Sun, 31 Jul 2022 12:32:51 +0000 (14:32 +0200)]
Add missing Tabs on organisation/package view (Frontport #20539) (#20540)

hotfix #20106

2 years ago[skip ci] Updated licenses and gitignores
Norwin [Sun, 31 Jul 2022 00:20:42 +0000 (00:20 +0000)]
[skip ci] Updated licenses and gitignores

2 years agoAdd setting `SQLITE_JOURNAL_MODE` to enable WAL (#20535)
Norwin [Sat, 30 Jul 2022 19:57:41 +0000 (21:57 +0200)]
Add setting `SQLITE_JOURNAL_MODE` to enable WAL (#20535)

Co-authored-by: Andrew Thornton <art27@cantab.net>
2 years agoRework file highlight rendering and fix yaml copy-paste (#19967)
silverwind [Sat, 30 Jul 2022 19:17:43 +0000 (21:17 +0200)]
Rework file highlight rendering and fix yaml copy-paste (#19967)

* Rework file highlight rendering and fix yaml copy-paste

* use Split+Trim to replace tag parser

* remove unnecessary bytes.Count

* remove newLineInHTML = "&#10;"

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoAdd new API endpoints for push mirrors management (#19841)
Mohamed Sekour [Sat, 30 Jul 2022 16:45:59 +0000 (18:45 +0200)]
Add new API endpoints for push mirrors management (#19841)

- Add a new push mirror to specific repository
- Sync now ( send all the changes to the configured push mirrors )
- Get list of all push mirrors of a repository
- Get a push mirror by ID
- Delete push mirror by ID

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
2 years agoWebAuthn CredentialID field needs to be increased in size (#20530)
zeripath [Sat, 30 Jul 2022 13:25:26 +0000 (14:25 +0100)]
WebAuthn CredentialID field needs to be increased in size (#20530)

WebAuthn have updated their specification to set the maximum size of the
CredentialID to 1023 bytes. This is somewhat larger than our current
size and therefore we need to migrate.

The PR changes the struct to add CredentialIDBytes and migrates the CredentialID string
to the bytes field before another migration drops the old CredentialID field. Another migration
renames this field back.

Fix #20457

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agoAdd latest commit's SHA to content response (#20398)
Gusted [Sat, 30 Jul 2022 08:09:04 +0000 (10:09 +0200)]
Add latest commit's SHA to content response (#20398)

* Add latest commit's SHA to content response

- When requesting the contents of a filepath, add the latest commit's
SHA to the requested file.
- Resolves #12840

* Add swagger

* Fix NPE

* Fix tests

* Hook into LastCommitCache

* Move AddLastCommitCache to a common nogogit and gogit file

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

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoImprove token and secret key generation docs (#20387)
Ben Yanke [Sat, 30 Jul 2022 05:28:50 +0000 (01:28 -0400)]
Improve token and secret key generation docs (#20387)

This PR proposes a minor improvement to the docs which allows a user to paste a single command into their terminal and get the needed tokens and keys.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
silverwind [Sat, 30 Jul 2022 00:21:27 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoRework raw file http header logic (#20484)
silverwind [Fri, 29 Jul 2022 15:26:55 +0000 (17:26 +0200)]
Rework raw file http header logic (#20484)

- Always respect the user's configured mime type map
- Allow more types like image/pdf/video/audio to serve with correct content-type
- Shorten cache duration of raw files to 5 minutes, matching GitHub
- Don't set `content-disposition: attachment`, let the browser decide whether it wants to download or display a file directly
- Implement rfc5987 for filenames, remove previous hack. Confirmed it working in Safari.
- Make PDF attachment work in Safari by removing `sandbox` attribute.

This change will make a lot more file types open directly in browser now. Logic should generally be more readable than before with less `if` nesting and such.

Replaces: https://github.com/go-gitea/gitea/pull/20460
Replaces: https://github.com/go-gitea/gitea/pull/20455
Fixes: https://github.com/go-gitea/gitea/issues/20404
2 years agoUpdate lunny/levelqueue to prevent NPE when reads are performed after close (#20534)
zeripath [Fri, 29 Jul 2022 11:41:13 +0000 (12:41 +0100)]
Update lunny/levelqueue to prevent NPE when reads are performed after close (#20534)

2 years agoAdded guidance on file to choose to download (#20474)
Alex Papadimoulis [Fri, 29 Jul 2022 06:07:52 +0000 (02:07 -0400)]
Added guidance on file to choose to download (#20474)

* Added guidance on file to choose to download

* Update from-binary.en-us.md

* Update from-binary.en-us.md

* Update from-binary.en-us.md

* Update docs/content/doc/installation/from-binary.en-us.md

* Update docs/content/doc/installation/from-binary.en-us.md

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2 years ago[skip ci] Updated translations via Crowdin
zeripath [Fri, 29 Jul 2022 00:21:37 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoEnsure that all unmerged files are merged when conflict checking (#20528)
zeripath [Thu, 28 Jul 2022 23:19:55 +0000 (00:19 +0100)]
Ensure that all unmerged files are merged when conflict checking (#20528)

There is a subtle bug in the code relating to collating the results of
`git ls-files -u -z` in `unmergedFiles()`. The code here makes the
mistake of assuming that every unmerged file will always have a stage 1
conflict, and this results in conflicts that occur in stage 3 only being
dropped.

This PR simply adjusts this code to ensure that any empty unmergedFile
will always be passed down the channel.

The PR also adds a lot of Trace commands to attempt to help find future
bugs in this code.

Fix #19527

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agopackages/generic: Do not restrict package versions to SemVer (#20414)
Gergely Nagy [Thu, 28 Jul 2022 22:09:54 +0000 (00:09 +0200)]
packages/generic: Do not restrict package versions to SemVer (#20414)

There are existing packages out there whose version do not conform to SemVer, yet, one would like to have them available in a generic package repository. To this end, remove the SemVer restriction on package versions when using the Generic package registry, and replace it with a check that simply makes sure the version isn't empty.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: 6543 <6543@obermui.de>
2 years agoStop logging EOFs and exit(1)s in ssh handler (#20476)
zeripath [Thu, 28 Jul 2022 19:56:55 +0000 (20:56 +0100)]
Stop logging EOFs and exit(1)s in ssh handler (#20476)

The code in modules/ssh/ssh.go:sessionHandler() currently cause an error to be
logged if `gitea serv` exits with a exit(1). This logging is useless because the
accompanying stderr is not provided and in any case the exit(1) is most likely due
to permissions errors.

Further it then causes the EOF to be logged - even though this is not helpful.

This PR simply checks the errors returned and stops logging them.

In the case of misconfigurations causing `gitea serv` to fail with exit(1)
the current logging is not helpful at determining this and users should simply
review the message passed over the ssh connection.

Fix #20473

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agoFix dashboard switching on Mobile (#20238)
Gusted [Thu, 28 Jul 2022 18:40:23 +0000 (20:40 +0200)]
Fix dashboard switching on Mobile (#20238)

- This is a regression of improving mobile experience on Gitea, currently organization dashboard aren't readable and the popup won't show up when you want to switch between users/organization(as we saw in #19978).
- This patch fixes that, by allowing the popup to allocate the required pixels(for some absurd reason, z-index doesn't work on the popup, so it's not able to render over the existing elements, we can investigate later of why this is). And also remove the additional dropdown menu for the pages link, so it's one unified list which then can be displayed as rows.

2 years agoModify milestone search keywords to be case insensitive again (#20513)
Tyrone Yeh [Thu, 28 Jul 2022 16:58:04 +0000 (00:58 +0800)]
Modify milestone search keywords to be case insensitive again (#20513)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
2 years agoFix i18n for email notifications (#20518)
wxiaoguang [Thu, 28 Jul 2022 15:28:46 +0000 (23:28 +0800)]
Fix i18n for email notifications (#20518)

2 years agoExtended permission checks. (#20517)
KN4CK3R [Thu, 28 Jul 2022 13:04:03 +0000 (15:04 +0200)]
Extended permission checks. (#20517)

2 years agoAdd a checkbox to select all issues/PRs (#20177)
Tyrone Yeh [Thu, 28 Jul 2022 10:25:18 +0000 (18:25 +0800)]
Add a checkbox to select all issues/PRs (#20177)

2 years agoAdded email notification option to receive all own messages (#20179)
Tyrone Yeh [Thu, 28 Jul 2022 08:30:12 +0000 (16:30 +0800)]
Added email notification option to receive all own messages (#20179)

Sometimes users want to receive email notifications of messages they create or reply to,
Added an option to personal preferences to allow users to choose

Closes #20149

2 years agoAdd Docker /v2/_catalog endpoint (#20469)
KN4CK3R [Thu, 28 Jul 2022 03:59:39 +0000 (05:59 +0200)]
Add Docker /v2/_catalog endpoint (#20469)

* Added properties for packages.
* Fixed authenticate header format.
* Added _catalog endpoint.
* Check owner visibility.
* Extracted condition.
* Added test for _catalog.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoRemoved some vestigial code related to Range bounds checks (#20312)
Philip Peterson [Thu, 28 Jul 2022 03:04:36 +0000 (23:04 -0400)]
Removed some vestigial code related to Range bounds checks (#20312)

2 years agoAdd markdownlint (#20512)
silverwind [Thu, 28 Jul 2022 01:22:47 +0000 (03:22 +0200)]
Add markdownlint (#20512)

Add `markdownlint` linter and fix issues. Config is based on the one
from electron's repo with a few rules relaxed.

2 years agoFix possible panic when repository is empty (#20509)
Lunny Xiao [Wed, 27 Jul 2022 16:46:34 +0000 (00:46 +0800)]
Fix possible panic when repository is empty (#20509)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agopatch (doc): add heading to ssh flow explanation (#20506)
Kevin Samuel [Wed, 27 Jul 2022 14:06:02 +0000 (16:06 +0200)]
patch (doc): add heading to ssh flow explanation (#20506)

2 years agoShow hint to link package to repo when viewing empty repo package list (#20504)
Norwin [Wed, 27 Jul 2022 11:58:21 +0000 (13:58 +0200)]
Show hint to link package to repo when viewing empty repo package list (#20504)

* show hint to link package to repo

on empty repo package listing

* reword

2 years agoFix ROOT_URL detection for URLs without trailing slash (#20502)
wxiaoguang [Wed, 27 Jul 2022 09:19:10 +0000 (17:19 +0800)]
Fix ROOT_URL detection for URLs without trailing slash (#20502)

2 years agoAdd Tar ZSTD support (#20493)
Gusted [Wed, 27 Jul 2022 06:16:28 +0000 (08:16 +0200)]
Add Tar ZSTD support (#20493)

- Add `.tar.zst` as supported output type.
- Resolves #14290

2 years agoHide internal package versions (#20492)
KN4CK3R [Wed, 27 Jul 2022 01:59:10 +0000 (03:59 +0200)]
Hide internal package versions (#20492)

* Hide internal versions from most searches.

* Added test.

2 years agoFix org members bug (#20489)
Vladimir Yakovlev [Tue, 26 Jul 2022 16:13:24 +0000 (19:13 +0300)]
Fix org members bug (#20489)

* Fix bug in public only org members list

bug was introduced in d6779c7ad3

* Expanded org unit test

2 years agoAdd labels to two buttons that were missing them (#20419)
techknowlogick [Tue, 26 Jul 2022 15:43:13 +0000 (11:43 -0400)]
Add labels to two buttons that were missing them (#20419)

2 years agofix enabling repo packages when projects are off (#20486)
Norwin [Tue, 26 Jul 2022 14:34:14 +0000 (16:34 +0200)]
fix enabling repo packages when projects are off (#20486)

2 years agoDisplay project in issue list (#20434)
aceArt-GmbH [Tue, 26 Jul 2022 13:42:23 +0000 (15:42 +0200)]
Display project in issue list (#20434)

Co-authored-by: lukas <lukas.walter@aceart.de>
2 years agoMake code review ceckboxes clickable (#20481)
Vladimir Yakovlev [Tue, 26 Jul 2022 13:11:39 +0000 (16:11 +0300)]
Make code review ceckboxes clickable (#20481)

2 years agoSlightly simplify LastCommitCache (#20444) 20464/head
zeripath [Mon, 25 Jul 2022 15:39:42 +0000 (16:39 +0100)]
Slightly simplify LastCommitCache (#20444)

The LastCommitCache code is a little complex and there is unnecessary
duplication between the gogit and nogogit variants.

This PR adds the LastCommitCache as a field to the git.Repository and
pre-creates it in the ReferencesGit helpers etc. There has been some
simplification and unification of the variant code.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agoFix Ruby package parsing by removed unused email field (#20470)
KN4CK3R [Mon, 25 Jul 2022 00:52:14 +0000 (02:52 +0200)]
Fix Ruby package parsing by removed unused email field (#20470)

2 years ago[skip ci] Updated translations via Crowdin
Tyrone Yeh [Mon, 25 Jul 2022 00:21:14 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoAdd repository condition for issue count (#20454)
Tyrone Yeh [Sun, 24 Jul 2022 16:53:40 +0000 (00:53 +0800)]
Add repository condition for issue count (#20454)

* Add repository condition for issue count

* Update routers/web/user/home.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoPrepend commit message to template content (#20429)
Gusted [Sun, 24 Jul 2022 03:45:33 +0000 (05:45 +0200)]
Prepend commit message to template content (#20429)

- When a repository has a pull request template, it will always override
the current content. With this PR it will prepend content to the
template content when appropriate. This is similar how GitHub(and GitLab
I presume) does it and it saves developers time to not go open their
commit and copy paste their will written commit message.

2 years agoImprove pprof doc (#20463)
wxiaoguang [Sat, 23 Jul 2022 17:33:55 +0000 (01:33 +0800)]
Improve pprof doc (#20463)

2 years agoImprove code diff highlight, fix incorrect rendered diff result (#19958)
wxiaoguang [Sat, 23 Jul 2022 11:28:02 +0000 (19:28 +0800)]
Improve code diff highlight, fix incorrect rendered diff result (#19958)

Use Unicode placeholders to replace HTML tags and HTML entities first, then do diff, then recover the HTML tags and HTML entities. Now the code diff with highlight has stable behavior, and won't emit broken tags.

2 years agoAdd Cache-Control header to html and api responses, add no-transform (#20432)
silverwind [Sat, 23 Jul 2022 06:38:03 +0000 (08:38 +0200)]
Add Cache-Control header to html and api responses, add no-transform (#20432)

`no-transform` allegedly disables CloudFlare auto-minify and we did not
set caching headers on html or api requests, which seems good to have
regardless.

Transformation is still allowed for asset requests.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2 years ago[skip ci] Updated translations via Crowdin
Gergely Nagy [Sat, 23 Jul 2022 00:20:56 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoAllow non-semver packages in the Conan package registry (#20412)
Gergely Nagy [Fri, 22 Jul 2022 21:54:02 +0000 (23:54 +0200)]
Allow non-semver packages in the Conan package registry (#20412)

A lot of existing packages do not conform to SemVer, yet, they should be allowed
in the Conan package registry as-is. To achieve this, remove the SemVer check
from `NewRecipeReference`, and replace it with a simple empty string check.

A unit test with a non-semver version is also included.

Fixes #20405.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2 years agoUse body text color in repository files table links (#20386)
Lucas Azevedo [Fri, 22 Jul 2022 10:49:24 +0000 (07:49 -0300)]
Use body text color in repository files table links (#20386)

Use body text color in for links in the repository files table
Issue/PR links (`.ref-issue`) will not be affected, as seen in other git services.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2 years agoCorrect code block in installation docs for Snap (#20440)
Andrew Imeson [Fri, 22 Jul 2022 10:12:27 +0000 (06:12 -0400)]
Correct code block in installation docs for Snap (#20440)

Without this, it was rendering on the site like: "sh snap install gitea", instead of: "snap install gitea"

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoDowngrade golangci-lint to 1.47.0 (#20445)
silverwind [Fri, 22 Jul 2022 02:22:44 +0000 (04:22 +0200)]
Downgrade golangci-lint to 1.47.0 (#20445)

This should fix some recently seen linter performance issues. There is some log spam, but it's definitely faster.

Ref: https://github.com/golangci/golangci-lint/issues/2997

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoAdd eslint-plugin-sonarjs (#20431)
silverwind [Fri, 22 Jul 2022 01:10:22 +0000 (03:10 +0200)]
Add eslint-plugin-sonarjs (#20431)

We had this plugin before but it was removed as it became outdated, now
it was updated again, so it's compatible again.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2 years agoFix: Actor is required to get user repositories (#20443)
Dhruv Manilawala [Thu, 21 Jul 2022 21:31:22 +0000 (03:01 +0530)]
Fix: Actor is required to get user repositories (#20443)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2 years agoAdd "X-Gitea-Object-Type" header for GET `/raw/` & `/media/` API (#20438)
6543 [Thu, 21 Jul 2022 19:18:41 +0000 (21:18 +0200)]
Add "X-Gitea-Object-Type" header for GET `/raw/` & `/media/` API (#20438)

2 years agoSimplify visibility checks (#20406)
KN4CK3R [Thu, 21 Jul 2022 10:41:50 +0000 (12:41 +0200)]
Simplify visibility checks (#20406)

Was looking into the visibility checks because I need them for something different and noticed the checks are more complicated than they have to be.

The rule is just: user/org is visible if
- The doer is a member of the org, regardless of the org visibility
- The doer is not restricted and the user/org is public or limited

2 years agoAdd Cloudflare auto-minify to FAQ (#20430)
John Olheiser [Thu, 21 Jul 2022 04:54:42 +0000 (23:54 -0500)]
Add Cloudflare auto-minify to FAQ (#20430)

2 years ago[skip ci] Updated translations via Crowdin
silverwind [Thu, 21 Jul 2022 00:20:58 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoUpdate JS dependencies (#20423)
silverwind [Wed, 20 Jul 2022 15:48:06 +0000 (17:48 +0200)]
Update JS dependencies (#20423)

- Update all JS dependencies minus vue ones
- Remove workaround for case-insensitive attribute selector
- Add new linter rules and fix issues
- Tested SVG display and swagger

2 years agoUpdate all tool dependencies to their latest versions (#20409)
silverwind [Wed, 20 Jul 2022 07:53:58 +0000 (09:53 +0200)]
Update all tool dependencies to their latest versions (#20409)

2 years ago[skip ci] Updated translations via Crowdin
6543 [Wed, 20 Jul 2022 00:20:52 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoDismiss prior pull reviews if done via web in review dismiss (#20197)
6543 [Tue, 19 Jul 2022 13:20:28 +0000 (15:20 +0200)]
Dismiss prior pull reviews if done via web in review dismiss (#20197)

2 years agoFix modified due date message (#20388)
Lucas Azevedo [Tue, 19 Jul 2022 12:30:55 +0000 (09:30 -0300)]
Fix modified due date message (#20388)

2 years agoFix public org members displayed too many informations (#20403)
Lunny Xiao [Tue, 19 Jul 2022 10:22:38 +0000 (18:22 +0800)]
Fix public org members displayed too many informations (#20403)

2 years agoAdd two factor status to admin cmd display (#20401)
Tyrone Yeh [Tue, 19 Jul 2022 08:43:49 +0000 (16:43 +0800)]
Add two factor status to admin cmd display (#20401)

2 years agoUse tippy.js for context popup (#20393)
silverwind [Mon, 18 Jul 2022 22:33:34 +0000 (00:33 +0200)]
Use tippy.js for context popup (#20393)

By appending the tooltips to `document.body`, we can avoid any stacking context issues caused by surrounding element's CSS.

This uses [tippy.js](https://github.com/atomiks/tippyjs) instead of Fomantic popups. We should aim to replace all Fomantic popups with this eventually and then get rid of the Fomantic `popup` module completely.

2 years ago[skip ci] Updated licenses and gitignores
CLanguagePurist [Sun, 17 Jul 2022 00:20:41 +0000 (00:20 +0000)]
[skip ci] Updated licenses and gitignores

2 years agoComment on PrivateUsers option for gitea.service (#20383)
CLanguagePurist [Sat, 16 Jul 2022 12:58:56 +0000 (06:58 -0600)]
Comment on PrivateUsers option for gitea.service (#20383)

* Comment on PrivateUsers option for gitea.service

A user happens to encounter an issue where PrivateUsers sandboxed Gitea.service and it effectively stop systemd from applying capabilities for that gitea.service. I am opening this PR to provide comments on PrivateUsers, effectively a tiny FAQ information for end-user.

2 years ago[skip ci] Updated translations via Crowdin
wxiaoguang [Sat, 16 Jul 2022 00:20:56 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoRemove confusing TrimPrefix(... git.BranchPrefix) (#20369)
wxiaoguang [Sat, 16 Jul 2022 00:10:02 +0000 (08:10 +0800)]
Remove confusing TrimPrefix(... git.BranchPrefix) (#20369)

Make Repository.GetDefaultBranch return the real branch name, instead of the ref name. Then there is no need to do TrimPrefix for repo.DefaultBranch

2 years agoSet target on create release with existing tag (#20381)
Gusted [Fri, 15 Jul 2022 18:39:03 +0000 (18:39 +0000)]
Set target on create release with existing tag (#20381)

When you create a new release(e.g. via Tea) and specify a tag that already exists on
the repository, Gitea will instead use the `UpdateRelease`
functionality. However it currently doesn't set the Target field. This
PR fixes that.

2 years agoInitialize cron last (#20373)
zeripath [Fri, 15 Jul 2022 15:20:05 +0000 (16:20 +0100)]
Initialize cron last (#20373)

Cron will try to run certain things at startup but these depend on multiple things
being set-up. Therefore we should initialize cron last.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agoAllow access to the Public Organization Member lists with minimal permissions (#20330)
a1012112796 [Fri, 15 Jul 2022 14:21:54 +0000 (22:21 +0800)]
Allow access to the Public Organization Member lists with minimal permissions (#20330)

Examining Organization membership should not necessarily require sign-in if the organization is public and the members are public. Therefore we should adjust `/org/{org}/members` to not require login.

Fix #7501

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: zeripath <art27@cantab.net>
2 years agoFix commit status icon when in subdirectory (#20285)
silverwind [Fri, 15 Jul 2022 13:01:32 +0000 (15:01 +0200)]
Fix commit status icon when in subdirectory (#20285)

When viewing a subdirectory and the latest commit to that directory in
the table, the commit status icon incorrectly showed the status of the
HEAD commit instead of the latest for that directory.

2 years agoFix eslint parsing errors, remove eslint-plugin-html (#20323)
silverwind [Fri, 15 Jul 2022 09:38:18 +0000 (11:38 +0200)]
Fix eslint parsing errors, remove eslint-plugin-html (#20323)

Introduce a separate .eslintrc in the Vue components folder to
selectively enable vue-eslint-parser there, so that the rest of the
files can use eslint's core parser which can deal with hashbangs.

The fact that the eslint-disable comments worked in HTML was a
unintended side-effect of the files being parsed via vue-eslint-parser,
so I had to disable the parsing of these files in .eslintrc.yaml to make
it work, and finally decided to remove eslint-plugin-html as it causes
more issues than it solves.

2 years agoInclude login_name in adminCreateUser response (#20283)
Baekjun Kim [Fri, 15 Jul 2022 08:52:11 +0000 (01:52 -0700)]
Include login_name in adminCreateUser response (#20283)

`login_name` (Authentication Sign-in Name) is not included in the response of `adminUserCreate` API.
This PR is to return user-specified `login_name` if there is one.

2 years agoAdd allow_rebase_update, default_delete_branch_after_merge to repository api response...
Bian Jiaping [Fri, 15 Jul 2022 08:00:01 +0000 (16:00 +0800)]
Add allow_rebase_update, default_delete_branch_after_merge to repository api response (#20079)

`PATCH /repos/{owner}/{repo}` API allows users to update `allow_rebase_update`, `default_delete_branch_after_merge`, but `GET /repos/{owner}/{repo}` API does not return these two options, and API users has no other ways to find the state of these two options.

This PR add `allow_rebase_update`, `default_delete_branch_after_merge` to repository query api response.

2 years agoAllow to specify colors for text in markup (#20363)
Gusted [Fri, 15 Jul 2022 06:38:10 +0000 (06:38 +0000)]
Allow to specify colors for text in markup (#20363)

`<span style="color: red">Hello World!</span>` will now be accepted by
Bluemonday, other properties are still disallowed by Bluemonday.

2 years ago[skip ci] Updated translations via Crowdin
6543 [Fri, 15 Jul 2022 00:20:57 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoupdate xorm.io/xorm v1.3.2-0.20220714055524-c3bce556200f (#20371)
6543 [Thu, 14 Jul 2022 18:40:30 +0000 (20:40 +0200)]
update xorm.io/xorm v1.3.2-0.20220714055524-c3bce556200f (#20371)

Xorm 1.3.2-0.20220714055524 contains a fix for interpreting db column sizes. Prior to this fix xorm would assume that the size of a column was within the range of an `int`. This is correct on 64bit machines where `int` is typical equivalent to `int64` however, on 32bit machines `int` tends to be `int32`.

Unfortunately the size of a LONGTEXT field is actually `max_uint32`, thus using `strconv.Atoi` on these fields will fail and thus #20161 occurs on 32 bit arm. Xorm 1.3.2-0.20220714055524 changes this field to use int64 instead.

Fix  #20161

2 years agoAdd order by for assignee no sort issue (#20053)
Tyrone Yeh [Thu, 14 Jul 2022 16:00:10 +0000 (00:00 +0800)]
Add order by for assignee no sort issue (#20053)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoMake sure `repo_dir` is an empty directory or doesn't exist before 'dump-repo' (...
a1012112796 [Thu, 14 Jul 2022 13:52:18 +0000 (21:52 +0800)]
Make sure `repo_dir` is an empty directory or doesn't exist before 'dump-repo' (#20205)

2 years agoFix English mistakes in some Markdown documents (#20274)
Jeremy [Thu, 14 Jul 2022 11:15:35 +0000 (23:15 +1200)]
Fix English mistakes in some Markdown documents (#20274)

2 years agoFix versions check for busybox `sh` (#20358)
silverwind [Thu, 14 Jul 2022 08:58:14 +0000 (10:58 +0200)]
Fix versions check for busybox `sh` (#20358)

`printf` in busybox emits a ugly 'invalid number' error when formatting
string variables are present. Avoid that by reducing the go version
check to just two digits, which ought to be enough as patch-level go
versions are meant to be compatible. Avoid error on node-check as well.

2 years agoUnbreak release pipeline (#20356)
silverwind [Thu, 14 Jul 2022 08:09:26 +0000 (10:09 +0200)]
Unbreak release pipeline (#20356)

Downgrade release pipeline to node 16 until xgo updates its base OS to a
version with a compatible glibc.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoAdd option to purge users (#18064)
zeripath [Thu, 14 Jul 2022 07:22:09 +0000 (08:22 +0100)]
Add option to purge users (#18064)

Add the ability to purge users when deleting them.

Close #15588

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agoFix icon margin in user/settings/repos (#20281)
Baoshuo Ren [Thu, 14 Jul 2022 03:03:31 +0000 (11:03 +0800)]
Fix icon margin in user/settings/repos (#20281)

2 years agoFix org label open count, including close count issue (#20353)
Tyrone Yeh [Thu, 14 Jul 2022 02:09:03 +0000 (10:09 +0800)]
Fix org label open count, including close count issue (#20353)

Fixed using organization tags to see open issues in the tag list including closed issues count

2 years ago[skip ci] Updated translations via Crowdin
zeripath [Thu, 14 Jul 2022 00:21:35 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoPrevent context deadline error propagation in GetCommitsInfo (#20346)
zeripath [Wed, 13 Jul 2022 22:24:29 +0000 (23:24 +0100)]
Prevent context deadline error propagation in GetCommitsInfo (#20346)

* Prevent context deadline error propagation in GetCommitsInfo

Although `WalkGitLog` tries to test for `context.DeadlineExceededErr`
there is a small chance that the error will propagate to the reader
before it is recognised. This will cause the error to propagate up to
`renderDirectoryFiles` and cause a http status 500.

Here we check that the error passed is a `DeadlineExceededErr` via error.Is

Fix #20329

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agoAdd missing return for when topic isn't found (#20351)
Gusted [Wed, 13 Jul 2022 17:39:19 +0000 (17:39 +0000)]
Add missing return for when topic isn't found (#20351)

Add missing return to DeleteTopic API when the topic is not found.

2 years agoUpgrade to Node 18 on CI (#20340)
silverwind [Wed, 13 Jul 2022 15:45:08 +0000 (17:45 +0200)]
Upgrade to Node 18 on CI (#20340)

* Upgrade to Node 18 on CI

Should be pretty stable now.

* restart ci

Co-authored-by: 6543 <6543@obermui.de>
2 years agoFix checks in PR for empty commits #19603 (#20290)
Ing. Jaroslav Šafka [Wed, 13 Jul 2022 08:22:51 +0000 (10:22 +0200)]
Fix checks in PR for empty commits #19603 (#20290)

* Fixes issue #19603 (Not able to merge commit in PR when branches content is same, but different commit id)
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging
* based on @zeripath patch in #19738

2 years agoUse default values when provided values are empty (#20318)
Gusted [Wed, 13 Jul 2022 05:33:31 +0000 (05:33 +0000)]
Use default values when provided values are empty (#20318)

* Use default values when provided values are empty

- When provided values are empty like `:3000` would imply that host is
empty, use the default value.
- Resolves #20316

* Update database.go

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