Commit graph

884 commits

Author SHA1 Message Date
David Svantesson
6aa3f8bc29 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
2019-10-25 22:46:37 +08:00
GiteaBot
516fd7d3ae [skip ci] Updated translations via Crowdin 2019-10-25 07:23:33 +00:00
GiteaBot
a520236cb5 [skip ci] Updated translations via Crowdin 2019-10-24 21:14:00 +00:00
GiteaBot
ab791fe7bb [skip ci] Updated translations via Crowdin 2019-10-24 01:20:30 +00:00
zeripath
c84174b764
Use AppSubUrl for more redirections (#8647)
Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template
Fixes /explore and organisation redirection
2019-10-23 22:04:22 +01:00
GiteaBot
ace0346c66 [skip ci] Updated translations via Crowdin 2019-10-23 17:58:51 +00:00
jaqra
dbd9d8dd54 Add 'Alt + click' feature to exclude labels (#8199)
Add 'Alt + click' and 'Alt +enter' feature to exclude particular labels on searching for issues.
2019-10-23 17:29:14 +01:00
GiteaBot
637e3219ab [skip ci] Updated translations via Crowdin 2019-10-23 15:37:47 +00:00
GiteaBot
7d1a7c05db [skip ci] Updated translations via Crowdin 2019-10-23 14:39:37 +00:00
GiteaBot
b4b0e22f5f [skip ci] Updated translations via Crowdin 2019-10-23 11:51:49 +00:00
GiteaBot
a41a965db2 [skip ci] Updated translations via Crowdin 2019-10-22 12:39:06 +00:00
GiteaBot
73f8069249 [skip ci] Updated translations via Crowdin 2019-10-21 20:22:31 +00:00
GiteaBot
41c7aa5a3a [skip ci] Updated translations via Crowdin 2019-10-21 13:41:05 +00:00
zeripath
0bfe5eb10b
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
2019-10-21 09:21:45 +01:00
GiteaBot
b539a6e6e3 [skip ci] Updated translations via Crowdin 2019-10-21 06:58:59 +00:00
GiteaBot
c8f3146cd5 [skip ci] Updated translations via Crowdin 2019-10-20 18:32:35 +00:00
GiteaBot
85e4190761 [skip ci] Updated translations via Crowdin 2019-10-20 11:44:44 +00:00
6543
3b379691fa move translation to crowdin (#8596) 2019-10-20 12:06:53 +03:00
GiteaBot
23045c7d53 [skip ci] Updated translations via Crowdin 2019-10-18 11:15:16 +00:00
GiteaBot
fecd8f949d [skip ci] Updated translations via Crowdin 2019-10-18 08:35:26 +00:00
GiteaBot
d44053eeda [skip ci] Updated translations via Crowdin 2019-10-18 07:00:14 +00:00
GiteaBot
37028f0e4e [skip ci] Updated translations via Crowdin 2019-10-17 23:53:45 +00:00
GiteaBot
ae132632a9 [skip ci] Updated translations via Crowdin 2019-10-17 02:10:15 +00:00
GiteaBot
c43feedb96 [skip ci] Updated translations via Crowdin 2019-10-17 00:17:55 +00:00
Lukas
de4f10be86 Allow committing / adding empty files using the web ui (#8420) (#8532)
* Allow committing / adding empty files from the web ui (#8420)

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>

* Add a modal to confirm the commit of an empty file

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
2019-10-16 22:28:41 +03:00
zeripath
fcb535c5c3
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631)
This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however.

## Features
- [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.)
- [x] Verify commits signed with the default gpg as valid
- [x] Signer, Committer and Author can all be different
    - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon.
- [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available
    - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg
    - [x] Try to match the default key with a user on gitea - this is done at verification time
- [x] Make things configurable?
    - app.ini configuration done
    - [x] when checking commits are signed need to check if they're actually verifiable too
- [x] Add documentation

I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
2019-10-16 14:42:42 +01:00
GiteaBot
50b66b66e7 [skip ci] Updated translations via Crowdin 2019-10-16 10:17:24 +00:00
guillep2k
31655aabfc Fix password complexity regex for special characters (on master) (#8525)
* Fix extra space

* Fix regular expression

* Fix error template name

* Simplify check code, fix default values, add test

* Fix router tests

* Fix fmt

* Fix setting and lint

* Move cleaning up code to test, improve comments

* Tidy up variable declaration
2019-10-16 11:09:58 +08:00
GiteaBot
9b9b67cd31 [skip ci] Updated translations via Crowdin 2019-10-15 13:42:26 +00:00
GiteaBot
4a290bd64c [skip ci] Updated translations via Crowdin 2019-10-15 12:21:14 +00:00
6543
d7d348ea86 [UI] Pull Request Download diff Button (#8470)
* Add Diff Download to Compare List

* Add&Change Text for Diff Options

* move button to seperate template

* add drop down menue with options

* Update: Compare

update Gogs, BitBucket, RhodeCode and remove gitea issue link

Co-Authored-By: Lauris BH <lauris@nix.lv>

* remove last things from TESTing
2019-10-15 13:44:36 +03:00
6543
733c898a90 [Branch View] Add Included TAG (#8449)
* included message

* add property IsIncluded

* Add Orange Lable
2019-10-14 23:40:17 +01:00
GiteaBot
b6ef539ef4 [skip ci] Updated translations via Crowdin 2019-10-14 21:39:15 +00:00
GiteaBot
54c137b373 [skip ci] Updated translations via Crowdin 2019-10-14 17:46:01 +00:00
GiteaBot
8c8a93c025 [skip ci] Updated translations via Crowdin 2019-10-14 15:45:33 +00:00
Maxim Tkachenko
db657192d0 Password Complexity Checks (#6230)
Add password complexity checks. The default settings require a lowercase, uppercase, number and a special character within passwords.

Co-Authored-By: T-M-A <maxim.tkachenko@gmail.com>
Co-Authored-By: Lanre Adelowo <adelowomailbox@gmail.com>
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-10-14 16:24:26 +01:00
GiteaBot
0c680f337d [skip ci] Updated translations via Crowdin 2019-10-13 20:23:11 +00:00
GiteaBot
c23cf4c97c [skip ci] Updated translations via Crowdin 2019-10-13 16:31:19 +00:00
GiteaBot
f858b89b13 [skip ci] Updated translations via Crowdin 2019-10-13 14:37:37 +00:00
Lunny Xiao
f2a3abc683
Move migrating repository from frontend to backend (#6200)
* move migrating to backend

* add loading image when migrating and fix tests

* fix format

* fix lint

* add redis task queue support and improve docs

* add redis vendor

* fix vet

* add database migrations and fix app.ini sample

* add comments for task section on app.ini.sample

* Update models/migrations/v84.go

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* Update models/repo.go

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* move migrating to backend

* add loading image when migrating and fix tests

* fix fmt

* add redis task queue support and improve docs

* fix fixtures

* fix fixtures

* fix duplicate function on index.js

* fix tests

* rename repository statuses

* check if repository is being create when SSH request

* fix lint

* fix template

* some improvements

* fix template

* unified migrate options

* fix lint

* fix loading page

* refactor

* When gitea restart, don't restart the running tasks because we may have servel gitea instances, that may break the migration

* fix js

* Update models/repo.go

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

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

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

* fix tests

* rename ErrTaskIsNotExist to ErrTaskDoesNotExist

* delete release after add one on tests to make it run happy

* fix tests

* fix tests

* improve codes

* fix lint

* fix lint

* fix migrations
2019-10-13 21:23:14 +08:00
GiteaBot
ac3613b791 [skip ci] Updated translations via Crowdin 2019-10-11 21:34:17 +00:00
Yaşar Çiv
57b0d9a38b Add @yasarciv67 to TRANSLATORS file (#8451) 2019-10-10 15:47:38 +02:00
GiteaBot
7c1ddd5692 [skip ci] Updated translations via Crowdin 2019-10-10 12:44:06 +00:00
GiteaBot
5109d18b29 [skip ci] Updated translations via Crowdin 2019-10-09 19:02:21 +00:00
GiteaBot
3810fa48ac [skip ci] Updated translations via Crowdin 2019-10-09 01:29:16 +00:00
GiteaBot
4fe04f1adc [skip ci] Updated translations via Crowdin 2019-10-08 19:20:34 +00:00
GiteaBot
736ad8f091 [skip ci] Updated translations via Crowdin 2019-10-08 18:23:11 +00:00
Lauris BH
28d5347cf3 Singular form for files that has only one line (#8416) 2019-10-07 19:38:41 -04:00
GiteaBot
af6cc5b9d8 [skip ci] Updated translations via Crowdin 2019-10-07 17:24:26 +00:00
silverwind
08896cd9f6 add file line count info on UI (#8396)
Also reworked the header to remove the filename (which is redundant with
the file path above) and made the header a flexbox with a monospace
font.

Fixes: https://github.com/go-gitea/gitea/issues/8170
2019-10-07 00:59:17 -04:00
guillep2k
fb7c23f911 Fix editor commit to new branch if PR disabled (#8375) 2019-10-05 10:09:19 +08:00
GiteaBot
ae939652ea [skip ci] Updated translations via Crowdin 2019-10-04 07:22:20 +00:00
GiteaBot
3be43dc5e3 [skip ci] Updated translations via Crowdin 2019-10-02 20:04:16 +00:00
GiteaBot
0d93430695 [skip ci] Updated translations via Crowdin 2019-10-02 13:01:01 +00:00
GiteaBot
3a7e3dbfb4 [skip ci] Updated translations via Crowdin 2019-10-01 23:27:07 +00:00
GiteaBot
09bcc9edb0 [skip ci] Updated translations via Crowdin 2019-10-01 13:43:35 +00:00
GiteaBot
177aedfca9 [skip ci] Updated translations via Crowdin 2019-10-01 05:35:37 +00:00
GiteaBot
d3bc3dd4d1 [skip ci] Updated translations via Crowdin 2019-09-30 16:12:50 +00:00
GiteaBot
ecd4bfd284 [skip ci] Updated translations via Crowdin 2019-09-30 14:00:59 +00:00
GiteaBot
a5992d1725 [skip ci] Updated translations via Crowdin 2019-09-30 09:21:01 +00:00
GiteaBot
f89d027c15 [skip ci] Updated translations via Crowdin 2019-09-30 02:36:41 +00:00
Elias Norberg
668d3d02aa If no specific context is required for status check, require an overall success (#8318)
Signed-off-by: Elias Norberg <elias@aisle.se>
2019-09-30 10:33:40 +08:00
GiteaBot
0d2566b560 [skip ci] Updated translations via Crowdin 2019-09-30 01:11:00 +00:00
GiteaBot
cf170bf529 [skip ci] Updated translations via Crowdin 2019-09-29 20:38:07 +00:00
GiteaBot
5774260e9b [skip ci] Updated translations via Crowdin 2019-09-29 12:54:17 +00:00
GiteaBot
b2b927808b [skip ci] Updated translations via Crowdin 2019-09-26 13:26:39 +00:00
Adam
7de910ab6f Added myself to translators list (#8292) 2019-09-26 21:16:35 +08:00
GiteaBot
43c0249583 [skip ci] Updated translations via Crowdin 2019-09-24 13:26:59 +00:00
GiteaBot
b6cfca6240 [skip ci] Updated translations via Crowdin 2019-09-23 20:10:56 +00:00
David Svantesson
a0e88dfc2e Add teams to repo on collaboration page. (#8045)
* Add teams to repo on collaboration page.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add option for repository admins to change teams access to repo.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add comment for functions

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Make RepoAdminChangeTeamAccess default false in xorm and make it default checked in template instead.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Make proper language strings and fix error redirection.

* Add unit tests for adding and deleting team from repository.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add database migration

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix redirect

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix locale string mismatch.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Move team access mode text logic to template.

* Move collaborator access mode text logic to template.
2019-09-23 23:08:03 +03:00
GiteaBot
6322d254e7 [skip ci] Updated translations via Crowdin 2019-09-21 17:05:00 +00:00
GiteaBot
0d56dac577 [skip ci] Updated translations via Crowdin 2019-09-20 14:08:48 +00:00
guillep2k
2a2b46c62e Reference issues from pull requests and other issues (#8137)
* Update ref comment

* Generate comment on simple ref

* Make fmt + remove unneeded repo load

* Add TODO comments

* Add ref-check in issue creation; re-arrange template

* Make unit tests pass; rearrange code

* Make fmt

* Filter out xref comment if user can't see the referencing issue

* Add TODOs

* Add cross reference

* Rearrange code; add cross-repository references

* Striketrhough obsolete references

* Remove unnecesary TODO

* Add "not supported" note

* Support for edits and deletes, and issue title

* Revert changes to go.mod

* Fix fmt

* Add support for xref from API

* Add first integration test

* Add integration tests

* Correct formatting

* Fix add comment test

* Add migration

* Remove outdated comments; fix typo

* Some code refactoring and rearranging

* Rename findCrossReferences to createCrossReferences

* Delete xrefs when repository is deleted

* Corrections as suggested by @lafriks

* Prepare for merge

* Fix log for errors
2019-09-20 01:45:38 -04:00
GiteaBot
46f06956df [skip ci] Updated translations via Crowdin 2019-09-19 00:27:00 +00:00
Lunny Xiao
04ca7f0047 Refuse merge until all required status checks success (#7481)
* refuse merge until ci successfully

* deny merge request when required status checkes not succeed on merge Post and API

* add database migration for added columns on protected_branch

* fix migration

* fix protected branch check bug

* fix protected branch settings

* remove duplicated code on check pull request's required commit statuses pass

* remove unused codes

* fix migration

* add newline for template file

* fix go mod

* rename function name and some other fixes

* fix template

* fix bug pull view

* remove go1.12 wrong dependencies

* add administrator bypass when protected branch status check enabled

* fix bug

* improve the codes
2019-09-18 08:39:45 +03:00
GiteaBot
a629904b30 [skip ci] Updated translations via Crowdin 2019-09-17 06:26:13 +00:00
Mario Lubenka
a37236314c Adds side-by-side diff for images (#6784)
* Adds side-by-side diff for images

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Explain blank imports

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use complete word for width and height labels on image compare

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Update index.css from master

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Moves ImageInfo to git commit file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Assign ImageInfo function for template and sets correct target for BeforeSourcePath

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adds missing comment

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Return error if ImageInfo failed

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Avoid template panic when ImageInfo failed for some reason

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Show file size on image diff

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes unused helper function

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Reverts copyright year change

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Close file reader

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Update commit.go

Sets correct data key

* Moves reader.Close() up a few lines

* Updates index.css

* Updates CSS file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Transfers adjustments for image compare to compare.go file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adjusts variable name

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Apply lesshint recommendations

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Do not show old image on image compare if it is not in index of base commit

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Change file size text

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
2019-09-16 17:03:22 +08:00
GiteaBot
107d57a925 [skip ci] Updated translations via Crowdin 2019-09-14 07:07:25 +00:00
techknowlogick
2837563147
oauth2 with remote Gitea - Fix #8093 (#8149) 2019-09-12 22:15:36 -04:00
GiteaBot
e7e5bf6d85 [skip ci] Updated translations via Crowdin 2019-09-12 09:33:49 +00:00
GiteaBot
5e67e0100c [skip ci] Updated translations via Crowdin 2019-09-11 21:28:55 +00:00
GiteaBot
10dfb444de [skip ci] Updated translations via Crowdin 2019-09-10 17:11:24 +00:00
WGH
6ddd3b0b47 Implement webhook branch filter (#7791)
* Fix validate() function to handle errors in embedded anon structs

* Implement webhook branch filter

See #2025, #3998.
2019-09-09 08:48:21 +03:00
John Olheiser
0118b6aaf8 Add option to initialize repository with labels (#6061)
* Add optional label sets on repo creation

* Fix CRLF

* Instead of hardcoding default, make it the helper

* Move label set init out of repo init

Add a new error for the router
Combine router label init with repo creation label init

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

* Add issue labels to Swagger for repo creation

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

* Update models/issue_label.go

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Update models/issue_label.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-09-08 11:28:40 +03:00
GiteaBot
d4e11ebb18 [skip ci] Updated translations via Crowdin 2019-09-07 14:55:43 +00:00
GiteaBot
418be61040 [skip ci] Updated translations via Crowdin 2019-09-07 11:19:22 +00:00
GiteaBot
7e74afc9f7 [skip ci] Updated translations via Crowdin 2019-09-06 19:26:14 +00:00
GiteaBot
5ef21408e2 [skip ci] Updated translations via Crowdin 2019-09-05 20:23:08 +00:00
GiteaBot
85f56546c4 [skip ci] Updated translations via Crowdin 2019-09-05 09:28:34 +00:00
micw
63c40796ef Display description of 'make this repo private' as help text, not as tooltip (#8097) 2019-09-05 11:13:51 +02:00
GiteaBot
d0371ff058 [skip ci] Updated translations via Crowdin 2019-09-04 19:55:18 +00:00
GiteaBot
d9545f9ecc [skip ci] Updated translations via Crowdin 2019-09-03 17:29:10 +00:00
GiteaBot
2bcd7f34e9 [skip ci] Updated translations via Crowdin 2019-09-03 15:48:35 +00:00
GiteaBot
99d6863238 [skip ci] Updated translations via Crowdin 2019-09-03 12:45:01 +00:00
Lunny Xiao
6ed22ffd16 Add merged commit id on pull view when it's merged (#8062) 2019-09-03 09:29:36 +03:00
Mura Li
032c90e7c5 Add tooltip for the visibility checkbox in /repo/create (#8025)
* Add tooltip for the visibility checkbox in /repo/create

* Change the tooltip wording

* Update options/locale/locale_en-US.ini

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-09-02 18:29:04 -04:00
GiteaBot
5fc93b4005 [skip ci] Updated translations via Crowdin 2019-09-02 19:13:44 +00:00
GiteaBot
fe1a6a2d9a [skip ci] Updated translations via Crowdin 2019-09-02 16:14:21 +00:00
jaqra
016083b328 Add strike to old header on comment (#8046) 2019-09-03 00:11:23 +08:00
GiteaBot
0a1c824bc7 [skip ci] Updated translations via Crowdin 2019-08-29 21:33:03 +00:00