]> source.dussan.org Git - gitea.git/log
gitea.git
5 years agoMove more webhook codes from models to webhook module (#8802)
Lunny Xiao [Sun, 3 Nov 2019 22:13:25 +0000 (06:13 +0800)]
Move more webhook codes from models to webhook module (#8802)

* Move more webhook codes from models to webhook module

5 years agoMove actions to notification (#8785)
Lunny Xiao [Sun, 3 Nov 2019 20:59:09 +0000 (04:59 +0800)]
Move actions to notification (#8785)

5 years agoFix API deadline removal (#8759)
David Svantesson [Sun, 3 Nov 2019 14:46:32 +0000 (15:46 +0100)]
Fix API deadline removal (#8759)

* Handle deadline is zero (to remove deadline)

* Better API documentation for issue deadline.

* Add parameter to unset due date.

* Update pull edit API comment

5 years agoFix SSH2 conditonal in key parsing code (#8806) 7349/head
mrsdizzie [Sun, 3 Nov 2019 11:08:18 +0000 (06:08 -0500)]
Fix SSH2 conditonal in key parsing code (#8806)

Avoid out of bounds error by using strings.HasPrefix to check for
starting SSH2 text rather than assuming user input has at least 31
characters.

Add tests for bad input as well.

Fixes #8800

5 years agoMove push commits events to notification (#8783)
Lunny Xiao [Sun, 3 Nov 2019 06:59:26 +0000 (14:59 +0800)]
Move push commits events to notification (#8783)

* Move push commits events to notification

* Update modules/notification/base/null.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
5 years ago[Fix] Checkbox at RepoSettings Protected Branch (#8799)
6543 [Sun, 3 Nov 2019 00:54:39 +0000 (01:54 +0100)]
[Fix] Checkbox at RepoSettings Protected Branch (#8799)

* add missing "d"

* CI.redo()

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 2 Nov 2019 22:49:35 +0000 (22:49 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoFIX download diff/patch from commit (#8792)
6543 [Sat, 2 Nov 2019 22:47:25 +0000 (23:47 +0100)]
FIX download diff/patch from commit (#8792)

* send fix

* restart CI

* us Commit only when available

* CI.redo()

* more specific if statement

Co-Authored-By: mrsdizzie <info@mrsdizzie.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 2 Nov 2019 15:29:18 +0000 (15:29 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAdd API for Issue set Subscription (#8729)
6543 [Sat, 2 Nov 2019 15:27:49 +0000 (16:27 +0100)]
Add API for Issue set Subscription (#8729)

* add issue subscriber API

* subscribers return []user.APIFormat

* add comments

* more meaningfull description

* without "reqToken()" api works ...
 * should be still secure beause ctx.user has to be there or nothing will hapen

* FIX: getIssueWatchers() get only aktive suscriber

* add return avter error on right position

* Revert "FIX: getIssueWatchers() get only aktive suscriber"

This reverts commit 5eca9291858a821981992b0aaa38cef610d84bca.

* Update routers/api/v1/repo/issue.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* test go linter again

* update swagger

* GetIssueWatchers -> GetIssueSubscribers

part one

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* GetIssueWatchers -> GetIssueSubscribers
part two

* Revert "test go linter again"

This reverts commit bab12356227e44334de113b76f12099de0b8aaa6.

* change description for unsubscribe too

* golangci-lint timeout avter 5min

* move issueSubscription to seperate file

* dont create black entitys

* use IsWatching until refactoring

* Update License Info

* better swagger description

* Update .golangci.yml

because functions moved from issue.go to issue_subscription.go

* add IssueWatchList type

* batch tasks

* use e Engien

* add error handling

* error should be the last type when returning multiple items

* short version

* reurn empy UserList instead of nil

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 2 Nov 2019 13:40:49 +0000 (13:40 +0000)]
[skip ci] Updated translations via Crowdin

5 years agofix 500 when edit hook (#8782)
Lunny Xiao [Sat, 2 Nov 2019 13:38:11 +0000 (21:38 +0800)]
fix 500 when edit hook (#8782)

5 years agoPrevent upload (overwrite) of lfs locked file (#8769)
David Svantesson [Sat, 2 Nov 2019 07:37:05 +0000 (08:37 +0100)]
Prevent upload (overwrite) of lfs locked file (#8769)

* Check if file is locked on upload file commit.

* Better user message if file is locked.

* Check lfs lock before creating temporary repository. fix some errors.

* move lines

* Add comment that enabled setting is checked.

5 years agoOn windows set core.longpaths true (#8776)
zeripath [Sat, 2 Nov 2019 05:40:49 +0000 (05:40 +0000)]
On windows set core.longpaths true (#8776)

5 years agoMove issue milestone assign to issue service and move webhook to notification (#8780)
Lunny Xiao [Sat, 2 Nov 2019 03:33:20 +0000 (11:33 +0800)]
Move issue milestone assign to issue service and move webhook to notification (#8780)

5 years agoRename HookQueue to hookQueue (#8778)
Lunny Xiao [Sat, 2 Nov 2019 02:35:12 +0000 (10:35 +0800)]
Rename HookQueue to hookQueue (#8778)

* Rename HookQueue to hookQueue

* fix lint

5 years agoMove labels webhooks to notification (#8749)
Lunny Xiao [Sat, 2 Nov 2019 01:49:57 +0000 (09:49 +0800)]
Move labels webhooks to notification (#8749)

* Move webhooks to notification

* fix notification

5 years agoProject files table style update (#8757)
May [Sat, 2 Nov 2019 00:26:21 +0000 (01:26 +0100)]
Project files table style update (#8757)

* add marking to title_wip_desc

Signed-off-by: May <themaymeow@gmail.com>
* update table styling

Signed-off-by: May <themaymeow@gmail.com>
* Update file table column width to 4:9:3

Signed-off-by: May <themaymeow@gmail.com>
5 years agoMove webhook to a standalone package under modules (#8747)
Lunny Xiao [Fri, 1 Nov 2019 22:51:22 +0000 (06:51 +0800)]
Move webhook to a standalone package under modules (#8747)

* Move webhook to a standalone package under modules

* fix test

* fix comments

5 years agoUnifies commit list in repository commit table and wiki revision page (#7907)
Mario Lubenka [Fri, 1 Nov 2019 22:02:41 +0000 (23:02 +0100)]
Unifies commit list in repository commit table and wiki revision page (#7907)

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 1 Nov 2019 18:20:30 +0000 (18:20 +0000)]
[skip ci] Updated translations via Crowdin

5 years agodoc:增加附件`ALLOWED_TYPES`取得MIME type的方法 (#8770)
cnphpbb [Fri, 1 Nov 2019 17:53:08 +0000 (01:53 +0800)]
doc:增加附件`ALLOWED_TYPES`取得MIME type的方法 (#8770)

5 years agoFix commit expand button to not go to commit link (#8745)
Lauris BH [Fri, 1 Nov 2019 04:48:30 +0000 (06:48 +0200)]
Fix commit expand button to not go to commit link (#8745)

* Fix commit expand button to not go to commit link

* Fix message rendering to have correct HTML in result

* Fix check for empty commit message

* Code optimization

5 years agoAllow to merge if file path contains " or \ (#8629)
Ilya [Fri, 1 Nov 2019 00:30:02 +0000 (03:30 +0300)]
Allow to merge if file path contains " or \ (#8629)

* if a filename in a repository contains " or \ the owner can't merge pull request with this files
because "git diff-tree" adds double quotes to that filepath
example: filepath is ab"cd but "git diff-tree" returns "ab\"cd"

now, when the owner click "Merge Pull Request" button the server returns 500
this commit fix it

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
* add -z option to getDiffTree
escape spec symbols for sparse-checkout

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
* go fmt

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
* typo

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
* escape '\'
escape all spaces and '!'

* use regexp.ReplaceAllString()

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
* strings.ReplaceAll was added in go 1.12

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
* add '\' to regexp.MustCompile

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 31 Oct 2019 18:01:29 +0000 (18:01 +0000)]
[skip ci] Updated translations via Crowdin

5 years agomark review comment as invalidated when file is deleted (#8751)
succcubbus [Thu, 31 Oct 2019 17:59:36 +0000 (18:59 +0100)]
mark review comment as invalidated when file is deleted (#8751)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 31 Oct 2019 05:12:32 +0000 (05:12 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAllow cross-repository dependencies on issues (#7901)
Brad Albright [Thu, 31 Oct 2019 05:06:10 +0000 (00:06 -0500)]
Allow cross-repository dependencies on issues (#7901)

* in progress changes for #7405, added ability to add cross-repo dependencies

* removed unused repolink var

* fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes

* reverted removal of string in local files becasue these are done via crowdin, not updated manually

* removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review

* changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result

* simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository

* made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line)

* replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard

* some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies

* added Name to the RepositoryMeta struct

* updated swagger doc

* fixed total count for link header on SearchIssues

* fixed indentation

* fixed aligment of remove icon on dependencies in issue sidebar

* removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block)

* reverting .css change, somehow missed or forgot that less is used

* updated less file and generated css; updated sidebar template with styles to line up delete and issue index

* added ordering to the blocked by/depends on queries

* fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository)

* re-applied my swagger changes after merge

* fixed split string condition in issue search

* changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter

* when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled

* updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here

* fixed incorrect setting of user id parameter in search repos call

5 years agoRewrite markdown rendering to blackfriday v2 and rewrite orgmode rendering to go...
Lauris BH [Thu, 31 Oct 2019 01:06:25 +0000 (03:06 +0200)]
Rewrite markdown rendering to blackfriday v2 and rewrite orgmode rendering to go-org (#8560)

* Rewrite markdown rendering to blackfriday v2.0

* Fix style

* Fix go mod with golang 1.13

* Fix blackfriday v2 import

* Inital orgmode renderer migration to go-org

* Vendor go-org dependency

* Ignore errors :/

* Update go-org to latest version

* Update test

* Fix go-org test

* Remove unneeded code

* Fix comments

* Fix markdown test

* Fix blackfriday regression rendering HTML block

5 years agoChangelog 1.9.5 (#8753) (#8756) (#8758)
John Olheiser [Wed, 30 Oct 2019 21:22:20 +0000 (16:22 -0500)]
Changelog 1.9.5 (#8753) (#8756) (#8758)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 30 Oct 2019 20:34:47 +0000 (20:34 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoMove pull list code to a seperate file (#8748)
Lunny Xiao [Wed, 30 Oct 2019 20:33:10 +0000 (04:33 +0800)]
Move pull list code to a seperate file (#8748)

5 years agoChangelog 1.10.0-rc2 (#8750) (#8754)
John Olheiser [Wed, 30 Oct 2019 19:22:13 +0000 (14:22 -0500)]
Changelog 1.10.0-rc2 (#8750) (#8754)

* 1.10.0-rc2

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-Authored-By: jaqra <48099350+jaqra@users.noreply.github.com>
5 years agoAdjust the must-change-password help (#8755)
zeripath [Wed, 30 Oct 2019 18:28:14 +0000 (18:28 +0000)]
Adjust the must-change-password help (#8755)

5 years agoUpdate licenses (#8752)
zeripath [Wed, 30 Oct 2019 16:19:14 +0000 (16:19 +0000)]
Update licenses (#8752)

Replaces #8182

5 years agoadd __debug_bin file to gitignore (#8740)
jaqra [Wed, 30 Oct 2019 14:39:35 +0000 (17:39 +0300)]
add __debug_bin file to gitignore (#8740)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 30 Oct 2019 12:45:34 +0000 (12:45 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoConfigurable close and reopen keywords for PRs (#8120)
guillep2k [Wed, 30 Oct 2019 12:43:59 +0000 (09:43 -0300)]
Configurable close and reopen keywords for PRs (#8120)

* Add settings for CloseKeywords and ReopenKeywords

* Fix and improve tests

* Use sync.Once() for initialization

* Fix unintended exported function

5 years agoMove webhook codes from service to webhook notification (#8712)
Lunny Xiao [Wed, 30 Oct 2019 10:02:46 +0000 (18:02 +0800)]
Move webhook codes from service to webhook notification (#8712)

* Move webhook codes from service to webhook notification

* move deletecomment webhook to notifications

* fix notification

5 years agoMove issue change content from models to service (#8711)
Lunny Xiao [Wed, 30 Oct 2019 08:36:25 +0000 (16:36 +0800)]
Move issue change content from models to service (#8711)

* Move issue change content from models to service

* fix lint

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 30 Oct 2019 06:01:01 +0000 (06:01 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoCreate PR on Current Repository by Default (#8670)
Benno [Wed, 30 Oct 2019 05:58:18 +0000 (13:58 +0800)]
Create PR on Current Repository by Default (#8670)

* 'update'

* Send push tag event when release created

* send tag create event while release created in UI

* update to go v1.13

* fix gofmt error

* fix #8576 create pull request on current repository by default

5 years agoRespect LFS File Lock on UI (#8719)
Benno [Tue, 29 Oct 2019 21:32:21 +0000 (05:32 +0800)]
Respect LFS File Lock on UI (#8719)

* update #8687 respect file locking

* upate #8687 Add LFS locker information

* update #8719 enhance coding style and return error

5 years agoapply exclude label on milestone issue list (#8739)
jaqra [Tue, 29 Oct 2019 20:50:38 +0000 (23:50 +0300)]
apply exclude label on milestone issue list (#8739)

* apply exclude label on milestone issue list

* remove __debug.bin file

5 years agoShow zero lines on the line counter if the file empty (#8700)
Lukas [Tue, 29 Oct 2019 16:05:26 +0000 (17:05 +0100)]
Show zero lines on the line counter if the file empty (#8700)

* Show zero lines on the line counter if the file empty

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
* A single variable to check whether NumLines is set

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 29 Oct 2019 14:49:58 +0000 (14:49 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoadd marking to title_wip_desc (#8705)
May [Tue, 29 Oct 2019 14:29:39 +0000 (15:29 +0100)]
add marking to title_wip_desc (#8705)

Signed-off-by: May <themaymeow@gmail.com>
5 years ago[Fix] milestone close timestamp (#8728)
6543 [Tue, 29 Oct 2019 02:35:50 +0000 (03:35 +0100)]
[Fix] milestone close timestamp (#8728)

* BugFix: Update closed_date_unix colum on milestone table on close

* go fmt

5 years agoMake 100% width search bar (#8710)
jaqra [Tue, 29 Oct 2019 00:19:18 +0000 (03:19 +0300)]
Make 100% width search bar (#8710)

* Make 100% width search bar

* Use flex: auto instead of flex: 1

5 years agoAdd notice to docs for migrating from more recent versions of Gogs (#8724)
kolaente [Mon, 28 Oct 2019 22:37:29 +0000 (23:37 +0100)]
Add notice to docs for migrating from more recent versions of Gogs (#8724)

Signed-off-by: kolaente <k@knt.li>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 28 Oct 2019 19:31:28 +0000 (19:31 +0000)]
[skip ci] Updated translations via Crowdin

5 years ago[Docs] add explicit info about customization of homepage (#8694)
6543 [Mon, 28 Oct 2019 19:11:02 +0000 (20:11 +0100)]
[Docs] add explicit info about customization of homepage (#8694)

* first draft

* Update docs/content/doc/advanced/customizing-gitea.en-us.md

Co-Authored-By: zeripath <art27@cantab.net>
* add notice to restart

5 years agoAdd basic repository lfs management (#7199)
zeripath [Mon, 28 Oct 2019 18:31:55 +0000 (18:31 +0000)]
Add basic repository lfs management (#7199)

This PR adds basic repository LFS management UI including the ability to find all possible pointers within the repository. Locks are not managed at present but would be addable through some simple additions.

* Add basic repository lfs management
* add auto-associate function
* Add functionality to find commits with this lfs file
* Add link to find commits on the lfs file view
* Adjust commit view to state the likely branch causing the commit
* Only read Oid from database

5 years agoMove issue notifications (#8713)
Lunny Xiao [Mon, 28 Oct 2019 16:45:43 +0000 (00:45 +0800)]
Move issue notifications (#8713)

5 years agoupdate color theme for heatmap (#8709)
May [Mon, 28 Oct 2019 06:47:54 +0000 (07:47 +0100)]
update color theme for heatmap (#8709)

Signed-off-by: May <themaymeow@gmail.com>
5 years agoMove issue change status from models to service (#8691)
Lunny Xiao [Mon, 28 Oct 2019 05:26:46 +0000 (13:26 +0800)]
Move issue change status from models to service (#8691)

5 years agoMove more issue assignee code from models to issue service (#8690)
Lunny Xiao [Mon, 28 Oct 2019 02:11:50 +0000 (10:11 +0800)]
Move more issue assignee code from models to issue service (#8690)

* Move more issue assignee code from models to issue service

* fix test

5 years agoFix deadline on update issue or PR via API (#8696)
David Svantesson [Sun, 27 Oct 2019 23:35:20 +0000 (00:35 +0100)]
Fix deadline on update issue or PR via API (#8696)

* Fix deadline on update issue or PR via API

* variable initialized directly (review comment)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 27 Oct 2019 20:48:38 +0000 (20:48 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAdd myself as maintainer (#8708)
jaqra [Sun, 27 Oct 2019 20:45:21 +0000 (23:45 +0300)]
Add myself as maintainer (#8708)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 26 Oct 2019 06:56:48 +0000 (06:56 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoMove some repositories' operations to a standalone service package (#8557)
Lunny Xiao [Sat, 26 Oct 2019 06:54:11 +0000 (14:54 +0800)]
Move some repositories' operations to a standalone service package (#8557)

* Move some repositories' operations to a standalone service package

* improve code

* remove unused codes

* add rollback when fork failed

* add repo when return

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 26 Oct 2019 00:45:54 +0000 (00:45 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoImprove visibility of "Pending" indicator (#8685)
guillep2k [Sat, 26 Oct 2019 00:43:38 +0000 (21:43 -0300)]
Improve visibility of "Pending" indicator (#8685)

* Improve visibility of "Pending" indicator

* Use background-color instead of just background

* Tone down the yellow

5 years agoMail assignee when issue/pull request is assigned (#8546)
David Svantesson [Fri, 25 Oct 2019 14:46:37 +0000 (16:46 +0200)]
Mail assignee when issue/pull request is assigned (#8546)

* Send email to assigned user

* Only send mail if enabled

* Mail also when assigned through API

* Need to refactor functions from models to issue service

* Refer to issue index rather than ID

* Disable email notifications completly at initalization if global disable

* Check of user enbled mail shall be in mail notification function only

* Initialize notifications from routers init function.

* Use the assigned comment when sending assigned mail

* Refactor so that assignees always added as separate step when new issue/pr.

* Check error from AddAssignees

* Check if user can be assiged to issue or pull request

* Missing return

* Refactor of CanBeAssigned check.

CanBeAssigned shall have same check as UI.

* Clarify function names (toggle rather than update/change), and clean up.

* Fix review comments.

* Flash error if assignees was not added when creating issue/pr

* Generate error if assignee users doesn't exist

5 years agoPrevent chrome download page with alt + click (#8669)
jaqra [Fri, 25 Oct 2019 11:06:03 +0000 (14:06 +0300)]
Prevent chrome download page with alt + click (#8669)

5 years agoChange external asciidoctor tool to embeded mode (#8677)
Chris Sexton [Fri, 25 Oct 2019 10:11:14 +0000 (06:11 -0400)]
Change external asciidoctor tool to embeded mode (#8677)

Ref #8676

* add the `-e` flag for embedded mode
* add a level offset to include the title of the document

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 25 Oct 2019 07:23:33 +0000 (07:23 +0000)]
[skip ci] Updated translations via Crowdin

5 years agomake call createMilestoneComment on newIssue func (#8678)
jaqra [Fri, 25 Oct 2019 07:19:04 +0000 (10:19 +0300)]
make call createMilestoneComment on newIssue func (#8678)

* make call createMilestoneComment on newIssue func

* make OldMilestoneID 0 instead of -1

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 24 Oct 2019 21:14:00 +0000 (21:14 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoRevert "API should follow RequireSignInView (#8654)" (#8675)
Lunny Xiao [Thu, 24 Oct 2019 21:10:48 +0000 (05:10 +0800)]
Revert "API should follow RequireSignInView (#8654)" (#8675)

This reverts commit 3c63c3ace4bff1e0e796759a4676fcfff3c5c872.

5 years agoAPI should follow RequireSignInView (#8654)
Lunny Xiao [Thu, 24 Oct 2019 05:32:40 +0000 (13:32 +0800)]
API should follow RequireSignInView (#8654)

5 years agoHide some user information via API if user have no enough permission (#8655)
Lunny Xiao [Thu, 24 Oct 2019 02:52:17 +0000 (10:52 +0800)]
Hide some user information via API if user have no enough permission (#8655)

* Hide some user information via API if user have no enough permission

* fix test

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 24 Oct 2019 01:20:30 +0000 (01:20 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoFix 500 when getting user as unauthenticated user (#8653)
Monty Taylor [Thu, 24 Oct 2019 01:18:41 +0000 (10:18 +0900)]
Fix 500 when getting user as unauthenticated user (#8653)

When doing GET /api/v1/users/{user} as an unauthenticated user,
gitea throws a 500 because it's trying to dereference elements
from the context user. It wants to do this to see whether to
show the primary email and will do that if the logged in user
is admin or the user in question. However, if ctx.User is nil,
go gets really unhappy.

5 years agoUse AppSubUrl for more redirections (#8647)
zeripath [Wed, 23 Oct 2019 21:04:22 +0000 (22:04 +0100)]
Use AppSubUrl for more redirections (#8647)

Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template
Fixes /explore and organisation redirection

5 years agoMake /users/{username}/repos list private repos the current user has access to (...
7FM [Wed, 23 Oct 2019 18:46:32 +0000 (20:46 +0200)]
Make /users/{username}/repos list private repos the current user has access to (#8621)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 23 Oct 2019 17:58:51 +0000 (17:58 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoImprove OGP (#8637)
John Olheiser [Wed, 23 Oct 2019 17:54:13 +0000 (12:54 -0500)]
Improve OGP (#8637)

* Improve OGP
* Ensure Repo is loaded when checking Pull info

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years agoAdd 'Alt + click' feature to exclude labels (#8199)
jaqra [Wed, 23 Oct 2019 16:29:14 +0000 (19:29 +0300)]
Add 'Alt + click' feature to exclude labels (#8199)

Add 'Alt + click' and 'Alt +enter' feature to exclude particular labels on searching for issues.

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 23 Oct 2019 15:37:47 +0000 (15:37 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoGraceful fixes (#8645)
zeripath [Wed, 23 Oct 2019 15:32:19 +0000 (16:32 +0100)]
Graceful fixes (#8645)

* Only attempt to kill parent once

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add waitgroup for running servers

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 23 Oct 2019 14:39:37 +0000 (14:39 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoDocs: Added instructions for Docker fail2ban configuration. (#8642)
Nathaniel Sabanski [Wed, 23 Oct 2019 14:07:32 +0000 (07:07 -0700)]
Docs: Added instructions for Docker fail2ban configuration. (#8642)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 23 Oct 2019 11:51:49 +0000 (11:51 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoFix extra columns from `label` table (#8633)
guillep2k [Wed, 23 Oct 2019 11:48:32 +0000 (08:48 -0300)]
Fix extra columns from `label` table (#8633)

* Fix extra fields from database

* Add migration to drop unneeded columns

* Fix lint

* Make sure the columns exist

5 years agoEnabling and disabling the commit button to prevent empty commits (web editor) (...
Lukas [Wed, 23 Oct 2019 00:29:33 +0000 (02:29 +0200)]
Enabling and disabling the commit button to prevent empty commits (web editor) (#8590)

* Enabling and disabling the commit button to prevent empty commits

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
* The button won't get enabled if you change the commit message

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
* Fixes a spelling mistake for 'silent'

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
5 years agoAdd SubURL to redirect path (#8632)
John Olheiser [Tue, 22 Oct 2019 18:50:24 +0000 (13:50 -0500)]
Add SubURL to redirect path (#8632)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 22 Oct 2019 12:39:06 +0000 (12:39 +0000)]
[skip ci] Updated translations via Crowdin

5 years ago[assets] configurable URL for static resources (#7911)
Jakob Ackermann [Tue, 22 Oct 2019 12:11:01 +0000 (14:11 +0200)]
[assets] configurable URL for static resources (#7911)

* static url

* add cors support for static resources

* [assets] work on the migration to configurable url for assets

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [misc] fix whitespace

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [assets] fix the loading of the manifest.json

It is generated dynamically, and as such can not be served by the cdn.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* Revert "add cors support for static resources"

This reverts commit 42f964fd181dbb8b139808b9be623470d4f0e40f

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [docs] add the STATIC_URL_PREFIX option

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [docs] reverse-proxy: nginx: add two setups for STATIC_URL_PREFIX

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [assets] migrate the url of a new asset to the static url prefix

REF: f2a3abc683ad4b2177b7c7c6160a2c0b4316120a
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
5 years agoCorrect some outdated statements in the contributing guidelines (#8612)
Lukas [Mon, 21 Oct 2019 23:45:53 +0000 (01:45 +0200)]
Correct some outdated statements in the contributing guidelines (#8612)

* More information for drone-cli in CONTRIBUTING.md

* Increases the version of drone-cli to 1.2.0
* Adds a note for the Docker Toolbox on Windows

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
* Fix the url for the blog repository (now on gitea.com)

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
5 years agoPrevent .code-view from overriding font on icon fonts (#8614)
zeripath [Mon, 21 Oct 2019 22:23:35 +0000 (23:23 +0100)]
Prevent .code-view from overriding font on icon fonts (#8614)

5 years agoExpose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (#8528)
zeripath [Mon, 21 Oct 2019 21:20:47 +0000 (22:20 +0100)]
Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (#8528)

* Expose db.SetMaxOpenConns and allow other dbs to set their connection params
* Add note about port exhaustion

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 21 Oct 2019 20:22:31 +0000 (20:22 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoUpdate heatmap fixtures to restore tests (#8615)
zeripath [Mon, 21 Oct 2019 20:19:53 +0000 (21:19 +0100)]
Update heatmap fixtures to restore tests (#8615)

* Update heatmap fixtures to restore tests
* Add hint to check the fixture age on fail

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 21 Oct 2019 13:41:05 +0000 (13:41 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAdd id references on all events to allow linking to it (#8608)
David Svantesson [Mon, 21 Oct 2019 13:36:09 +0000 (15:36 +0200)]
Add id references on all events to allow linking to it (#8608)

5 years agofix emoji panel be removed bug in issue page, when the sub issue summit the duplicate...
yan [Mon, 21 Oct 2019 11:02:51 +0000 (19:02 +0800)]
fix emoji panel be removed bug in issue page, when the sub issue summit the duplicate emoji (#8609)

5 years agoAllow Protected Branches to Whitelist Deploy Keys (#8483)
zeripath [Mon, 21 Oct 2019 08:21:45 +0000 (09:21 +0100)]
Allow Protected Branches to Whitelist Deploy Keys (#8483)

Add an option to protected branches to add writing deploy keys to the whitelist for pushing.

Please note this is technically a breaking change: previously if the owner of a repository was on the whitelist then any writing deploy key was effectively on the whitelist. This option will now need to be set if that is desired.

Closes #8472

Details:
* Allow Protected Branches to Whitelist Deploy Keys
* Add migration
* Ensure that IsDeployKey is set to false on the http pushes
* add not null default false

5 years agoEnsure that diff stats can scroll independently of the diff (#8581)
6543 [Mon, 21 Oct 2019 07:51:24 +0000 (09:51 +0200)]
Ensure that diff stats can scroll independently of the diff (#8581)

This PR ensures that once opened the diff stats detail box can be scrolled independently of the diff on the compare page.

Fixes #5532

Details:

* make diff-detail-box the main container
* move file diff at the same level as diff-stats
* make diff-view options sticy again
* make diff-stats scroll if to mouch
* rm useless css info
* less: mv diff-stats to own class
* use new css class
* cleanup less file
* diff-counter: margin-right: 15px;
* make CI work
* make numbers colorful
* add sign (-/+) to numbers