Commit Graph

1746 Commits (f64c232953d13043b262dc8da55acb3738e58d15)

Author SHA1 Message Date
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>
Ethan Koenig 76057105ca Remove unnecessary loads in org_team ()
Ethan Koenig f1ab906c51 Unit tests for models/repo_collaboration ()
bit 490d3771f7 s/fields/terms ()
use terms instead of fields as variable name to avoid confusion: NewPhraseQuery(terms []string, field string)
Lunny Xiao d077fd084a added missing new struct sync ()
Lunny Xiao 0e6b9ea786 Take back control of hooks ()
* git: delegate all server-side Git hooks ()

* create hooks directories

* take control hooks back

* fix lint

* bug fixed and minor changes

* fix imports style

* fix migration scripts
Ethan Koenig 4f3880ff15 Bug fixes and unit tests for org_team ()
Ethan Koenig ec3a696e2d Fix lint errors
Lunny Xiao 1f7837d6d6 Refactor for issues loadattributes of a repository ()
* refactor for issues loadattributes of a repository

* refactors
Bo-Yi Wu 83b6d03231 fix: Wrong repo list on Explore page if user already loggin. ()
* fix: Wrong repo list on Explore page if user already loggin.

* fix: code readable.

* fix: declare variable
Willem van Dreumel 01d957677f Oauth2 consumer ()
* initial stuff for oauth2 login, fails on:
* login button on the signIn page to start the OAuth2 flow and a callback for each provider
Only GitHub is implemented for now
* show login button only when the OAuth2 consumer is configured (and activated)
* create macaron group for oauth2 urls
* prevent net/http in modules (other then oauth2)
* use a new data sessions oauth2 folder for storing the oauth2 session data
* add missing 2FA when this is enabled on the user
* add password option for OAuth2 user , for use with git over http and login to the GUI
* add tip for registering a GitHub OAuth application
* at startup of Gitea register all configured providers and also on adding/deleting of new providers
* custom handling of errors in oauth2 request init + show better tip
* add ExternalLoginUser model and migration script to add it to database
* link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed
* remove the linked external account from the user his settings
* if user is unknown we allow him to register a new account or link it to some existing account
* sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers)

