Commit Graph

8326 Commits

Author SHA1 Message Date
Anthony Vanelverdinghe 44ec9b933a Rephrase comment about RuntimeDirectory option (#8912) 2019-11-10 11:49:39 -05:00
guillep2k 01a4a7cb14 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
2019-11-10 09:22:19 +00:00
zeripath 8eeb2877d5
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.
2019-11-10 08:42:51 +00:00
6543 31416a5f4e 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 e72d94129c.

* 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
2019-11-10 16:07:21 +08:00
Lunny Xiao daab245167
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
2019-11-10 12:41:51 +08:00
zeripath 1b7402bd1d
Fix issue with user.fullname (#8902) 2019-11-09 23:21:53 +00:00
guillep2k bb04fb55d7 Enable punctuations ending mentions (#8889)
* Enable punctuations ending mentions

* Improve tests
2019-11-09 17:12:05 -05:00
mrsdizzie c54145174f 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
2019-11-09 15:13:35 -05:00
guillep2k a647a54a08 Leave non-dated issues for last (#8871) 2019-11-09 13:09:01 +00:00
GiteaBot 1f3ba6919d [skip ci] Updated translations via Crowdin 2019-11-09 09:45:09 +00:00
guillep2k f4937879b0 Fix require external registration password (#8885)
* Fix require external registration password

* Fix ctx on error condition by @jolheiser
2019-11-09 17:42:34 +08:00
GiteaBot c15d371939 [skip ci] Updated translations via Crowdin 2019-11-09 03:44:04 +00:00
guillep2k 6e1912c73a Fix password complexity check on registration (#8887)
* Fix registration password complexity

* Fix integration to use a complex password ;)
2019-11-09 11:40:37 +08:00
David Svantesson 9ae4c17cb1 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
2019-11-09 08:39:37 +08:00
MysticBoy d2aee2a3e2 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
2019-11-08 17:32:30 -05:00
Lunny Xiao f02138a148 Fix bug when migrate from API (#8631)
* fix bug when migrate from API

* fix test

* fix test

* improve

* fix error message
2019-11-08 17:21:00 -05:00
Lunny Xiao 55bdc9aa38 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
2019-11-08 16:25:53 -05:00
Lunny Xiao 016a5d0438 Move some actions to notification/action (#8779)
* Move some actions to notification/action

* Fix test

* fix test
2019-11-08 15:54:50 -05:00
John Olheiser fb459f2c2c 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>
2019-11-08 14:44:18 -05:00
Jookia 1274ad864e 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
2019-11-08 12:33:21 -05:00
mrsdizzie d9be82bd00 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
2019-11-08 09:01:24 +02:00
mrsdizzie b747501337 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
2019-11-07 21:12:23 +01:00
GiteaBot 884acf8295 [skip ci] Updated translations via Crowdin 2019-11-07 18:33:04 +00:00
jaqra 065bbddab9 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
2019-11-07 20:09:51 +02:00
guillep2k 1f90147f39 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>
2019-11-07 21:34:28 +08:00
Damien Pollet d5b1e6bc51 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
2019-11-06 18:23:06 +01:00
GiteaBot f05cd3e317 [skip ci] Updated translations via Crowdin 2019-11-06 13:42:48 +00:00
Lunny Xiao 12170d26a7 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
2019-11-06 15:39:29 +02:00
David Svantesson 72aa5a20ec 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 753b7d205b.

* Clarify help text what options do.
2019-11-06 11:37:14 +02:00
Lunny Xiao 0109229928
Move release webhook to notification (#8817)
* Move release webhook to notification

* Extract release webhook method

* fix bug

* fix import
2019-11-06 16:25:50 +08:00
GiteaBot 6d42add37f [skip ci] Updated translations via Crowdin 2019-11-06 06:44:54 +00:00
Lunny Xiao 8a84d82d53
Move repofiles webhooks to notification (#8807) 2019-11-06 14:43:03 +08:00
John Olheiser 36b8c081f6 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>
2019-11-05 13:54:54 -05:00
techknowlogick 9395805512
update docs to latest version (#8845) 2019-11-05 13:54:20 -05:00
Lauris BH 45f219239e 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
2019-11-05 20:54:47 +08:00
GiteaBot 79fd422a92 [skip ci] Updated translations via Crowdin 2019-11-05 12:09:43 +00:00
Lunny Xiao aaeef295bb
Move pull webhook to notification (#8805)
* Move pull webhook to notification

* fix fmt
2019-11-05 19:04:08 +08:00
Lauris BH 05e7715c4b Update go-org to optimize code (#8824) 2019-11-05 16:39:03 +08:00
GiteaBot 2f4ef84cbf [skip ci] Updated translations via Crowdin 2019-11-05 06:52:00 +00:00
jaqra c0f4675a68 Fix (open/closed) issue count when label excluded (#8815)
* Fix (open/closed) issue count when label excluded

* Use capital sql keywords
2019-11-05 01:48:51 -05:00
Lauris BH a91679c9e3 Add additional periods to activity page (#8829) 2019-11-05 00:45:48 -05:00
6543 8d8aecd3cf 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
2019-11-04 19:12:58 -05:00
Lauris BH 86a44f6b48
Fix new user form for non-local users (#8826) 2019-11-04 21:10:37 +02:00
GiteaBot 3fb9e3afe3 [skip ci] Updated translations via Crowdin 2019-11-04 10:23:49 +00:00
Wenxuan Zhao 0471aae348 Fix: remove duplicated signed commit icons (#8820)
Signed-off-by: Wenxuan Zhao <viz@linux.com>
2019-11-04 18:20:12 +08:00
GiteaBot ee5249889d [skip ci] Updated translations via Crowdin 2019-11-04 04:52:17 +00:00
Ramon Fischer 2282c659dd 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'
2019-11-04 12:42:30 +08:00
Lunny Xiao a966a0298e Move more webhook codes from models to webhook module (#8802)
* Move more webhook codes from models to webhook module
2019-11-03 22:13:25 +00:00
Lunny Xiao 491887d441 Move actions to notification (#8785) 2019-11-03 20:59:09 +00:00
David Svantesson 7971b05d2b 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
2019-11-03 22:46:32 +08:00