Commit Graph

1829 Commits (6b62f042c6ac17fe70fb1b404b84fe14e309ea59)

Author SHA1 Message Date
Andrey Nering 635273cea6 Merge pull request from ethantkoenig/no_branches
Commitless repos should be bare
Ethan Koenig 9fbdd7d787 Fix engine bug in getIssueByID ()
Ethan Koenig e0a63a20e0 Fix errors caused by force push ()
Dennis Keitzel 96b4780727 Gracefully handle bare repositories on API operations. ()
Signed-off-by: Dennis Keitzel <github@pinshot.net>
Ethan Koenig 73836ce8c4 Fix ghost user bug ()
Fix bug where unassigned issues would appear to be assigned to a ghost user
Dan Magnus Lindvall ff7424179e Delete Public SSH Key tmp file after calculating fingerprint ()
* Delete public key tmp file after calculating fingerprint

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Move line

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Remove defer statement

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Readd defer statement and move remove

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Delete space

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>
Sandro Santilli f6b58964d7 Include formatting check to the `make test` (and thus also `check`) rule ()
* Include formatting check to the `make check` rule

... and give it its own standalone target too (make fmt-check)

Show diff on fmt-check failure
Do not allow running "fmt-check" with incompatible go version
Also simplify the `fmt` rule

* Forbid running "make fmt" with Go version != 1.7 or 1.8

* Ignore bindata.go for spelling and formatting checks

also remove duplicated variable assignment for GOFILES

* Run `make fmt`
Phil Hopper 6ec07a6bd7 Make `LocalCopyPath` a setting instead of a hard-coded path ()
Ethan Koenig ca9169fbe9 Migration to fix existing owner team units ()
Bo-Yi Wu 703d18e50d feat: add check misspelling ()
Andrey Nering ed31dff5ab Merge pull request from ethantkoenig/typo/issue_test
Fix misspelled variables
Ethan Koenig 9f9289fc68 Run unused test
Ethan Koenig 1a09afc729 Fix misspelled variables
Ethan Koenig 3e74b5cf51 Rename misnamed migration ()
Ethan Koenig b900c04316 Display draft releases ()
* Display draft releases

* Include ctx.User in user cache

* Integration test
Ethan Koenig 036ce3f813 Fix bug in removeOrgRepo ()
Ethan Koenig 4e5ee2b67a Fix user profile activity feed ()
* Fix user profile activity feed

* gofmt, and avoid overlapping database connections
Ethan Koenig a977ab7889 Don't ignore error in getMergeCommit ()
Ethan Koenig 336e311a7c Fix locking bug in removeOrgRepo ()
Ethan Koenig 5554165a0c Fix pull request compare link ()
* Fix pull request compare link

* Integration test
Ethan Koenig bfb44f8854 Fix status table race condition ()
Ethan Koenig 474d636794 Update code.gitea.io/git ()
* Update code.gitea.io/git

* Update function calls

* govendor fetch
Ethan Koenig 367ff327ed Use ghost users in issues/PRs ()
Timo Myyrä 2525195749 use writeTmpKeyFile in calcFingerprint ()
this makes calcFingerprint use SSH.KeyTestpath instead of os temp dir.
Jonas Östanbäck b93568cce4 xxx_active_code_live setting in printed in hours and minutes instead … ()
* xxx_active_code_live setting in printed in hours and minutes instead of just hours

* Update app.ini description of xxx_code_lives settings
Rémy Boulanouar e0c6ab2d44 Add Gitea Webhook ()
* Replace Gogs by Gitea

* Fix missing changes

* Create Gitea webhook and put Gogs webhook apart.
Ethan Koenig c85ff532e9 Commitless repos should be bare
Ethan Koenig bafd778c25 Fix invalid reference in feeds template ()
* Fix invalid reference in feeds template

* Comment for GetActAvatar

* Add integration test
Ethan Koenig 7e6ff69c00 Fix 500 for GET /teams/:id endpoints ()
* Fix 500 for GET /teams/:id endpoints

* Integration test for GET /team/:id

