Commit Graph

2008 Commits

Author SHA1 Message Date
Jonas Franz
0f64dad74b
Merge branch 'master' into feat/approval-new 2018-05-17 14:00:21 +02:00
Lunny Xiao
24941a1046
Add more webhooks support and refactor webhook templates directory (#3929)
* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* update vendor

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* load attributes when created release

* update comparsion doc
2018-05-16 22:01:55 +08:00
Jonas Franz
8bb51135b6
Add support for "Show/Hide outdated"
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-15 16:34:19 +02:00
Jonas Franz
4ea74e5327
Add support for showing code comments of reviews in conversation
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-15 12:52:28 +02:00
Jonas Franz
6ae32b27e3
Fix problems caused by files in subdirectories
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-14 19:04:45 +02:00
Jonas Franz
de7081c2ab
Comments will be shown at the right place now
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-14 14:05:38 +02:00
Jonas Franz
ed695c1bf9
Fix unit tests by updating fixtures and updating outdated test
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-14 10:55:50 +02:00
Jonas Franz
5f55edea84
gofmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-13 22:43:02 +02:00
Jonas Franz
7723e15e64
Moved review migration from v64 to v65
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-13 22:15:16 +02:00
Jonas Franz
6d00c1a7ce
Merge branch 'master' into feat/approval-new
# Conflicts:
#	models/issue_comment.go
#	models/migrations/migrations.go
#	models/migrations/v64.go
#	models/models.go
#	public/css/index.css
2018-05-13 22:14:34 +02:00
Jonas Franz
7986d6ed22
Add support for invalidating comments
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-13 13:24:19 +02:00
Jonas Franz
066086c390
Improved comment rendering in "Files" view by adding Comments to DiffLine
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-12 19:09:42 +02:00
Jonas Franz
58fb672d0d
gofmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-12 10:53:38 +02:00
Jonas Franz
bc9359222a
Fetch all review ids at once
Add unit tests

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-11 20:28:44 +02:00
Jonas Franz
9c6bb4b1e9
Add unit tests for Review
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-11 14:36:08 +02:00
Jonas Franz
3e5f3c349e
Implement Review form
Show Review comments on comment stream

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-11 12:50:44 +02:00
Jonas Franz
75b7d9b86a
Preview for listing comments
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-11 10:59:20 +02:00
Lauris BH
ff3971b830 Add LDAP integration tests (#3897)
* Add LDAP service for tests

* Add LDAP login source and test user sign-in

* Add checks to test if user data is correct

* Add LDAP user sync test

* Add failed user sign-in test
2018-05-11 15:55:32 +08:00
Jonas Franz
17af2d17be
Add GetCurrentReview to simplify fetching current review
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-10 21:50:57 +02:00
Jonas Franz
4ad563d66f
Moved "Pending" to first position
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-10 21:43:07 +02:00
Jonas Franz
0f772d1bf4
Simplified create and find functions for review
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-10 20:41:31 +02:00
Jonas Franz
9544c46052
Add create review comment implementation
Add migration for review
Other small changes

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-10 16:35:25 +02:00
Jonas Franz
2c18552576
Add load functions
Add ReviewID to findComments

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-10 14:48:08 +02:00
Lauris BH
382e7276b8 Fix multiple asssingee table migration (#3931) 2018-05-10 09:18:01 +08:00
kolaente
95f2e2b57b Multiple assignees (#3705) 2018-05-09 19:29:04 +03:00
Travis Parker
73370b8cf7 consistent IsOverdue field name capitalization (#3909)
Milestone.IsOverDue vs Issue.IsOverdue, the former was also causing the
milestone list page template to fail to render if any milestones have a
due date assigned.

Signed-off-by: Travis J Parker <travis.parker@gmail.com>
2018-05-07 12:50:27 +03:00
Jonas Franz
aeb057755a
Replace ReviewComment with Content
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-06 23:32:24 +02:00
Jonas Franz
623a9f6e3c
Add Review
Add IssueComment types

Signed-off-by: Jonas Franz <info@jonasfranz.software>

(cherry picked from commit 2b4daab)
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-06 23:06:11 +02:00
kolaente
1fdf560678 Added user language setting (#3875)
* Added user language setting

* Added translation string for setting

* Fixed import order + typo

* improved checking if the user has a language saved in the db

* The current saved language is now set a default inside the dropdown

* fmt

* When a user signs in and doesn't have a language saved, the current browser language is saved

* updated gitea-sdk

* Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language

# Conflicts:
#	models/migrations/migrations.go
#	models/migrations/v62.go

* Made tests work again

* trigger CI

* trigger CI

* fmt

* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO

* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO

* When loggin in, only the language col gets updated instead of everything
2018-05-05 08:28:30 +08:00
Lauris BH
1e1ece8f3d
Do not allow to reuse TOTP passcode (#3878) 2018-05-02 18:02:02 +03:00
Bo-Yi Wu
c58e1e437b test: reduce testing time. (#3885) 2018-05-02 21:56:19 +08:00
Lauris BH
9495429982
Add "error" as reserved username (#3882) 2018-05-02 11:06:31 +03:00
Lauris BH
5ffdf9388b
Fix to use only needed columns from tables to get repository git paths (#3870) 2018-05-02 09:10:19 +03:00
kolaente
1a97030017 Issue due date (#3794)
* Started adding deadline to ui

* Implemented basic issue due date managing

* Improved UI for due date managing

* Added at least write access to the repo in order to modify issue due dates

* Ui improvements

* Added issue comments creation when adding/modifying/removing a due date

* Show due date in issue list

* Added api support for issue due dates

* Fixed lint suggestions

* Added deadline to sdk

* Updated css

* Added support for adding/modifiying deadlines for pull requests via api

* Fixed comments not created when updating or removing a deadline

* update sdk (will do properly once go-gitea/go-sdk#103 is merged)

* enhanced updateIssueDeadline

* Removed unnessecary Issue.DeadlineString

* UI improvements

* Small improvments to comment creation
+ ui & validation improvements

* Check if an issue is overdue is now a seperate function

* Updated go-sdk with govendor as it was merged

* Simplified isOverdue method

* removed unessecary deadline to 0 set

* Update swagger definitions

* Added missing return

* Added an explanary comment

* Improved updateIssueDeadline method so it'll only update `deadline_unix`

* Small changes and improvements
* no need to explicitly load the issue when updating a deadline, just use whats already there
* small optimisations

* Added check if a deadline was modified before updating it

* Moved comment creating logic into its own function

* Code cleanup for creating deadline comment

* locale improvement

* When modifying a deadline, the old deadline is saved with the comment

* small improvments to xorm session handling when updating an issue deadline
+ style nitpicks

* style nitpicks

* Moved checking for if the user has write acces to middleware
2018-05-01 22:05:28 +03:00
Tris Forster
85d14cc229 Symlink icons (#1416) (#3826)
* Updated vendor code for code.gitea.io/git

* Display symlinks correctly for files and directories

* Added symlink tests

* Applied silverwinds stylesheet patch

Signed-off-by: Tris Forster <tris.git@shoddynet.org>
2018-05-01 10:04:36 +03:00
Lauris BH
181b3a8f09 Fix path cleanup in multiple places (#3871) 2018-05-01 09:46:04 +08:00
Ethan Koenig
7ea4bfc561 API endpoint for testing webhook (#3550)
* API endpoint for testing webhook

* Empty commit to rerun CI
2018-04-29 14:21:33 +08:00
Lauris BH
5a62eb30df
Store OAuth2 session data in database (#3660)
* Store OAuth2 session data in database

* Rename table to `oauth2_session` and do not skip xormstorage initialization error
2018-04-29 09:09:24 +03:00
Jonas Franz
8d5f58d834 Shows total tracked time in issue and milestone list (#3341)
* Show total tracked time in issue and milestone list
Show total tracked time at issue page

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Optimizing TotalTimes by using SumInt

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fixing wrong total times for milestones caused by a missing JOIN
Adding unit tests for total times

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Logging error instead of ignoring it

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Correcting spelling mistakes

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Change error message to a short version

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add error handling to TotalTimes
Add variable for totalTimes

Signed-off-by: Jonas Franz <info@jonasfranz.de>

* Introduce TotalTrackedTimes as variable of issue
Load TotalTrackedTimes by loading attributes of IssueList
Load TotalTrackedTimes by loading attributes of single issue
Add Sec2Time as helper to use it in templates

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fixed test + gofmt

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Load TotalTrackedTimes via MilestoneList instead of single requests

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add documentation for MilestoneList

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add documentation for MilestoneList

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix test

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Change comment from SQL query to description

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix unit test by using int64 instead of int

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix unit test by using int64 instead of int

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Check if timetracker is enabled

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix test by enabling timetracking

Signed-off-by: Jonas Franz <info@jonasfranz.de>
2018-04-29 13:58:47 +08:00
kolaente
fd8d6405c8 Fix only updated_unix when adding a comment (#3855) 2018-04-29 12:48:14 +08:00
Morgan Bazalgette
320c9817bc Don't force due date to current time (#3830)
Fixes #3827
2018-04-23 13:55:03 +08:00
Lunny Xiao
bec69f702b
Add topic support (#3711)
* add topic models and unit tests

* fix comments

* fix comment

* add the UI to show or add topics for a repo

* show topics on repositories list

* fix test

* don't show manage topics link when no permission

* use green basic as topic label

* fix topic label color

* remove trace content

* remove debug function
2018-04-11 10:51:44 +08:00
Michael Kuhn
f321980a32 Fix typo in deleteUser (#3781)
num_watches was used where num_stars should have been used.
2018-04-10 20:39:01 +08:00
Bwko
8ee45eb614 Add EnableTimetracking option to app settings (#3719) 2018-04-09 23:15:32 +08:00
Evan Sherwood
6b6c414bc3 Enhance healthcheck for database connectivity (#3754)
Modify the call to ping the database to fail gracefully if the
database has not yet been configured by the end user, such as
after a clean install. This allows /healthcheck to return a 200
with a modified status message instead of causing a PANIC.

Signed-off-by: Evan Sherwood <evan@sherwood.io>
2018-04-04 17:34:27 +08:00
Jonas Franz
3e06490d38 Add Size column to attachment (#3734)
* Add size column to attachment
Migrate attachments by calculating file sizes

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Calculate attachment size on creation

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Log error instead of returning error

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-03-31 09:10:44 +08:00
Lunny Xiao
d877bf7e15
Add config option to enable or disable log executed SQL (#3726)
* add config option to enable or disable log executed SQL

* rename ShowSQL to LogSQL
2018-03-30 22:49:46 +08:00
Lunny Xiao
45d1fc03cb
fix go vet error (#3740) 2018-03-30 07:21:27 +08:00
Allen Wild
15c6bb500b Add repository setting to enable/disable health checks (#3607)
New Feature:
  * Repository struct field for IsFsckEnabled (default true of course)
  * Admin Settings section on repo options page, accessible only by
    admin users

Possible Enhancements:
  * There's no way to force running health checks on all repos
    regardless of their IsFsckEnabled setting. This would be useful if
    there were an admin API or dashboard button to run fsck immediately.

Issue: https://github.com/go-gitea/gitea/issues/1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
2018-03-27 22:13:20 +08:00
Bwko
321cc2a3d0 Set default branchname on first push (#3715) 2018-03-25 21:00:07 +08:00