* from gorilla/sessions docs:
"Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!"
(we're using gorilla/sessions for storing oauth2 sessions)

* use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
Denis Denisov fd941db246 Protected branches system ()
* Protected branches system

* Moved default branch to branches section (`:org/:reponame/settings/branches`).
* Initial support Protected Branch.
  - Admin does not restrict
  - Owner not to limit
  - To write permission restrictions

* reformat tmpl

* finished the UI and add/delete protected branch response

* remove unused comment

* indent all the template files and remove ru translations since we use crowdin

* fix the push bug
Willem van Dreumel 5f234ce2a5 add missing copyright header ()
Lunny Xiao 04fdeb9d8d Make Xorm log configurable ()
* make xorm log configable

* bug fixed for other sub commands except web

* rebase and fix xorm log

* bug fix for TrimSpace
Ethan Koenig be48b32e63 Unit tests for repo watching ()
Lunny Xiao 847527fd6d Fix all the bugs in issues and pulls on dashboard ()
* fix all the bugs in issues and pulls on dashboard

* small fix and refactor

* add method getRepoIDs for IssueList
Ethan Koenig 140967f002 Unit tests for repo redirects ()
Lunny Xiao 7fd14bf7bd optimization for team get repos ()
Lunny Xiao 46320f9630 refactor notificationsForUser since xorm In support slice of customerize type ()
Lunny Xiao 0642cb330c Small opitimization for getUserTeams ()
* Small opitimization for getUserTeams

* more compact
Bo-Yi Wu 43c94d0a6c test: Add testing for GetUserFork function ()
Bo-Yi Wu a31f64d639 fix: 500 error on /explore/repos page. ()
Bo-Yi Wu 9d2b830275 refactor: small optimize for sql query ()
* refactor: small optimize for sql query

* fix: get owner name if Searcher is not nil or user star page.
Lunny Xiao 837d346090 fix some older Gogs upgrade to Gitea ()
Lunny Xiao 9c645b54dc bug fixed on issues and pulls
Lunny Xiao 4cfde304df bug fixed for my repository ()
Lunny Xiao 7a9a5c8a69 Fix assigned issues dashboard ()
* Fix assigned/created issues in dashboard. ()

* Fix assigned/created issues in dashboard.

* Use GetUserIssueStats for getting all Dashboard stats.

* Use gofmt to format the file properly.

* Replace &Issue{} with new(Issue).

* Check if user has access to given repository.

* Remove unnecessary filtering of issues.

* Return 404 error if invalid repository is given.

* Use correct number of issues in paginater.

* fix issues on dashboard
Lunny Xiao 3a91ac51a9 fix bug of multiple forks ()
Bo-Yi Wu d67b278a0d feat: Able to disable non-admin to create new organization ()
Bo-Yi Wu 23aba523b5 feat: support search bar on star tab of user profile. ()
* feat: support search bar on star tab of user profile.

* fix: update testing.

* fix: Using loadAttributes

* fix: remove empty line.

* remove LOWER

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Lunny Xiao 7eb8daffa3 Use fingerprint to check instead content for public key ()
* use fingerprint to check instead content for public key

* add fingerprint field for ErrKeyAlreadyExist
Lunny Xiao 55ae78208e Small optimization for getTeamIDs ()
* small optimization for getTeamIDs

* rename getOrgTeamIDs to getUserTeamIDs and remove orderby
Bo-Yi Wu 1ec6b1a258 fix: gofmt error. ()
Bo-Yi Wu 5cc275b1de feat: add git version on admin panel. ()
Ethan Koenig 076f940f1f Fix logging bug
Error logged everytime an assignee was removed
Lunny Xiao d76f34ef51 small optimization for get issue labels
Andrew 3f67676059 Implement basic Open Graph support. ()
Lunny Xiao 8a0be5e9f0 Bug fixed for deleted label in issue comment ()
* bug fixed for deleted label in issue comment

* fix indent
Morgan Bazalgette 442145dbd3 Fix public activity showing private repos ()
* Fix public activity showing private repos ()

Signed-off-by: Morgan Bazalgette <the@howl.moe>

* error check after setting is_private to true

* Add test for UpdateRepository w/ visibility change
Andrew 42835c7f82 Implement archive cleanup ()
* Implement archive cleanup

Fixes 

Signed-off-by: Andrew <write@imaginarycode.com>

* Make sure to close the directory file

* Resolve issues noted by @strk

* edit cheatsheet app.ini [ci skip]

* oops [ci skip]
Lunny Xiao cf0f451c37 Add delete branch track on pull request comments ()
* add delete branch track on pull request comments

* don't change vendor
Lunny Xiao b6dd6210ea bug fixed for issue count ()
Ethan Koenig a6751cec04 Unit tests for issue_milestone ()
Ethan Koenig 13973348df Gogs -> Gitea ()
Ethan Koenig e6b4448ba3 Fix bug in Issue.GetIsRead ()
Ethan Koenig 181c8d9c99 Fix consistency check ()
Ethan Koenig d2329e1c26 Use assert in legacy unit tests ()
Ethan Koenig 5fbab97373 Fix broken test fixture ()
Bo-Yi Wu b13232f524 feat: support paginater on star tab of user profile. ()
Ethan Koenig ceae143e78 Consistency checks for unit tests ()
Bo-Yi Wu 71d35dae8c fix: wrong pages number which includes private repository count. ()
Ethan Koenig 438e1a7d46 Fix inconsistencies in unit test fixtures
Lunny Xiao f35b20b042 track issue title changes ()
Ethan Koenig 027591a3a5 Redirects for renamed repos ()
* Redirects for renamed repos

* Remove unused phrase from locales
Bwko bf647ce143 Check for manual merging of a pull request ()
When an open pull request got manually merged mark the pull request as
merged
Andrey Nering 7c3dc51655 Merge pull request from ethantkoenig/fix/remove_org_repo
Fix bug in removeOrgRepo
Ethan Koenig f82ea42679 Fix bug in removeOrgRepo
Ethan Koenig 5972aa9af3 Fix inconsistencies in test fixtures
Lunny Xiao 8a421b1fd7 Add units concept for modulable functions of a repository ()
* Add units concept for modulable functions of a repository

* remove unused comment codes & fix lints and tests

* remove unused comment codes

* use struct config instead of map

* fix lint

* rm wrong files

* fix tests
Ethan Koenig d0960b8035 Move IssueUser code to separate file ()
Also add unit tests
Andrey Nering d4035d1cb1 Merge pull request from appleboy/patch-2001
refactor: set default order by recently star on start tab
Bo-Yi Wu a90a215662 feat: Add search bar on user profile page. ()
Bo-Yi Wu b6da658553 test: Add user mail testing. ()
Lunny Xiao 3e0525b47d Track assignee for issue ()
* track assignee for issue

* fix lint

* use getUserByID instead Get
Ethan Koenig 68bdaf0a6b Drop redundant columns from issue_user table ()
Bo-Yi Wu e2de16065a refactor: set default order by recently star.
Gabriel Jackson bf6f61cc69 Cleanup log messaging
This change corrects a few logging issues:

 * Standardized formatting errors with '%v'.
 * Standardized failure warning word usage.
 * Corrected an instance of using the standard log library when
   the gitea log library should be used instead.
Bo-Yi Wu d7d094bd8a fix: ignore email notifications if user is not active. ()
Anton Skorokhod 79ab69fe30 Add X-GitHub-* headers for webhook to get clubhouse.io integration working ()
Lunny Xiao 081485ecfd add milestone changed traker on issue view ()
Ethan Koenig 10644d6dd7 Bug fixes and unit tests for models/issue_label ()
Ethan Koenig 0a02fb3c4f Windows compatibility for unit tests ()
Ethan Koenig 2eb15f4a61 Unit tests and remove unused functions in models/notification ()
* Unit tests and remove unused functions in models/notification

* Read -> Unread
Lunny Xiao f94869d2d1 Track labels changed on issue view & resolved ()
* track labels changed on issue view & resolved 

* add missing head comment & sort & fix refresh
Ethan Koenig 7765593018 Better settings for unit tests ()
Thomas Boerger 78535fb08e Allow custom public files ()
* Allow custom public files

* Gofmt code, lots of places not related to this pr
Andrey Nering cc31a21192 Merge pull request from andreynering/notifications-step-5
Notifications step 5
Andrey Nering 5348e8b71a Fix color: closed PR was showing as purple instead of red
Andrey Nering 31c717f579 Merge pull request from ethantkoenig/tests/wiki
Unit tests for models/wiki
Ethan Koenig bb76285762 Unit tests for models/wiki
Ethan Koenig a2412492da Unit tests and bug fix for models/org
Lunny Xiao bb5a6b7a07 fix xorm NewSession uncorrected usages ()
Bo-Yi Wu 25663b5816 refactor: Remove unnecessary type conversions ()
Ethan Koenig da1b6164fe Fix FIXME and remove superfluous queries in models/org ()