]> source.dussan.org Git - gitea.git/log
gitea.git
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 12 Nov 2019 22:51:56 +0000 (22:51 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUpdate Github Migration Tests (#8938)
mrsdizzie [Tue, 12 Nov 2019 22:48:21 +0000 (17:48 -0500)]
Update Github Migration Tests (#8938)

Update all Github migration tests to use a new repo created just for
these tests that won't accidentially be modified by regular users
interacting with issues.

Fixes #8895

4 years agoFix spelling as suggested by @rmbleeker (#8934)
guillep2k [Tue, 12 Nov 2019 15:47:29 +0000 (12:47 -0300)]
Fix spelling as suggested by @rmbleeker (#8934)

4 years agoMove less from public/ to web_src/ so that it will not be packe… (#8908)
Lunny Xiao [Tue, 12 Nov 2019 09:22:16 +0000 (17:22 +0800)]
Move less from public/ to web_src/ so that it will not be packe… (#8908)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 12 Nov 2019 08:36:01 +0000 (08:36 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoImprove notification (#8835)
Lunny Xiao [Tue, 12 Nov 2019 08:33:34 +0000 (16:33 +0800)]
Improve notification (#8835)

* Improve notifications

* batch load user

* Update notification only when read

* Fix reorder

* fix lint

* fix test

* fix lint

* make function meaningful

* fix comment

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 Nov 2019 17:09:24 +0000 (17:09 +0000)]
[skip ci] Updated translations via Crowdin

4 years agojs: Revert change to click behaviour in forceSelection (#8921)
Jookia [Mon, 11 Nov 2019 17:06:57 +0000 (17:06 +0000)]
js: Revert change to click behaviour in forceSelection (#8921)

Calling .click() in forceSelection() in blur() causes a focus loop,
this needs a proper fix later but for now just revert the change.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 Nov 2019 15:19:00 +0000 (15:19 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoTemplate Repositories (#8768)
John Olheiser [Mon, 11 Nov 2019 15:15:29 +0000 (09:15 -0600)]
Template Repositories (#8768)

* Start work on templates

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

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

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

* Tabs vs Spaces

* Add templates to API & start adding tests

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove unused User

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move template tests to existing repos

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Minor re-check updates and cleanup

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

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

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

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Test fixes and icon change

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add new user and repo for tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix tests (finally)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update meta repo with env variables

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move generation to create page

Combine with repo create template
Modify API search to prioritize owner for repo

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

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix API searching for own private repos

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix repo search test. User had a private repo that didn't show up

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Another search test fix

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Clarify git content

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Feedback updates

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add topics WIP

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Finish adding topics

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoMigrate temp_repo.go to use git.NewCommand (#8918)
zeripath [Mon, 11 Nov 2019 11:46:28 +0000 (11:46 +0000)]
Migrate temp_repo.go to use git.NewCommand  (#8918)

This PR migrates temp_repo.go to use git.NewCommand instead creating processes by itself - this fixes the problem underlying PR #8905.

There are other places that run git outside of the controlled locale defined in #8548 but temp_repo.go is the only cause of failure of local testing in cases where English is not the default - implying that error messages from those other commands are not interpreted.

Replaces #8905

4 years agoOnly view branch or tag if it match refType requested. (#8899)
David Svantesson [Mon, 11 Nov 2019 07:37:28 +0000 (08:37 +0100)]
Only view branch or tag if it match refType requested. (#8899)

* only view branch or tag if it match refName.

* remove pointer in method

4 years agoMove notifywatchers from models to notification (#8907)
Lunny Xiao [Mon, 11 Nov 2019 03:39:41 +0000 (11:39 +0800)]
Move notifywatchers from models to notification (#8907)

4 years agoFix typo in doc (#8914)
Florian Hübner [Mon, 11 Nov 2019 01:33:28 +0000 (02:33 +0100)]
Fix typo in doc (#8914)

Fix typo in doc fail2ban-setup.md

4 years agoStop using git count-objects and use raw directory size for repository (#8848)
zeripath [Sun, 10 Nov 2019 21:33:47 +0000 (21:33 +0000)]
Stop using git count-objects and use raw directory size for repository (#8848)

* Migrate from git count-objects to a raw directory size
* As per @guillep2k ignore unusual files

4 years agoRephrase comment about RuntimeDirectory option (#8912)
Anthony Vanelverdinghe [Sun, 10 Nov 2019 16:49:39 +0000 (17:49 +0100)]
Rephrase comment about RuntimeDirectory option (#8912)

4 years agoAuto-subscribe user to repository when they commit/tag to it (#7657)
guillep2k [Sun, 10 Nov 2019 09:22:19 +0000 (06:22 -0300)]
Auto-subscribe user to repository when they commit/tag to it (#7657)

* Add support for AUTO_WATCH_ON_CHANGES and AUTO_WATCH_ON_CLONE

* Update models/repo_watch.go

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Round up changes suggested by lafriks

* Added changes suggested from automated tests

* Updated deleteUser to take RepoWatchModeDont into account, corrected inverted DefaultWatchOnClone and DefaultWatchOnChanges behaviour, updated and added tests.

* Reinsert import "github.com/Unknwon/com" on http.go

* Add migration for new column `watch`.`mode`

* Remove serv code

* Remove WATCH_ON_CLONE; use hooks, add integrations

* Renamed watch_test.go to repo_watch_test.go

* Correct fmt

* Add missing EOL

* Correct name of test function

* Reword cheat and ini descriptions

* Add update to migration to ensure column value

* Clarify comment

Co-Authored-By: zeripath <art27@cantab.net>
* Simplify if condition

4 years agoAdjust error reporting from merge failures and use LC_ALL=C for git (#8548)
zeripath [Sun, 10 Nov 2019 08:42:51 +0000 (08:42 +0000)]
Adjust error reporting from merge failures and use LC_ALL=C for git (#8548)

There are two major components to this PR:

* This PR handles merge and rebase failures from merging a little more nicely with Flash errors rather a 500.
* All git commands are run in the LC_ALL="C" environment to ensure that error messages are in English. This DefaultLocale is defined in a way that if necessary (due to platform weirdness) it can be overridden at build time using LDFLAGS="-X "code.gitea.io/gitea/modules/git.DefaultLocale=C"" with C changed for the locale as necessary.

4 years agoFix API Bug (fail on empty assignees) (#8873)
6543 [Sun, 10 Nov 2019 08:07:21 +0000 (09:07 +0100)]
Fix API Bug (fail on empty assignees) (#8873)

* keep sure if assigneeIDs == nil -> do nothing

* fix #8872

* Revert "keep sure if assigneeIDs == nil -> do nothing"

-> go handle it itself preaty well

This reverts commit e72d94129c4666d5151f6131cb2f8c1de127d9d0.

* clarity comparson

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* simplify

* Update models/issue_assignees.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update issue_assignees.go

* simplify more

* add --if oneAssignee != ""-- again

* Update models/issue_assignees.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* CI.restart()

* Update issue_assignees.go

* add Test for GetUserIDsByNames

* add Test for MakeIDsFromAPIAssigneesToAdd

* fix test

4 years agoMove code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/conver...
Lunny Xiao [Sun, 10 Nov 2019 04:41:51 +0000 (12:41 +0800)]
Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert (#8892)

* Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert

* fix fmt

4 years agoFix issue with user.fullname (#8902)
zeripath [Sat, 9 Nov 2019 23:21:53 +0000 (23:21 +0000)]
Fix issue with user.fullname (#8902)

4 years agoEnable punctuations ending mentions (#8889)
guillep2k [Sat, 9 Nov 2019 22:12:05 +0000 (19:12 -0300)]
Enable punctuations ending mentions (#8889)

* Enable punctuations ending mentions

* Improve tests

4 years agoUpdate Github migration test (#8893)
mrsdizzie [Sat, 9 Nov 2019 20:13:35 +0000 (15:13 -0500)]
Update Github migration test (#8893)

* Update Github migration test

Earlier today #716 was reopened which updated the modification time for
an old milestone (1.6.0) that we use in testing with the assumption that
it is old and won't change. This breaks all builds now, so remove this
test since we have others that test the same code and this milestone
will likely be updated again as that issue changes etc...

* ci

4 years agoLeave non-dated issues for last (#8871)
guillep2k [Sat, 9 Nov 2019 13:09:01 +0000 (10:09 -0300)]
Leave non-dated issues for last (#8871)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 9 Nov 2019 09:45:09 +0000 (09:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix require external registration password (#8885)
guillep2k [Sat, 9 Nov 2019 09:42:34 +0000 (06:42 -0300)]
Fix require external registration password (#8885)

* Fix require external registration password

* Fix ctx on error condition by @jolheiser

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 9 Nov 2019 03:44:04 +0000 (03:44 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix password complexity check on registration (#8887)
guillep2k [Sat, 9 Nov 2019 03:40:37 +0000 (00:40 -0300)]
Fix password complexity check on registration (#8887)

* Fix registration password complexity

* Fix integration to use a complex password ;)

4 years agoAllow to add and remove all repositories to/from team. (#8867)
David Svantesson [Sat, 9 Nov 2019 00:39:37 +0000 (01:39 +0100)]
Allow to add and remove all repositories to/from team. (#8867)

* Allow to add and remove all repositories to team.

* Change style, buttons on same row.

* Apply suggestions from code review

Grammar

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Move set num repos to lower function.

* Make general language sentences

4 years agoCreate third-party-tools.zh-cn.md (#6303)
MysticBoy [Fri, 8 Nov 2019 22:32:30 +0000 (06:32 +0800)]
Create third-party-tools.zh-cn.md (#6303)

* Create third-party-tools.zh-cn.md

* Update third-party-tools.zh-cn.md

* Update third-party-tools.zh-cn.md

4 years agoFix bug when migrate from API (#8631)
Lunny Xiao [Fri, 8 Nov 2019 22:21:00 +0000 (06:21 +0800)]
Fix bug when migrate from API (#8631)

* fix bug when migrate from API

* fix test

* fix test

* improve

* fix error message

4 years agoWebhook support custom proxy (#8760)
Lunny Xiao [Fri, 8 Nov 2019 21:25:53 +0000 (05:25 +0800)]
Webhook support custom proxy (#8760)

* Webhook support custom proxy

* Add glob support on webhook proxy host rules

* fix app.ini.sample

* improve code and app.ini.sample

* update cheetsheet about added webhook options

4 years agoMove some actions to notification/action (#8779)
Lunny Xiao [Fri, 8 Nov 2019 20:54:50 +0000 (04:54 +0800)]
Move some actions to notification/action (#8779)

* Move some actions to notification/action

* Fix test

* fix test

4 years agoAdd password reset to FAQ (#8883)
John Olheiser [Fri, 8 Nov 2019 19:44:18 +0000 (13:44 -0600)]
Add password reset to FAQ (#8883)

* Add password reset to FAQ

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add links to email setup docs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add en-us to email setup

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update docs/content/doc/help/faq.en-us.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Manually merge changes from @guillep2k and add small changes

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoa11y: Improve accessibility of dropdown menus (#8638)
Jookia [Fri, 8 Nov 2019 17:33:21 +0000 (17:33 +0000)]
a11y: Improve accessibility of dropdown menus (#8638)

* js: Import Semantic-UI's dropdown.js (version 2.3.1)

* js: Set tabindex=-1 on dropdown items

Setting tabindex=-1 on focusable elements within dropdown menus allows
the user to treat dropdown menus as a single focusable item with its own
internal navigation using arrow keys.

* js: Don't use jQuery to click menu items

Menu items are often <a> elements, which jQuery refuses to trigger click
events on. Instead it just bubbles up to the menu.

Using HTMLElement's click method fixes this and makes menu items
clickable from the keyboard using dropdown menus.

* js: Set correct ARIA 1.1 roles on dropdown menus

Setting role= makes assistive technology aware there is a widget here.
In this case, Orca will now exit browse mode and allow us to capture
keydown events when focused on a dropdown menu. It will also inform the
user that there's a menu focused.

Since dropdowns can be used in multiple elements each with different
ARIA roles, a guessRole method is used to find the correct role.
All roles I consider possible are listed, but only menu is implemented.

* js: Set aria-expanded when dropdown menus show and hide

This is deliberately done before the transition finishes so that screen
readers get immediate feedback.

* js: Set aria-label or aria-labelledby on dropdown menus

This makes dropdown menu buttons screen reader accessible.

aria-labelledby refers to an element using an ID, so the chosen labels
are now assigned a unique ID- This ID is not stable, do not refer to it
with user scripts.

* js: Set aria-activedescendant on dropdown menus

As the menus grab focus and navigate by tracking a 'selected' div class,
assistive technology has no idea that what the current selection is.

Assign IDs to each menu item and set aria-activedescendant to the ID of
the currently selected menu item.

When the menu is unfocused, remove aria-activedescendant- This isn't
neccessary but in my experience it triggers Orca to remind the user of
their current selection when re-focusing the menu.

* Makefile: Make eslint ignore semantic.dropdown.js

This file is taken from Semantic UI which isn't linted upstream.
Ignore it as we won't fix these issues.

* js: Add version note to semantic.dropdown.js

* Add Md5 AppVer to templates/base/footer.tmpl

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add Md5 AppVer to templates/pwa/serviceworker_js.tmpl

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* semantic.dropdown.js -> semantic.dropdown.custom.js

* Use eslintignore

* remove bogus submodule

4 years agoFix edit content button on migrated issue content (#8877)
mrsdizzie [Fri, 8 Nov 2019 07:01:24 +0000 (02:01 -0500)]
Fix edit content button on migrated issue content (#8877)

Typo on a closing span tag caused edit button not to work properly on
the original issue content for a migrated issue.

Fixes #8876

4 years agoShow due date in dashboard issues list (#8860)
mrsdizzie [Thu, 7 Nov 2019 20:12:23 +0000 (15:12 -0500)]
Show due date in dashboard issues list (#8860)

* Show due date in dashboard issues list

Include due date when vieiwiing all issues on dashboard (matching what
we show for repo issue lists).

Fixes #8859

* Put in same order as repo issue list

* Add suggested changes and also update repo issue list to match

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 7 Nov 2019 18:33:04 +0000 (18:33 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix count for commit graph last page (#8843)
jaqra [Thu, 7 Nov 2019 18:09:51 +0000 (21:09 +0300)]
Fix count for commit graph last page (#8843)

* Fix count for commit graph last page

* Remove used once variable

* Move func to model

* capitalize method name

* fix error message

4 years agoUse templates for issue e-mail subject and body (#8329)
guillep2k [Thu, 7 Nov 2019 13:34:28 +0000 (10:34 -0300)]
Use templates for issue e-mail subject and body (#8329)

* Add template capability for issue mail subject

* Remove test string

* Fix trim subject length

* Add comment to template and run make fmt

* Add information for the template

* Rename defaultMailSubject() to fallbackMailSubject()

* General rewrite of the mail template code

* Fix .Doer name

* Use text/template for subject instead of html

* Fix subject Re: prefix

* Fix mail tests

* Fix static templates

* [skip ci] Updated translations via Crowdin

* 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>
* Prevent .code-view from overriding font on icon fonts (#8614)

* 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>
* Remove TrN due to lack of lang context

* Redo templates to match previous code

* Fix extra character in template

* Unify PR & Issue tempaltes, fix format

* Remove default subject

* Add template tests

* Fix template

* Remove replaced function

* Provide User as models.User for better consistency

* Add docs

* Fix doc inaccuracies, improve examples

* Change mail footer to math AppName

* Add test for mail subject/body template separation

* Add support for code review comments

* Update docs/content/doc/advanced/mail-templates-us.md

Co-Authored-By: 6543 <24977596+6543@users.noreply.github.com>
4 years agoTheme arc-green: reverse heatmap colors (#8840)
Damien Pollet [Wed, 6 Nov 2019 17:23:06 +0000 (18:23 +0100)]
Theme arc-green: reverse heatmap colors (#8840)

* Theme arc-green: reverse heatmap colors

This uses the same colors as the updated palette in the base theme.

See #8709 and #5864, in particular [my comment showing the problem](https://github.com/go-gitea/gitea/issues/5864#issuecomment-462334171)

* Rebuild CSS

* Use link color as hot, interpolate between hot and cold colors

* Use color from a:hover

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 6 Nov 2019 13:42:48 +0000 (13:42 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoSplit sendCreateCommentAction as two parts, one for update comment related informatio...
Lunny Xiao [Wed, 6 Nov 2019 13:39:29 +0000 (21:39 +0800)]
Split sendCreateCommentAction as two parts, one for update comment related informations, another for actions (#8784)

* Split sendCreateCommentAction as two parts, one for update comment related informations, another for actions

* fix lint

4 years agoAdd team option to grant rights for all organization repositories (#8688)
David Svantesson [Wed, 6 Nov 2019 09:37:14 +0000 (10:37 +0100)]
Add team option to grant rights for all organization repositories (#8688)

* Add field IsAllRepositories to team

* Add AllRepositories to team UI

* Manage team with access to all repositories

* Add field IsAllRepositories to team API

* put backticks around table/column names

* rename IsAllRepositories to IncludesAllRepositories

* do not reload slice if already loaded

* add repo to teams with access to all repositories when changing repo owner

* improve tests for teams with access to all repositories

* Merge branch 'master'

* Change code for adding all repositories

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* fmt after merge

* Change code in API EditTeam similar to EditTeamPost web interface

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Clarify that all repositories will be added

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* All repositories option under Permissions headline

* New setting group 'Repository access'

* Move check IncludeAllRepositories to removeRepository.

* Revert "Move check IncludeAllRepositories to removeRepository." and add comment instead.

This reverts commit 753b7d205be260b8be465b5291a02975a81f3093.

* Clarify help text what options do.

4 years agoMove release webhook to notification (#8817)
Lunny Xiao [Wed, 6 Nov 2019 08:25:50 +0000 (16:25 +0800)]
Move release webhook to notification (#8817)

* Move release webhook to notification

* Extract release webhook method

* fix bug

* fix import

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 6 Nov 2019 06:44:54 +0000 (06:44 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMove repofiles webhooks to notification (#8807)
Lunny Xiao [Wed, 6 Nov 2019 06:43:03 +0000 (14:43 +0800)]
Move repofiles webhooks to notification (#8807)

4 years agoAdd migrate command to docs (#8842)
John Olheiser [Tue, 5 Nov 2019 18:54:54 +0000 (12:54 -0600)]
Add migrate command to docs (#8842)

* Add migrate command to docs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Link to CLI

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Sneak in convert command

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoupdate docs to latest version (#8845)
techknowlogick [Tue, 5 Nov 2019 18:54:20 +0000 (13:54 -0500)]
update docs to latest version (#8845)

4 years agoFix to close opened io resources as soon as not needed (#8839)
Lauris BH [Tue, 5 Nov 2019 12:54:47 +0000 (14:54 +0200)]
Fix to close opened io resources as soon as not needed (#8839)

* Fix to close opened io resources as soon as not needed

* Remove unneeded err checks

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 5 Nov 2019 12:09:43 +0000 (12:09 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMove pull webhook to notification (#8805)
Lunny Xiao [Tue, 5 Nov 2019 11:04:08 +0000 (19:04 +0800)]
Move pull webhook to notification (#8805)

* Move pull webhook to notification

* fix fmt

4 years agoUpdate go-org to optimize code (#8824)
Lauris BH [Tue, 5 Nov 2019 08:39:03 +0000 (10:39 +0200)]
Update go-org to optimize code (#8824)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 5 Nov 2019 06:52:00 +0000 (06:52 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix (open/closed) issue count when label excluded (#8815)
jaqra [Tue, 5 Nov 2019 06:48:51 +0000 (09:48 +0300)]
Fix (open/closed) issue count when label excluded (#8815)

* Fix (open/closed) issue count when label excluded

* Use capital sql keywords

4 years agoAdd additional periods to activity page (#8829)
Lauris BH [Tue, 5 Nov 2019 05:45:48 +0000 (07:45 +0200)]
Add additional periods to activity page (#8829)

4 years agoREADME: Update Screenshots and Badges in ZH (#8813)
6543 [Tue, 5 Nov 2019 00:12:58 +0000 (01:12 +0100)]
README: Update Screenshots and Badges in ZH (#8813)

* use relative instead of absolute paths

* update badges of ZH readme

* update screenshots

* use <style> for table

* remove useles stype

* absolute paths for images

4 years agoFix new user form for non-local users (#8826)
Lauris BH [Mon, 4 Nov 2019 19:10:37 +0000 (21:10 +0200)]
Fix new user form for non-local users (#8826)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 4 Nov 2019 10:23:49 +0000 (10:23 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix: remove duplicated signed commit icons (#8820)
Wenxuan Zhao [Mon, 4 Nov 2019 10:20:12 +0000 (02:20 -0800)]
Fix: remove duplicated signed commit icons (#8820)

Signed-off-by: Wenxuan Zhao <viz@linux.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 4 Nov 2019 04:52:17 +0000 (04:52 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoExplicity indicate the socket unit to use the service unit "gitea.service" (#8804)
Ramon Fischer [Mon, 4 Nov 2019 04:42:30 +0000 (05:42 +0100)]
Explicity indicate the socket unit to use the service unit "gitea.service" (#8804)

* rename socket file, make example more precise, use long parameter name

* correct path

* use the correct path to the configuration file according to the documentation

* rename the socket unit back to 'gitea.main.socket', explicitly indicate that the socket unit should use the service file 'gitea.service'

4 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

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

4 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

4 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

4 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>
4 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()

4 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

4 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>
4 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

4 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

4 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

4 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)

4 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.

4 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)

4 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)

4 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

4 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

4 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>
4 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

4 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>
4 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

4 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)

4 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

4 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>
4 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

4 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)

4 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

4 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

4 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

4 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>
4 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

4 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)

4 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>
4 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)

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

Replaces #8182

4 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)

4 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

4 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