* Clean up integration test
Ethan Koenig 39348cd27e Give all units to owner team ()
Ethan Koenig 9c66d1d9ea Fix deadlock in updateRepository ()
Ethan Koenig 0c332f0480 Fix activity feed ()
* Fix activity feed

Preserve actions after user/repo name change

* Add missing comment

* Fix migration, and remove fields completely

* Tests
Jonas Franz 03912ce014 Adding #issuecomment to the URL in E-Mail notifications ()
* Added comment's hashtag to url for mail notifications.

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

* Added comment's hashtag to url for mail notifications.
Added explanation to return statement.

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

* Added comment's hashtag to url for mail notifications.
Added explanation to return statement + documentation.

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

* Added comment's hashtag to url for mail notifications.

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

* Replacing in-line link generation with HTMLURL. (+gofmt)

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

* Replaced action-based model with nil-based model. (+gofmt)

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

* Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants.

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

* Updating comment for mailIssueCommentToParticipants

Signed-off-by: Jonas Franz <info@jonasfranz.software>
Lunny Xiao 19d889daa2 fix bug not to trim space of login username ()
Jonas Östanbäck 7b907ed348 Rename RepoCreationNum -> MaxCreationLimit ()
Ethan Koenig bdc90aeaee Delete repo redirects on repo deletion ()
Ethan Koenig b0308d86dc Fix unloaded owner ()
Ethan Koenig cf02cd7ba0 Fix and test for delete user ()
* Fix and test for delete user

* Run updates in batches

* Unit test
Jonas Östanbäck 80cea8747f Admin should always be allowed to create repos even if hit limit ()
Kim "BKC" Carlbäcker 977dcf96e0 fixes wrong after field in webhook payload ()
Lunny Xiao 6362462da8
fix admin lost permission caused by
Lunny Xiao fd6034aaf2 Add units to team ()
* add units to team

* fix lint

* finish team setting backend

* finished permission controll on routes

* fix import blank line

* add unit check on ssh/http pull and push and fix test failed

* fix fixtures data

* remove unused code
Diep Pham 407fbfa6ce fixes wrong after field in webhook payload
when merge pull request
Lunny Xiao bc299b8317 fix avatar update bug ()
Jonas Östanbäck e214728725 Add new text for reset password flash ()
* Forgot password should use ResetPwdCodeLives, not ActiveCodeLives
 * Improve documentation for different send mail functions related to password reset
 * Improve documentation in conf/app.ini regarding xxx_CODE_LIVE_MINUTES settings
Ethan Koenig 9e627af9a4 gofmt ()
guyzmo 397474ecb1 Added Parent property to the repo API ()
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
Ethan Koenig 251fb935ff Don't recreate database in integration tests ()
Lauris BH 524885dd65 LDAP user synchronization ()
Andrey Nering ab79069dc7 Improve dashboard repo search ()
* Add VueJS

* Improve dashboard search

* Fix tab switching

* Fix input autofocus
Lauris BH 51d0becb42 Add configuration option for default permission to create Organizations ()
Kim "BKC" Carlbäcker a85c5ab9ff fix potential sqlite lock
Lauris BH 79494047b0 Show commit status icon in commits table ()
* Show commit status icon in commits table

* Add comments

* Fix icons

* Few more places where commit table is displayed

* Change integration test to use goquery for parsing html

* Add integration tests for commit table and status icons

* Fix status to return lates status correctly on all databases

* Rewrote lates commit status selects
Lunny Xiao 930d1759ae Remove env user salt since no need to use ()
* remove env user salt since no need to use

* remove unused variable from update.go
guyzmo 98460a8d9d Exposes in API the Repo entity's Size and IsBare property ()
* Exposes in API the Repo entity's IsBare property as IsEmpty

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>

* Exposes in API the Repo entity's Size property

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
Lunny Xiao 36f02c0c32
fix potential sqlite lock
Lunny Xiao 0f3923c4d7 fix potential lock when sqlite ()
Ethan Koenig a5f28a4544 gofmt ()
Lunny Xiao 1773e88643 Drop db operations from hook commands ()
* move all database operations from hook command to web command and instead of internal routes

