]> source.dussan.org Git - gitea.git/log
gitea.git
4 years agoUpgrade jQuery to 3.5.0, remove jQuery-Migrate, fix deprecations (#11055)
silverwind [Sat, 18 Apr 2020 22:46:29 +0000 (00:46 +0200)]
Upgrade jQuery to 3.5.0, remove jQuery-Migrate, fix deprecations (#11055)

- Removed jQuery-Migrate as it seems to no longer be needed.
- Removed a dead code section.
- Fixed some deprecations detected by jQuery-Migrate.

Ref: https://jquery.com/upgrade-guide/3.5/
Ref: https://github.com/gogs/gogs/search?q=repo-name-change-prompt
Ref: https://github.com/go-gitea/gitea/search?q=repo-name-change-prompt
Fixes: https://github.com/go-gitea/gitea/issues/9372
Co-authored-by: zeripath <art27@cantab.net>
4 years agoOn Repo Deletion: Delete related TrackedTimes too (#11110)
6543 [Sat, 18 Apr 2020 21:39:23 +0000 (23:39 +0200)]
On Repo Deletion: Delete related TrackedTimes too (#11110)

4 years agoSend 404 immediately for known public requests (#11117)
silverwind [Sat, 18 Apr 2020 21:01:06 +0000 (23:01 +0200)]
Send 404 immediately for known public requests (#11117)

Instead of further handling requests to public which causes issues like #11088, immediately terminate requests to directories js, css, fomantic if no file is found which is checked against a hardcoded list. Maybe there is a way to retrieve the top-level entries below public in a dynamic fashion.

I also added fomantic to the reserved usernames and sorted the list.

Fixes: #11088
4 years agoAvoid 0 new commits messages to be send (#11082)
Cornel [Sat, 18 Apr 2020 20:02:59 +0000 (23:02 +0300)]
Avoid 0 new commits messages to be send (#11082)

Fixes #10498

4 years agoAdd single release page and latest redirect (#11102)
John Olheiser [Sat, 18 Apr 2020 14:47:15 +0000 (09:47 -0500)]
Add single release page and latest redirect (#11102)

* Add single release and latest release routes

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update API and move latest search to models

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd a way to mark Conversation (code comment) resolved (#11037)
赵智超 [Sat, 18 Apr 2020 13:50:25 +0000 (21:50 +0800)]
Add a way to mark Conversation (code comment) resolved (#11037)

* Add a way to mark Conversation (code comment) resolved

mark Conversation is a way to mark a Conversation is stale
or be solved. when it's marked as stale, will be hided like
stale. all Pull Request writer , Offical Reviewers and poster
can add or remove Conversation resolved mark.

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

* Apply suggestions from code review

* Add ResolveDoer
* fix ui

Co-Authored-By: Lauris BH <lauris@nix.lv>
Co-Authored-By: 6543 <6543@obermui.de>
* change IsResolved to an function
Add permission check in UpdateResolveConversation

* Apply suggestions from code review

* change return error for permisson check
* add default message for deleted user
* get issue message from comment
* add migration for ``ResolveDoerID`` column

another  change:
* block mark pending review as resolved because it's not necessary

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* change button color

* resolve button size

* fix code style

* remove unusefull code

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd X-Total-Count on /repos/{owner]/{repo}/pulls API (#11113)
CirnoT [Sat, 18 Apr 2020 06:53:56 +0000 (08:53 +0200)]
Add X-Total-Count on /repos/{owner]/{repo}/pulls API (#11113)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 18 Apr 2020 04:20:32 +0000 (04:20 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRefresh codemirror on show pull comment tab (#11100)
zeripath [Sat, 18 Apr 2020 04:19:19 +0000 (05:19 +0100)]
Refresh codemirror on show pull comment tab (#11100)

Fix #10975

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years ago[BugFix] remove nil inserts in models (#11096)
6543 [Fri, 17 Apr 2020 17:42:57 +0000 (19:42 +0200)]
[BugFix] remove nil inserts in models (#11096)

* Fix InsertReleases Nil Insert on Attachments

* FIX "No element on slice when insert" & smal refactor

* again

* impruve

* rm useles newline

* Apply suggestions from code review

Co-Authored-By: zeripath <art27@cantab.net>
* process insert as a whole

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 17 Apr 2020 16:36:23 +0000 (16:36 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoui: fix status label on branches list vertical alignment (#11109)
赵智超 [Fri, 17 Apr 2020 16:35:12 +0000 (00:35 +0800)]
ui: fix status label on branches list vertical alignment (#11109)

change status icon for merged PR to git-merge

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years agoPrevent merge of outdated PRs on protected branches (#11012)
6543 [Fri, 17 Apr 2020 01:00:36 +0000 (03:00 +0200)]
Prevent merge of outdated PRs on protected branches (#11012)

* Block PR on Outdated Branch

* finalize

* cleanup

* fix typo and sentences

thanks @guillep2k

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 16 Apr 2020 21:27:45 +0000 (21:27 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix and simplify some tmpl conditions (#11080)
guillep2k [Thu, 16 Apr 2020 21:26:24 +0000 (18:26 -0300)]
Fix and simplify some tmpl conditions (#11080)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 16 Apr 2020 19:09:25 +0000 (19:09 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd missing commit states to PR checks template (#11085)
CirnoT [Thu, 16 Apr 2020 19:08:20 +0000 (21:08 +0200)]
Add missing commit states to PR checks template (#11085)

* Add missing commit states to PR checks template

* Add separate translation strings for warning and error

* Fix failure status string

* Revert accidental change with whitespace

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 16 Apr 2020 15:35:01 +0000 (15:35 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRemove nonexistant serviceworker entries (#11091)
silverwind [Thu, 16 Apr 2020 15:33:22 +0000 (17:33 +0200)]
Remove nonexistant serviceworker entries (#11091)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 16 Apr 2020 10:45:52 +0000 (10:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years ago[BugFix] ReviewCount: GetApprovalCounts func sorted wrong (#11086)
6543 [Thu, 16 Apr 2020 10:44:34 +0000 (12:44 +0200)]
[BugFix] ReviewCount: GetApprovalCounts  func sorted wrong (#11086)

* FIX by simplify

* code reformat and optimize

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 15 Apr 2020 20:36:28 +0000 (20:36 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix merge dialog on protected branch with missing required statuses (#11074)
6543 [Wed, 15 Apr 2020 20:35:18 +0000 (22:35 +0200)]
Fix merge dialog on protected branch with missing required statuses (#11074)

It is possible for misconfigured protected branches to have required status checks that are not in any of the current statuses: Pending, Success, Error, Failure, or Warning - presumably because the CI has not contacted us as yet.

Fix #10636 by adding case: missing StatusChecks when these are missing

4 years agoAlign review-item svg octicons (#11065)
CirnoT [Wed, 15 Apr 2020 18:41:55 +0000 (20:41 +0200)]
Align review-item svg octicons (#11065)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 15 Apr 2020 17:42:06 +0000 (17:42 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMigrate to go-enry new version (#10906)
Lauris BH [Wed, 15 Apr 2020 17:40:39 +0000 (20:40 +0300)]
Migrate to go-enry new version (#10906)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 15 Apr 2020 13:04:26 +0000 (13:04 +0000)]
[skip ci] Updated translations via Crowdin

4 years agodocument 404 responce and meaning (#11073)
6543 [Wed, 15 Apr 2020 13:03:05 +0000 (15:03 +0200)]
document 404 responce and meaning (#11073)

4 years agoContents API should return 404 on not exist (#10323)
zeripath [Wed, 15 Apr 2020 05:18:51 +0000 (06:18 +0100)]
Contents API should return 404 on not exist (#10323)

* Return 404 on not exist

* swagger update and use git.IsErrNotExist

* Handle delete too

* Handle delete too x2

* Fix pr 10323 (#3)

* fix TESTS

* leafe a note for fututre

* placate golangci-lint

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

Co-Authored-By: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd translation head on docs site (#11063)
Lunny Xiao [Wed, 15 Apr 2020 04:42:09 +0000 (12:42 +0800)]
Add translation head on docs site (#11063)

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoReplace references to cron.update_migration_post_id with cron.update_migration_poster...
Kristian Antonsen [Wed, 15 Apr 2020 00:44:08 +0000 (02:44 +0200)]
Replace references to cron.update_migration_post_id with cron.update_migration_poster_id in docs (#11068)

Across several files, references to cron.update_migration_post_id are made, although the actual setting is called cron.update_migration_poster_id according to modules/setting/cron.go (https://github.com/go-gitea/gitea/blob/10e2f291442fdc7efc31c02f5ffcba79a36db9ac/modules/setting/cron.go#L54).

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoFix Migration 136 (be less aggressive to open pulls missing git files) (#11072)
6543 [Tue, 14 Apr 2020 22:16:07 +0000 (00:16 +0200)]
Fix Migration 136 (be less aggressive to open pulls missing git files) (#11072)

* be less aggressife to open pulls when migrating

* remove unused

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 14 Apr 2020 18:33:15 +0000 (18:33 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRemove check on username if AccessToken authentication (#11015)
zeripath [Tue, 14 Apr 2020 18:32:03 +0000 (19:32 +0100)]
Remove check on username if AccessToken authentication (#11015)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agofix (#11066)
6543 [Tue, 14 Apr 2020 16:29:31 +0000 (18:29 +0200)]
fix (#11066)

4 years agoCache PullRequest Divergence (#10914)
6543 [Tue, 14 Apr 2020 13:53:34 +0000 (15:53 +0200)]
Cache PullRequest Divergence (#10914)

* Cache PullRequest Divergence

* only re-calc divergence if AddTestPullRequestTask() is exec

* migrate already open pulls

* finalize

* take care of closed&not-merged+deleted-branch pull requests

* fix nil pointer exeption

Signed-off-by: 6543 <6543@obermui.de>
* try this

* no error its a warn

* init gitea-repositories-meta

* dont use gitDivergence type

* CI.restart()

* CI.restart()

* CI.restart()

* CI.restart()

* check IsUserAllowedToUpdate independend from CommitsBehind

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 14 Apr 2020 11:38:33 +0000 (11:38 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoui: Change icon on title for merged PR to git-merge (#11064)
赵智超 [Tue, 14 Apr 2020 11:37:10 +0000 (19:37 +0800)]
ui: Change icon on title for merged PR to git-merge (#11064)

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years agoAdd charset handling to backup/restore doc (#11062)
maxm123 [Tue, 14 Apr 2020 02:55:20 +0000 (04:55 +0200)]
Add charset handling to backup/restore doc (#11062)

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoui: Add MergePull comment type instead of close for merge PR (#11058)
赵智超 [Tue, 14 Apr 2020 01:06:23 +0000 (09:06 +0800)]
ui: Add MergePull comment type instead of close for merge PR (#11058)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix language label vertical alignment (#11061)
silverwind [Mon, 13 Apr 2020 20:00:32 +0000 (22:00 +0200)]
Fix language label vertical alignment (#11061)

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoReject duplicate AccessToken names (#10994)
6543 [Mon, 13 Apr 2020 19:02:48 +0000 (21:02 +0200)]
Reject duplicate AccessToken names (#10994)

* make sure duplicate token names cannot be used

* add check to api routes too

* add @lunny s suggestion

* fix & don't forget User.ID

* AccessTokenByNameExists() return error too

* unique token for each test

* fix lint

Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: Lanre Adelowo <yo@lanre.wtf>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 13 Apr 2020 13:03:35 +0000 (13:03 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMove syntax highlighting to web worker (#11017)
silverwind [Mon, 13 Apr 2020 13:02:31 +0000 (15:02 +0200)]
Move syntax highlighting to web worker (#11017)

This should eliminate page freezes when loading big files/diff.
`highlightBlock` is needed to preserve existing nodes when highlighting
and for that, highlight.js needs access to the DOM API so I added a DOM
implementation to make it work, which adds around 300kB to the output
file size of the lazy-loaded `highlight.js`.

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoadd 'make watch-frontend' and expand docs (#10931)
silverwind [Sun, 12 Apr 2020 03:50:59 +0000 (05:50 +0200)]
add 'make watch-frontend' and expand docs (#10931)

* add 'make watch-frontend' and expand docs

* add bindata note

* add .PHONY

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agofix 404 and 500 image size in small size screen (#11043)
赵智超 [Sat, 11 Apr 2020 20:31:17 +0000 (04:31 +0800)]
fix 404 and 500 image size in small size screen (#11043)

do it by define Semantic UI image class

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoTweak app.ini.sample (#11042)
silverwind [Sat, 11 Apr 2020 15:59:29 +0000 (17:59 +0200)]
Tweak app.ini.sample (#11042)

Few misc tweaks to the sample config

4 years agoFix CreateComment for SQLite and JS click event on Request Review (#11040)
赵智超 [Sat, 11 Apr 2020 04:44:50 +0000 (12:44 +0800)]
Fix CreateComment for SQLite and JS click event on Request Review (#11040)

* fix some bug about Request review

* fix ``CreateComment`` wrong using ,it will not work when use Sqlite
* fix wrong js click event code , it will send wrong data when it has
many choices

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

Co-Authored-By: Lauris BH <lauris@nix.lv>
* add getReviewerByIssueIDAndUserID
fix wrong conditions check in initIssueComments after #10972

* call CI again

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years ago[Docs] Cross Build Gitea from Source (#10999)
Bagas Sanjaya [Sat, 11 Apr 2020 03:13:31 +0000 (10:13 +0700)]
[Docs] Cross Build Gitea from Source (#10999)

* Add cross-build docs

Note that C cross compiler is required for building Gitea with `TAGS`.

* Apply suggestion from @mrsdizzie

Co-Authored-By: mrsdizzie <info@mrsdizzie.com>
* Apply suggestion from @guillep2k

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
4 years ago[Api] Check Notify (always return json) (#10059)
6543 [Fri, 10 Apr 2020 23:49:39 +0000 (01:49 +0200)]
[Api] Check Notify (always return json) (#10059)

* BEAKING: check return status based on struct not httpStatus

* update Tests

* CI.restart()

4 years agoPrettify Timeline (#10972)
Sorien [Fri, 10 Apr 2020 22:01:41 +0000 (00:01 +0200)]
Prettify Timeline (#10972)

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
4 years agoremove package code.gitea.io/gitea/modules/git import out of models (#11025)
6543 [Fri, 10 Apr 2020 11:26:37 +0000 (13:26 +0200)]
remove package code.gitea.io/gitea/modules/git import out of models (#11025)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 10 Apr 2020 10:43:04 +0000 (10:43 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoLoad pr Issue Poster on API too (#11033)
6543 [Fri, 10 Apr 2020 10:40:36 +0000 (12:40 +0200)]
Load pr Issue Poster on API too (#11033)

4 years agoAdd Get/Update for api/v1/user/applications/oauth2 (#11008)
Dan Molik [Fri, 10 Apr 2020 00:37:31 +0000 (20:37 -0400)]
Add Get/Update for api/v1/user/applications/oauth2 (#11008)

Add api methods for getting and updating user oauth2 applications.

Signed-off-by: Dan Molik <dan@danmolik.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoAdd git hook tooltip (#11030)
John Olheiser [Thu, 9 Apr 2020 23:15:09 +0000 (18:15 -0500)]
Add git hook tooltip (#11030)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoMatch arc-green code tag color to code blocks (#11023)
silverwind [Thu, 9 Apr 2020 19:03:14 +0000 (21:03 +0200)]
Match arc-green code tag color to code blocks (#11023)

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoui:Add flash notify for email preference seting success (#11027)
赵智超 [Thu, 9 Apr 2020 17:22:17 +0000 (01:22 +0800)]
ui:Add flash notify for email preference seting success (#11027)

* Add flash notify for email preference seting success

Signed-off-by: a1012112796 <1012112796@qq.com>
* add review suggest changes

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-Authored-By: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoHandle yaml frontmatter (#11016)
zeripath [Thu, 9 Apr 2020 10:54:50 +0000 (11:54 +0100)]
Handle yaml frontmatter (#11016)

Add goldmark-meta to render yaml frontmatter as a table

Fix #5377

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agointegrations: deprecate HeaderMaps (#11018)
Lars Lehtonen [Wed, 8 Apr 2020 23:30:03 +0000 (16:30 -0700)]
integrations: deprecate HeaderMaps (#11018)

4 years agoFix forked repo has no icon and language stat. (#10791)
L0veSunshine [Wed, 8 Apr 2020 12:13:04 +0000 (20:13 +0800)]
Fix forked repo has no icon and language stat. (#10791)

* Update header.tmpl

* Update _repository.less

* Update pull.go

* Update indexer.go

* Update pull.go

* Update pull.go

* Update indexer.go

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

Thanks the advice from lunny and 6543.

* fix forked repo doesn't have language stat

Modified as suggested by 6543.

* fix forked repo doesn't have language stat

simplify the function.

* fix forked repo doesn't have language stat

update the indexer after the loop

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[suggest] change merge strategy: do not check write access if user in merge white...
j.yao.SUSE [Wed, 8 Apr 2020 11:26:50 +0000 (19:26 +0800)]
[suggest] change merge strategy: do not check write access if user in merge white list (#10951)

* [suggest] change merge strategy: do not check write access if user in merge white list #10935

(cherry picked from commit ba74fc6389dfcad03c273441a49b54e4d38c86ee)

* fix NPE

* Fix cross compile (#10952)

* Fix cross compile

* Add test for cross compile

* Fix drone

* Fix drone

* Also prevent CC environment not to generate

Co-authored-by: zeripath <art27@cantab.net>
* fix merge box icon color bug (#10974)

that because need some space beturn ``text`` and color defines

Signed-off-by: a1012112796 <1012112796@qq.com>
* [skip ci] Updated translations via Crowdin

* Allow X in addition to x in tasks (#10979)

Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove api: merge  reqRepoWriter

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: GiteaBot <teabot@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoReturn error for authorized_keys and mergebase problems (#10990)
zeripath [Wed, 8 Apr 2020 05:04:19 +0000 (06:04 +0100)]
Return error for authorized_keys and mergebase problems (#10990)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[API] Get a single commit via Ref (#10915)
6543 [Wed, 8 Apr 2020 02:54:46 +0000 (04:54 +0200)]
[API] Get a single commit via Ref (#10915)

* GET /repos/:owner/:repo/commits/:ref

* add Validation Checks

* Fix & Extend TEST

* add two new tast cases

4 years agoAutomatically remove Watches, Assignments, etc if user loses access due to being...
6543 [Tue, 7 Apr 2020 21:52:01 +0000 (23:52 +0200)]
Automatically remove Watches, Assignments, etc if user loses access due to being removed as collaborator or from a team (#10997)

* remove a user from being assigned to any issue/PR if (s)he is removed as a collaborator

* fix gender specific comment

* do not remove users that still have access to the repo if they are a member of a team that can access the repo

* add context to errors

* updates

* incorporate review fixes

* Update models/repo_collaboration.go

Co-Authored-By: 6543 <6543@obermui.de>
* Update models/repo_collaboration.go

Co-Authored-By: 6543 <6543@obermui.de>
* Fix Rebase Relict

* Fix & Impruve

* use xorm builder

* all in one session

* generalize reconsiderIssueAssignees

* Only Unwatch if have no access anymore

* prepare for reuse

* Same things if remove User from Team

* fix lint

* let mysql take time to react

* add description

* CI.restart()

* CI.restart()

Co-authored-by: Lanre Adelowo <yo@lanre.wtf>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoupgrade to most recent bluemonday (#11007)
techknowlogick [Tue, 7 Apr 2020 20:08:47 +0000 (16:08 -0400)]
upgrade to most recent bluemonday (#11007)

* upgrade to most recent bluemonday

* make vendor

* update tests for bluemonday

* update tests for bluemonday

* update tests for bluemonday

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 7 Apr 2020 11:04:55 +0000 (11:04 +0000)]
[skip ci] Updated translations via Crowdin

4 years agotweak code tags in markdown (#11000)
silverwind [Tue, 7 Apr 2020 11:03:49 +0000 (13:03 +0200)]
tweak code tags in markdown (#11000)

- remove whitespace before and after
- increase horizontal padding
- make blocks more apparant on arc-green

4 years agoSupport running subtests manually (#10988)
Mura Li [Tue, 7 Apr 2020 04:31:11 +0000 (12:31 +0800)]
Support running subtests manually (#10988)

Since GNU Make does not allow '/' in the target patterns,
we tranlate the subsequent '.' into '/' for "go test -run".

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix Ctrl-Enter shortcut for issues (#10986)
Michael Kuhn [Tue, 7 Apr 2020 03:51:21 +0000 (05:51 +0200)]
Fix Ctrl-Enter shortcut for issues (#10986)

The js-quick-submit class needs to be applied to SimpleMDE's input
field, which is currently only done for wiki pages.

Fixes #10937

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years ago[feature] provide `OwnerName` field for README template (#10981)
j.yao.SUSE [Tue, 7 Apr 2020 01:40:38 +0000 (09:40 +0800)]
[feature] provide `OwnerName` field for README template (#10981)

Co-Authored-By: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[Docs] Add Note to Readme-Template about Variable Espansion (#10983)
6543 [Mon, 6 Apr 2020 23:43:17 +0000 (01:43 +0200)]
[Docs] Add Note to Readme-Template about Variable Espansion (#10983)

* add note with Espansion VarNames

* add context of Name

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 6 Apr 2020 20:20:08 +0000 (20:20 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd docs for gmail (#10995)
zeripath [Mon, 6 Apr 2020 20:18:42 +0000 (21:18 +0100)]
Add docs for gmail (#10995)

Fix #10971

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix release counter on API repository info (#10968)
6543 [Mon, 6 Apr 2020 18:42:30 +0000 (20:42 +0200)]
Fix release counter on API repository info (#10968)

Use the same mechanism as the webpage for calculating the release count

Fix #10946

4 years agoadd request review from specific reviewers feature in pull request (#10756)
赵智超 [Mon, 6 Apr 2020 16:33:34 +0000 (00:33 +0800)]
add request review from specific reviewers feature in pull request (#10756)

* add request review feature in pull request

add a way to notify specific reviewers to review like github , by add  or delet a  special type
review . The acton is  is similar to Assign ,  so many code reuse the function and items of
Assignee, but the meaning and result is different.

The Permission style is is similar to github, that only writer can add a review request from Reviewers,
but the poster can recall and remove a review request after a reviwer has revied even if he don't have
Write Premission. only manager , the poster and reviewer of a request review can remove it.

The reviewers can be requested to review contain all readers for private repo , for public, contain
all writers and watchers.

The offical Review Request will block merge if Reject can block it.

an other change: add ui otify for Assignees.

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Signed-off-by: a1012112796 <1012112796@qq.com>
* new change

* add placeholder string

* do some changes follow #10238 to add review requests num on lists also
change icon for review requests to eye

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoUsers should not be able to prohibit their own login (#10970)
赵智超 [Mon, 6 Apr 2020 14:23:15 +0000 (22:23 +0800)]
Users should not be able to prohibit their own login (#10970)

* ui: limit managers prohibit themself to login

Because I think it's crazy and not reasonale , that if a user can
prohibit themself to login. so suggest limit this choice on ui

Signed-off-by: a1012112796 <1012112796@qq.com>
* skip self Prohibit Login in post event handle

* fix comment

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoChange default charset for MySQL on install to utf8mb4 (#10989)
zeripath [Mon, 6 Apr 2020 13:33:15 +0000 (14:33 +0100)]
Change default charset for MySQL on install to utf8mb4 (#10989)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoMulitple Gitea Doctor improvements (#10943)
zeripath [Mon, 6 Apr 2020 10:44:47 +0000 (11:44 +0100)]
Mulitple Gitea Doctor improvements (#10943)

* Add `gitea doctor --list` flag to list the checks that will be run, including those by default
* Add `gitea doctor --run` to run specific checks
* Add `gitea doctor --all` to run all checks
* Add db version checker
* Add non-default recalculate merge bases check/fixer to doctor
* Add hook checker (Fix #9878) and ensure hooks are executable (Fix #6319)
* Fix authorized_keys checker - slight change of functionality here because parsing the command is fragile and we should just check if the authorized_keys file is essentially the same as what gitea would produce. (This is still not perfect as order matters - we should probably just md5sum the two files.)
* Add SCRIPT_TYPE check (Fix #10977)
* Add `gitea doctor --fix` to attempt to fix what is possible to easily fix
* Add `gitea doctor --log-file` to set the log-file, be it a file, stdout or to switch off completely. (Fixes previously undetected bug with certain xorm logging configurations - see @6543 comment.)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoTurn off go modules for xgo and gxz (#10963)
John Olheiser [Mon, 6 Apr 2020 04:48:55 +0000 (23:48 -0500)]
Turn off go modules for xgo and gxz (#10963)

* Turn off go modules for xgo and gxz

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add test release for PR

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Try with go modules off

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Revert Makefile, force a release test

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Turn on GOPROXY for release

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

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

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoMigrate ActivityHeatmap to Vue SFC (#10953)
Gary Kim [Mon, 6 Apr 2020 01:31:11 +0000 (09:31 +0800)]
Migrate ActivityHeatmap to Vue SFC (#10953)

* Migrate ActivityHeatmap to Vue SFC

Signed-off-by: Gary Kim <gary@garykim.dev>
* Readd vue compiler alias

Signed-off-by: Gary Kim <gary@garykim.dev>
* Remove unneeded use of v-html

Signed-off-by: Gary Kim <gary@garykim.dev>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoAllow X in addition to x in tasks (#10979) 10356/head
zeripath [Sun, 5 Apr 2020 22:39:05 +0000 (23:39 +0100)]
Allow X in addition to x in tasks (#10979)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 5 Apr 2020 17:02:59 +0000 (17:02 +0000)]
[skip ci] Updated translations via Crowdin

4 years agofix merge box icon color bug (#10974)
赵智超 [Sun, 5 Apr 2020 17:01:12 +0000 (01:01 +0800)]
fix merge box icon color bug (#10974)

that because need some space beturn ``text`` and color defines

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years agoFix cross compile (#10952)
Lunny Xiao [Sun, 5 Apr 2020 12:28:18 +0000 (20:28 +0800)]
Fix cross compile (#10952)

* Fix cross compile

* Add test for cross compile

* Fix drone

* Fix drone

* Also prevent CC environment not to generate

Co-authored-by: zeripath <art27@cantab.net>
4 years agoAdd gitea-vet (#10948)
John Olheiser [Sun, 5 Apr 2020 06:20:50 +0000 (01:20 -0500)]
Add gitea-vet (#10948)

* Add copyright

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add gitea-vet and fix non-compliance

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Combine tools.go into build.go and clean up

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove extra GO111MODULE=on

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoPrevent support libraries from compiling into Gitea (#10964)
guillep2k [Sun, 5 Apr 2020 03:35:02 +0000 (00:35 -0300)]
Prevent support libraries from compiling into Gitea (#10964)

* Prevent support libraries from compiling into Gitea

* Fix tag position

* Fix golangci-lint errors

* Refactor to make it work

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoFix scrollbar issues in dropdowns (#10897)
silverwind [Sat, 4 Apr 2020 21:29:15 +0000 (23:29 +0200)]
Fix scrollbar issues in dropdowns (#10897)

* Fix scrollbar issues in dropdowns

Fixes: https://github.com/go-gitea/gitea/pull/10835
* remove wrapping

* grammar

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdjust label padding (#10957)
mrsdizzie [Sat, 4 Apr 2020 19:39:57 +0000 (15:39 -0400)]
Adjust label padding (#10957)

* Adjust label padding

* fix less complaint

* Make top/bottom padding a bit smaller to create better label look

4 years agoAvoiding directory execution on hook (#10954) (#10955)
Vasil Mikhalenya [Sat, 4 Apr 2020 16:29:58 +0000 (19:29 +0300)]
Avoiding directory execution on hook (#10954) (#10955)

* test -x is not enough https://stackoverflow.com/a/39489087

4 years agoEnable GO111MODULE=on globally in Makefile (#10939)
mrsdizzie [Sat, 4 Apr 2020 11:41:00 +0000 (07:41 -0400)]
Enable GO111MODULE=on globally in Makefile (#10939)

Now that our minimum required go version is 1.12 we can remove code that disables GO111MODULE globally and turn it on, so each command doesn't need it set specifically.

Also fixes a small bug with make pr that didn't work because GO111MODULE=on wasn't set

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoMove gocovmerge as vendor (#10947)
Lunny Xiao [Sat, 4 Apr 2020 08:45:26 +0000 (16:45 +0800)]
Move gocovmerge as vendor (#10947)

* Move gocovmerge as vendor

* Update Makefile

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd titles and improve messages on sidebar menus (#10872)
赵智超 [Sat, 4 Apr 2020 05:39:48 +0000 (13:39 +0800)]
Add titles and improve messages on sidebar menus (#10872)

* ui: add more message on sidebar menus

* add title on the menus
* show some message instead of hide choose bar when have nothing to choose
* add simply filter for each menus
* do same changes in mew_form.tmpl
* remove some unusefull comments in mew_form.tmpl

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

* add filter message  on sidebar filter
* change IsIssueWriter to HasIssuesOrPullsWritePermission

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoRename scripts to build and add revive command as a new build tool command (#10942)
Lunny Xiao [Fri, 3 Apr 2020 19:29:12 +0000 (03:29 +0800)]
Rename scripts to build and add revive command as a new build tool command (#10942)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoUpdate docs to 1.11.4 (#10941)
techknowlogick [Fri, 3 Apr 2020 17:08:40 +0000 (13:08 -0400)]
Update docs to 1.11.4 (#10941)

4 years agoFix rebase conflict detection in git 2.26 (#10929)
zeripath [Fri, 3 Apr 2020 16:00:41 +0000 (17:00 +0100)]
Fix rebase conflict detection in git 2.26 (#10929)

* Fix rebase conflict detection in git 2.26

Git changed the technique used in rebase from
simple apply-patches to use merge. This breaks
our conflict detection code.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* As per @techknowlogick reduce copying

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoGenerate Diff and Patch direct from Pull head (#10936)
zeripath [Fri, 3 Apr 2020 13:21:41 +0000 (14:21 +0100)]
Generate Diff and Patch direct from Pull head (#10936)

* Generate Diff and Patch direct from Pull head

Fix #10932
Also fix "Empty Diff/Patch File when pull is merged"

Closes #10934

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add tests to ensure that diff does not change

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ensure diffs and pulls pages work if head branch is deleted too

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoChange review status icons on PR view style to Github style (#10737)
赵智超 [Fri, 3 Apr 2020 05:12:42 +0000 (13:12 +0800)]
Change review status icons on PR view style to Github style (#10737)

* change the icon of ApproveReview pr from "eye" to "check" like github
* change the icon of RejectReview pr from "x" to "request-change" like github
* add "-" after "{{" which need to be one line (TODO: may be not change all)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years ago[UI] language status icon size (#10749)
j.yao.SUSE [Thu, 2 Apr 2020 11:18:35 +0000 (19:18 +0800)]
[UI] language status icon size (#10749)

* language status icon size

change the repository language status icon size

* Update _base.less

* fix: eslint rule  length-zero-no-unit

* [ui] .color-icon change size ti 14px

* Update web_src/less/_base.less

* Update web_src/less/_base.less

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 1 Apr 2020 19:05:15 +0000 (19:05 +0000)]
[skip ci] Updated translations via Crowdin