* bug fixed

* adjust the import path sequences

* remove unused return value on hookSetup
Antoine GIRARD 3edb0c5894 Generate swagger json ()
- Generate swagger.json into public/
- Add swagger-ui auto-installation
- Add footer link to local swagger-ui
- Add /swagger url for using app url.
- Fix Swagger-UI version via git tag
Lauris BH 98548c83d3 Add primary key and index to external login user table ()
Lauris BH 0144817971 Do not allow commiting to protected branch from online editor ()
* Do not allow commiting to protected branch from online editor

* Add editor integration tests for adding new file and not allowing to add new file to protected branch
Willem van Dreumel 950f2e2074 Additional OAuth2 providers ()
* add google+

* sort signin oauth2 providers based on the name so order is always the same

* update auth tip for google+

* add gitlab provider

* add bitbucket provider (and some go fmt)

* add twitter provider

* add facebook provider

* add dropbox provider

* add openid connect provider incl. new format of tips section in "Add New Source"

* lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow)

* imports according to goimport and code style

* make it possible to set custom urls to gitlab and github provider (only these could have a different host)

* split up oauth2 into multiple files

* small typo in comment

* fix indention

* fix indentation

* fix new line before external import

* fix layout of signin part

* update "broken" dependency
Ethan Koenig 66c803fae2 MySQL, Postgres integration tests in drone ()
* MySQL, Postgres integration tests in drone

* Fix .drone.yml

* sign drone

* resign drone
Jonas Östanbäck 9a8ca3e877 Fix broken migration v27 ()
Mirror.interval column type needed to be changed to bigint.
Correct interval where the interval set is < MinInterval.
Lunny Xiao e31c02d4bf fix bug on issue view when not login ()
* fix bug on issue view when not login

* hide issue watch when not login

* update the tests

* fix test on issue
Jonas Östanbäck e4a0a04829 Add create_at and updated_at in PR json ()
* Move new fields to object creation (use reference)
 * Vendor: Update SDK
Antoine GIRARD 8371f94d06 Rework SSH key management UI to add GPG ()
* Rework SSH key management UI to add GPG

* Add more detail to gpg key display

* Update CHANGELOG.md

* Implement deletion UI

* Implement adding gpg UI

* Various fixes

- Fix duplicate entry in locale
- Re-generate hash before verification since they are consumed

* Add missing translation

* Split template

* Catch not found/verified email error
Ethan Koenig c58708d3ee Integration test framework ()
* Integration test framework

* udpate drone sign

* Formatting fixes and move router.go to routers/

* update sign for drone
Lunny Xiao 3012971e92 fix bug on status API ()
Kim "BKC" Carlbäcker 4bea219128 Status-API ()
Bo-Yi Wu fa2a513c62 feat: add download count field and unit testing for attachment. ()
* feat: add download count field and unit testing.

* fix: unit testing

* refactor: improve testing.

* fix: update comment

* add default value.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Lunny Xiao 2eeae84cbd Add internal routes for ssh hook comands ()
* add internal routes for ssh hook comands

* fix lint

* add comment on why package named private not internal but the route name is internal

* add comment above package private why package named private not internal but the route name is internal

* remove exp time on internal access

* move routes from /internal to /api/internal

* add comment and defer on UpdatePublicKeyUpdated
Kim "BKC" Carlbäcker d409d3ab57 Sanitation fix from Gogs ()
* Santiation fix from Gogs

* Linting

* Fix build-errors

* still not working

* Fix all the things!

* gofmt

* Add code-injection checks
Jonas be6edaddcb Repo size in admin panel ()
* Implementation of the feature to view repository size in admin panel
 * Move GetRepoSize to git module
 * Repository.RepoSize -> Repository.Size
 * RepoSize -> Size in template
 * Redo a few bits and pieces
 * Update size when syncing mirror or forking
 * Remove GetRepoSize
 * Changed fatal errors to error message

* Copy migration code from Gogs

* make fmt
Jonas 54f0293f0a Mirror sync interval specified as duration string ()
* Sync interval specifed as duration string

* Changed mirror interval text

* make fmt

* Add MinInterval for mirror sync

* Use duration internally

* Changed min default to 10m

* make fmt

* Incorrect default

* Removed defaults in MustDuration()

* Add Mirror interval migration

* Default values corrected

* Use transaction during migration

* Change http 500 to page with error message

* Cleanup session.commit()
Lunny Xiao 5c0bee9b20 refactor update ssh key use time ()
Lunny Xiao 5acfc7c4bc fix migrate failed and org dashboard failed on MSSQL database ()
Jonas e7493e953f Corrected Mirror.NextUpdate not set ()
Kuba Tyszko 5d6b71fdbb fixes pull request hanging indefinitely when it contains normal and LFS file pointers ()
Andrey Nering 37a34c1a28 Merge pull request from andreynering/notification/issue-watch
[Notifications Step 6] Per issue/PR watch/unwatch
Andrey Nering f6e5ce65b2 Improve tests a little
Andrey Nering e5c56fe30d Code style fixes
agrn 88112a5324 Fix "Error: No issue number specified" when pushing ()
* Fix "Error: No issue number specified"  when pushing

* update pr
Mura Li 6a39250579 Add length check for the return string ()
* Add length check for the return string

* Differentiate error paths and logging messages

* Rectify error message
Andrey Nering e6781d5488 Add unit tests for issue_watch
Andrey Nering a90ffffb1a Use variables for times
Andrey Nering 18952c40f8 Add copyright headers
Andrey Nering caed86fc6e Fix lint
Andrey Nering cb362513f0 Add updated_unix column on issue_watch
Andrey Nering aa6e949b3d Consider issue_watchers while sending notifications
Andrey Nering b674460748 Add watch button on issue
Andrey Nering a0d0de7233 Create issue_watch table
Bo-Yi Wu 08f7fded3c refactor: remove workaround after the golang 1.7 release. ()
* refactor: remove workaround after the golang 1.7 release.

* remove unused import.

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

* refactor: Add remove function.

* refactor: rename

* refactor: update build flag
Philippe Kueck fe94032f74 rewrite pre-commit, post-commit and options hooks (fixes ) ()
* issue , replace {pre,post}-receive and update hooks with a single shell script that does not require custom hooks to be a sh-script

* issue , make script posix compilant

* v23, add migration script to update {pre,post}-receive and update hooks

* migration: use a more common name and rename v23 to v26 to avoid conflicts

* gofmt'ed and added copyright header

* fix SyncRepositoryHooks to also sync wiki repos
Lunny Xiao d330a23ce1 fix migration failed when authorized_keys is not exist ()
Kim "BKC" Carlbäcker d349f059af Cleaner IMO ()
Antoine GIRARD 14fe9010ae GPG commit validation ()
* GPG commit validation

* Add translation

+ some little fix

* Move hash calc after retrieving of potential key + missing translation

* Add some little test
Sandro Santilli f73e734411 Run "make fmt" with go-1.6 ()
Lunny Xiao 888dee3b5f fix delete user failed on sqlite ()
Lunny Xiao bd8fe49076 fix wiki bugs ()
Sandro Santilli 9182a35f18 Show user OpenID URIs in their profile ()
Lunny Xiao 608cd54a68 fix gpg wrong column types
Bo-Yi Wu 1c3bd436cc feat: Only use issue and wiki on repo. ()
Sandro Santilli 71d16f69ff Login via OpenID-2.0 ()
Lunny Xiao 3cf0e513e6 fix wrong log when push to a new branch ()
Sandro Santilli 447c9b428f Send notifications to partecipants in issue comments ()
* Send notifications to partecipants in issue comments

Closes 

Includes test (still failing)

* Do not include "labelers" to participants

Fix test to expect what GetParticipants return
Antoine GIRARD ca1c3f1926 Implement GPG api ()
* Implement GPG API

* Better handle error

* Apply review recommendation + simplify database operations

* Remove useless comments
Ethan Koenig 09fe4a2ae9 Batch updates for issues ()
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ ()
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment ()
Sandro Santilli 8746fb3385 Fix migration comment ()
Lunny Xiao 1ccdf19fae fix forget migration for wiki hooks ()
Sandro Santilli 0475e7351f Reserve the "explore" user/org name ()
Ethan Koenig c99e7e1a62 Simplify RepositoryList.loadAttributes() ()
Ethan Koenig 3803f257fb Move user_follow to separate file ()
Also add unit tests
Ethan Koenig 1e3548b7e7 Unit tests for issue_list ()
Philippe Kueck e2b2fd6e78 fix , commit messages containing a pipe ()
Lunny Xiao 74cde12677 Fix upgrade failed after ever rollback ()
* fix upgrade failed after rollback

* fix upgrade failed after rollback

* fix possible upgrade twice fail after rollback
Lunny Xiao f5476bdbb1 bug fixed for delete repo failed ()
Lunny Xiao 5d40db629c fix random avatars ()
Lunny Xiao 2215840363 fix avatar bug ()
This PR fix the avatar bug described in . This will fix random avatar is blank problem and potential delete avatars dir problem.
Lunny Xiao 0376029241 fix del org avatar potential delete all avtars ()
Lunny Xiao 7b64b2ddab fix install submit crash caused by xorm log ()
Bo-Yi Wu d76d67de23 feat: expose url field on issue api. ()
* Add api url func.

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

* fix: Add unit testing.

* fix: conflicts

* fix: remove trim

* fix: revert test function name.
Lunny Xiao ef13bbaf7d Don't rewrite non-gitea public keys ()
* don't rewrite non-gitea public keys

* add comment for public key
Lunny Xiao 9cb08a3cf5 fix wrong num of user repos because of duplicated click delete button & performance optimization ()
Ethan Koenig d21d5fd736 Remove unnecessary loads in org_team ()
Ethan Koenig 22f7aa6e9c LableIDs -> LabelIDs ()
Bo-Yi Wu e83c8afc56 refactor: move SearchRepositoryByName testing. ()
Lunny Xiao c2eef171ff fix some typos ()
Ethan Koenig 4b286f282a Consistency checks for action unit tests ()
Ethan Koenig cf80e19157 Optimize and unit test Issue_ReplaceLabels ()
Ethan Koenig 136e6beb0f Fix unused Engine bugs ()
Lunny Xiao e4134debd1 Remove unused vars ()
* remove unused vars

* remove unused comment
Lunny Xiao 32faec00e6 move all repo list functions as a standalone file ()
Lunny Xiao d4e38cf129 fix setMerged for remove unnecessary db connection ()
Lunny Xiao 522f194983 Bug fixed for org avatar caused by ()
* bug fixed for org avatar caused by 

* use isfile only
Bo-Yi Wu 95574a3640 fix: Admin can see all private repositories on Explore page. ()
* fix: Admin can see all private repositories on Explore page.

* refactor: fix session
Sandro Santilli bf24099114 Allow migrating installations with no local avatars ()
Lunny Xiao 80f900ebae Fix avatar enumable ()
* fix avatar enumable

* fix import style
Lunny Xiao 19b3c45ca7 fix 500 when use a duplicat email instead of giving an error tip ()
Lunny Xiao cd1821a7e2 Move push update to post-receive and protected branch check to pre-receive ()
* move all push update to git hook post-receive and protected branch check to git hook pre-receive

* add SSH_ORIGINAL_COMMAND check back

* remove all unused codes

* fix the import
Lunny Xiao e8e56da9ac fix ()
Andrey Nering ddb0287bf6 Merge pull request from andreynering/api-repo-mirror
Add "mirror" field to repo API
Lunny Xiao fc4f7e82f9 refactor for searching user ()
* refactor for searching user

* fix like bug

* better format for builder cond
Andrey Nering 946f3078d3 Add "mirror" field to repo API
Bo-Yi Wu f1412142e0 refactor: repo counts for SearchRepositoryByName func ()
Lunny Xiao c0ea3963be fix delete repo will hang on postgres ()
Andrew Boyarshin 0602a44b27 Fix URL handling in the whole markdown module, improve test coverage ()
Amended with string to bool change in API SDK.

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>