Skip to content

Commit c3e011d

Browse files
committed
Merge tag 'v1.10.0' into wild/v1.10
* BREAKING * Fix deadline on update issue or PR via API (go-gitea#8698) * Hide some user information via API if user doesn't have enough permission (go-gitea#8655) (go-gitea#8657) * Remove legacy handling of drone token (go-gitea#8191) * Change repo search to use exact match for topic search. (go-gitea#7941) * Add pagination for admin api get orgs and fix only list public orgs bug (go-gitea#7742) * Implement the ability to change the ssh port to match what is in the gitea config (go-gitea#7286) * SECURITY * Ignore mentions for users with no access (go-gitea#8395) * Be more strict with git arguments (go-gitea#7715) * reserve .well-known username (go-gitea#7637) * FEATURE * Org/Members: display 2FA members states + optimize sql requests (go-gitea#7621) * SetDefaultBranch on pushing to empty repository (go-gitea#7610) * Adds side-by-side diff for images (go-gitea#6784) * API method to list all commits of a repository (go-gitea#6408) * Password Complexity Checks (go-gitea#6230) * Add option to initialize repository with labels (go-gitea#6061) * Add additional password hash algorithms (go-gitea#6023) * BUGFIXES * Allow to merge if file path contains " or \ (go-gitea#8629) (go-gitea#8771) * On windows set core.longpaths true (go-gitea#8776) (go-gitea#8786) * Fix 500 when edit hook (go-gitea#8782) (go-gitea#8789) * Fix Checkbox at RepoSettings Protected Branch (go-gitea#8799) (go-gitea#8801) * Fix SSH2 conditional in key parsing code (go-gitea#8806) (go-gitea#8810) * Fix commit expand button to not go to commit link (go-gitea#8745) (go-gitea#8825) * Fix new user form for non-local users (go-gitea#8826) (go-gitea#8828) * Fix to close opened io resources as soon as not needed (go-gitea#8839) (go-gitea#8846) * Fix edit content button on migrated issue content (go-gitea#8877) (go-gitea#8884) * Fix require external registration password (go-gitea#8885) (go-gitea#8890) * Fix password complexity check on registration (go-gitea#8887) (go-gitea#8888) * Update Github Migration Tests (go-gitea#8896) (go-gitea#8938) (go-gitea#8945) * Fix issue with user.fullname (go-gitea#8903) * Enable punctuations ending mentions (go-gitea#8889) (go-gitea#8894) * Add Close() method to gogitRepository (go-gitea#8901) (go-gitea#8956) * Hotfix for review actions and notifications (go-gitea#8965) * Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (go-gitea#8528) (go-gitea#8618) * Fix milestone close timestamp (go-gitea#8728) (go-gitea#8730) * Fix 500 when getting user as unauthenticated user (go-gitea#8653) (go-gitea#8663) * Fix 'New Issue Missing Milestone Comment' (go-gitea#8678) (go-gitea#8681) * Use AppSubUrl for more redirections (go-gitea#8647) (go-gitea#8651) * Add SubURL to redirect path (go-gitea#8632) (go-gitea#8634) * Fix template error on account page (go-gitea#8562) (go-gitea#8622) * Allow externalID to be UUID (go-gitea#8551) (go-gitea#8624) * Prevent removal of non-empty emoji panel following selection of duplicate (go-gitea#8609) (go-gitea#8623) * Update heatmap fixtures to restore tests (go-gitea#8615) (go-gitea#8616) * Ensure that diff stats can scroll independently of the diff (go-gitea#8581) (go-gitea#8621) * Webhook: set Content-Type for application/x-www-form-urlencoded (go-gitea#8600) * Fix go-gitea#8582 by handling empty repos (go-gitea#8587) (go-gitea#8594) * Fix bug on pull requests when transfer head repository (go-gitea#8564) (go-gitea#8569) * Add missed close in ServeBlobLFS (go-gitea#8527) (go-gitea#8542) * Ensure that GitRepo is set on Empty repositories (go-gitea#8539) (go-gitea#8541) * Fix migrate mirror 500 bug (go-gitea#8526) (go-gitea#8530) * Fix password complexity regex for special characters (go-gitea#8524) * Prevent .code-view from overriding font on icon fonts (go-gitea#8614) (go-gitea#8627) * Allow more than 255 characters for tokens in external_login_user table (go-gitea#8554) * Fix errors in create org UI regarding team access permission (go-gitea#8506) * Fix bug on FindExternalUsersByProvider (go-gitea#8504) * Create .ssh dir as necessary (go-gitea#8486) * IsBranchExist: return false if provided name is empty (go-gitea#8485) * Making openssh listen on SSH_LISTEN_PORT not SSH_PORT (go-gitea#8477) * Add check for empty set when dropping indexes during migration (go-gitea#8471) * LFS files are relative to LFS content path, ensure that when deleting they are made relative to this (go-gitea#8455) * Ensure Request Body Readers are closed in LFS server (go-gitea#8454) * Fix template bug on mirror repository setting page (go-gitea#8438) * Fix migration v96 to keep issue attachments (go-gitea#8435) * Update strk.kbt.io/projects/go/libravatar to latest (go-gitea#8429) * Singular form for files that has only one line (go-gitea#8416) * Check for either escaped or unescaped wiki filenames (go-gitea#8408) * Allow users with explicit read access to give approvals (go-gitea#8382) * Fix editor commit to new branch if PR disabled (go-gitea#8375) * readd .markdown class to all markup renderers (go-gitea#8357) * Upgrade xorm to v0.7.9 to fix some bugs (go-gitea#8354) * Fix column name ambiguity in GetUserIssueStats() (go-gitea#8347) * Change general form binding to gogs form (go-gitea#8334) * Fix pull request commit status in user dashboard list (go-gitea#8321) * Fix repo_admin_change_team_access always checked in org settings (go-gitea#8319) * Update to github.com/lafriks/xormstore@v1.3.0 (go-gitea#8317) * Show correct commit status in PR list (go-gitea#8316) * Bugfix for image compare and minor improvements to image compare (go-gitea#8289) * Update xorm (go-gitea#8286) * Fix API for edit and delete release attachment (go-gitea#8285) * Fix nil object access in some conditions when parsing cross references (go-gitea#8281) * Fix label count (go-gitea#8267) * Only show teams access for organization repositories on collaboration setting page (go-gitea#8265) * Test more reserved usernames (go-gitea#8263) * Rewrite reference processing code in preparation for opening/closing from comment references (go-gitea#8261) * Fix assets key on release webhook (go-gitea#8253) * Allow registration when button is hidden (go-gitea#8237) * Fix release API URL generation (go-gitea#8234) * Fix milestone num_issues (go-gitea#8221) * MS Teams webhook misses commit messages (go-gitea#8209) * Fix data race (go-gitea#8204) * Fix team user api (go-gitea#8172) * Fix pull merge 500 error caused by git-fetch breaking behaviors (go-gitea#8161) * Make show private icon when repo avatar set (go-gitea#8144) * Add reviewers as participants (go-gitea#8121) * Fix Go 1.13 private repository go get issue (go-gitea#8112) * feat: highlight issue references with : (go-gitea#8101) * Make AllowedUsers configurable in sshd_config (go-gitea#8094) * Strict name matching for Repository.GetTagID() (go-gitea#8074) * Avoid ambiguity of branch/directory names for the git-diff-tree command (go-gitea#8066) * Add change title notification for issues (go-gitea#8061) * [ssh] fix the config specification in the authorized_keys template (go-gitea#8031) * Fix reading git notes from nested trees (go-gitea#8026) * Fixes synchronize tags to releases for repository - makes sure we are only getting tag refs (go-gitea#7990) * Fix adding default Telegram webhook (go-gitea#7972) * Run CORS handler first for /api routes (go-gitea#7967) * Abort synchronization from LDAP source if there is some error. (go-gitea#7960) * Fix wrong sender when send slack webhook (go-gitea#7918) * Fix bug when migrating a private repository (go-gitea#7917) * Evaluate emojis in commit messages in list view (go-gitea#7906) * Fix upload file type check (go-gitea#7890) * lfs/lock: round locked_at timestamp to second (go-gitea#7872) * fix non existent milestone with 500 error instead of 404 (go-gitea#7867) * gpg/bugfix: Use .ExpiredUnix.IsZero to display green color of forever valid gpg key (go-gitea#7846) * Fix duplicate call of webhook (go-gitea#7821) * Enable switching to a different source branch when PR already exists (go-gitea#7819) * Convert files to utf-8 for indexing (go-gitea#7814) * Do not fetch all refs in pull-request compare (go-gitea#7797) * Fix multiple bugs with statuses endpoints at API (go-gitea#7785) * Restore functionality for early gits (go-gitea#7775) * Fix Slack webhook fork message (go-gitea#7774) * Rewrite existing repo units if setting is not included in api body (go-gitea#7763) * Fix rename failed when rewrite public keys (go-gitea#7761) * Fix approvals counting (go-gitea#7757) * Add migration step to remove old repo_indexer_status orphaned records (go-gitea#7746) * Fix repo_index_status lingering when deleting a repository (go-gitea#7734) * Remove camel case tokenization from repo indexer (go-gitea#7733) * Fix milestone completness calculation when migrating (go-gitea#7725) * Regression: Include "executable" files in the index, as they are not necessarily … (go-gitea#7718) * Fixes indexed repos keeping outdated indexes when files grow too large (go-gitea#7712) * Skip non-regular files (e.g. submodules) on repo indexing (go-gitea#7711) * Fix dropTableColumns sqlite implementation (go-gitea#7710) * Update gopkg.in/src-d/go-git.v4 to v4.13.1 (go-gitea#7705) * improve branches list performance and fix protected branch icon when no-login (go-gitea#7695) * Correct wrong datetime format for git (go-gitea#7689) * Move add to hook queue for created repo to outside xorm session. (go-gitea#7675) * sugestion to use range .Branches (go-gitea#7674) * Fix bug on migrating milestone from github (go-gitea#7665) * hide delete/restore button on archived repos (go-gitea#7658) * css: use flex to fix floating paginate (go-gitea#7656) * Fix syntax highlight initialization (go-gitea#7617) * Fix panic on push at - Merging pull request causes 500 error (go-gitea#7615) * Make PKCS8, PEM and SSH2 keys work (go-gitea#7600) * Fix mistake in arc-green.less split-diff css code. (go-gitea#7587) * Handle ErrUserProhibitLogin in http git (go-gitea#7586) * Fix bug create/edit wiki pages when code master branch protected (go-gitea#7580) * Fixes Malformed URLs in API git/commits response (go-gitea#7565) * Fix file header overflow in file and blame views (go-gitea#7562) * Improve SSH key parser to handle newlines in keys (go-gitea#7522) * Fix empty commits now showing in repo overview (go-gitea#7521) * Fix repository's pull request count error (go-gitea#7518) * Fix markdown invoke sequence (go-gitea#7513) * Remove duplicated webhook trigger (go-gitea#7511) * Update User.NumRepos atomically in createRepository (go-gitea#7493) * Fix settings page of repo you aren't admin print error - Settings pages giving UnitType error message (go-gitea#7482) * Fix redirection after file edit - Handles all redirects for Web UI File CRUD (go-gitea#7478) * cmd/serv: actually exit after fatal errors (go-gitea#7458) * Fix an issue with some pages throwing 'not defined' js exceptions (go-gitea#7450) * fix Dropzone.js integration (go-gitea#7445) * Fix regex for issues in commit messages (go-gitea#7444) * Diff: Fix indentation on unhighlighted code (go-gitea#7435) * Only show "New Pull Request" button if repo allows pulls (go-gitea#7426) * Upgrade macaron/captcha to fix random error problem (go-gitea#7407) * create class for inline positioned lists (go-gitea#7393) * Fetch refs for successful testing for tag (go-gitea#7388) * add missing template variable on organisation settings (go-gitea#7385) * fix post parameter - on issue list - unset assignee (go-gitea#7380) * fix/define autochecked checkboxes on issue list in firefox (go-gitea#7320) * only return head: null if source branch was deleted (go-gitea#6705) * ENHANCEMENT * Add nofollow to sign in links (go-gitea#8509) * vendor: update mvdan.cc/xurls/v2 to v2.1.0 (go-gitea#8495) * Update milestone issues numbers when save milestone and other code improvements (go-gitea#8411) * Add extra user information when migrating release (go-gitea#8331) * Require overall success if no context is given for status check (go-gitea#8318) * Transaction-aware retry create issue to cope with duplicate keys (go-gitea#8307) * Change link on issue milestone (go-gitea#8246) * Alwaywas return local url for users avatar (go-gitea#8245) * Move some milestone functions to a standalone package (go-gitea#8213) * Move create issue comment to comments package (go-gitea#8212) * Disable max height property of comment textarea (go-gitea#8203) * Add 'Mentioning you' group to /issues page (go-gitea#8201) * oauth2 with remote Gitea (go-gitea#8149) * Reference issues from pull requests and other issues (go-gitea#8137) * Fix webhooks to use proxy from environment (go-gitea#8116) * Add merged commit id on pull view when it's merged (go-gitea#8062) * Add teams to repo on collaboration page. (go-gitea#8045) * Update swagger to 0.20.1 (go-gitea#8010) * Make link last commit massages in repository home page and commit tables (go-gitea#8006) * Add API endpoint for accessing repo topics (go-gitea#7963) * Include description in repository search (go-gitea#7942) * Use gitea forked macaron (go-gitea#7933) * Fix pull creation with empty changes (go-gitea#7920) * Allow token as authorization for accessing attachments (go-gitea#7909) * Retry create issue to cope with duplicate keys (go-gitea#7898) * Move git diff codes from models to services/gitdiff (go-gitea#7889) * migrate gplus to google oauth2 provider (go-gitea#7885) * Remove unique filter from repo indexer analyzer. (go-gitea#7878) * Detect delimiter in CSV rendering (go-gitea#7869) * Import topics during migration (go-gitea#7851) * Move CreateReview to modules/pull (go-gitea#7841) * vendor: update pdf.js to v2.1.266 (go-gitea#7834) * Support SSH_LISTEN_PORT env var in docker app.ini template (go-gitea#7829) * Add Ability for User to Customize Email Notification Frequency (go-gitea#7813) * Move database settings from models to setting (go-gitea#7806) * Display ui time with customize time location (go-gitea#7792) * Implement webhook branch filter (go-gitea#7791) * Restrict repository indexing by glob match (go-gitea#7767) * Api: advanced settings for repository (external wiki, issue tracker etc.) (go-gitea#7756) * Update migrated repositories' issues/comments/prs poster id if user has a github external user saved (go-gitea#7751) * deps: Upgrade gopkg.in/editorconfig/editorconfig-core-go.v1 (go-gitea#7749) * Apply emoji on commit graph page (go-gitea#7743) * Add a lot of extension to language mappings for syntax highlights (go-gitea#7741) * Add SQL execution on log and indexes on table repository and comment (go-gitea#7740) * Set DB connection error level to error (go-gitea#7724) * Check commit message hashes before making links (go-gitea#7713) * remove unnecessary fmt on generate bindata (go-gitea#7706) * Fix specific highlighting (CMakeLists.txt ...) (go-gitea#7686) * Add file status on API (go-gitea#7671) * Add support for DEFAULT_ORG_MEMBER_VISIBLE (go-gitea#7669) * Provide links in commit summaries in commits table/view list (go-gitea#7659) * Change length of some repository's columns (go-gitea#7652) * Move commit repo action from models to repofiles package (go-gitea#7645) * fix wrong email when use gitea as OAuth2 provider (go-gitea#7640) * [Branch View] add download button (go-gitea#7604) * Update to xorm@v0.7.4 (go-gitea#7596) * use 403 instead of 401 for ErrUserProhibitLogin (go-gitea#7591) * Removed unnecessary conversions (go-gitea#7557) * Un-lambda base.FileSize (go-gitea#7556) * Added missing error checks in tests (go-gitea#7554) * Move create release from models to a standalone package (go-gitea#7539) * Make default branch name link to default branch (go-gitea#7519) * Added total count of contributions to heatmap (go-gitea#7517) * Move mirror to a standalone package from models (go-gitea#7486) * Move models.PushUpdate to repofiles.PushUpdate (go-gitea#7485) * Include thread related headers in issue/coment mail (go-gitea#7484) * Refuse merge until all required status checks success (go-gitea#7481) * convert all js var to let/const (go-gitea#7464) * Only create branches for opened pull requestes when migrating from github (go-gitea#7463) * jQuery 3 (go-gitea#7425) * Add notification placeholder (go-gitea#7409) * Search Commits via Commit Hash (go-gitea#7400) * Move status table to cron package (go-gitea#7370) * wiki - page revisions list (go-gitea#7369) * Display original author and URL information when showing migrated issues/comments (go-gitea#7352) * Refactor filetype is not allowed errors (go-gitea#7309) * switch to use gliderlabs/ssh for builtin server (go-gitea#7250) * Remove settting dependency on modules/session (go-gitea#7237) * Move all mail related codes from models to services/mailer (go-gitea#7200) * Support git.PATH entry in app.ini (go-gitea#6772) * Support setting cookie domain (go-gitea#6288) * Move migrating repository from frontend to backend (go-gitea#6200) * Delete releases attachments if release is deleted (go-gitea#6068) * TRANSLATION * Latvian translation for home page (go-gitea#8468) * Add home template italian translation (go-gitea#8352) * fix misprint (go-gitea#7452) * BUILD * use go 1.13 (go-gitea#8088) * MISC * add file line count info on UI (go-gitea#8396) * Make issues page left menu 100% width and add reponame as title attribute (go-gitea#8359) * [arc-green] white on hover for active menu items (go-gitea#8344) * Move ref (branch or tag) location on issue list page (go-gitea#8157) * apply emoji on dashboard issue list labels (go-gitea#8156) * 1148: Take up the full width when viewing the diff in split view. (go-gitea#8114) * Display description of 'make this repo private' as help text, not as tooltip (go-gitea#8097) * Fixes deformed emoji in pull request reviews (go-gitea#8047) * Add strike to old header on comment (go-gitea#8046) * Add tooltip for the visibility checkbox in /repo/create (go-gitea#8025) * Update github.com/lafriks/xormstore and tidy up mod.go (go-gitea#8020) * keep blame view buttons sequence consistent with normal view when view a file (go-gitea#8007) * Use "Pull Request" instead of "Merge Request" (go-gitea#8003) * Move line number to :before attr to hide from search on browser (go-gitea#8002) * Changed black color to white for (read) number label on issue list page (go-gitea#8000) * [Branch View] show "New Pull Request" Button only if posible (go-gitea#7977) * Fix hook problem by only setting the git environment variables if we are passed them (go-gitea#7854) * Prevent Commit Status and Message From Overflowing On Branch Page (go-gitea#7800) * Fix global search result CSS, misc CSS tweaks (go-gitea#7789) * Tweak label border CSS (go-gitea#7739) * Fix create menu item widths (go-gitea#7708) * Extract the username and password from the mirror url (go-gitea#7651) * [Branch View] Delete duplicate protection symbol (go-gitea#7624) * [Branch View] Delete Table Header (go-gitea#7622) * [Branch View] icons to buttons (go-gitea#7602) * update js dependencies (go-gitea#7462) * Add Extra Info to Branches Page (go-gitea#7461) * Bump lodash from 4.17.11 to 4.17.14 (go-gitea#7459) * wiki history improvements (go-gitea#7391) * ui fixes - compare view and archieved repo issues (go-gitea#7345) * dark theme scrollbars (go-gitea#7269) * wiki - editor - add buttons 'inline code', 'empty checkbox', 'checked checkbox' (go-gitea#7243) * Fix Statuses API only shows first 10 statuses: Add paging and extend API GetCommitStatuses (go-gitea#7141)
2 parents addb45f + 9619ccf commit c3e011d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+635
-431
lines changed

CHANGELOG.md

+41-21
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,43 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7-
## [1.10.0-RC2](https://github.com/go-gitea/gitea/releases/tag/v1.10.0-rc2) - 2019-10-30
7+
## [1.10.0](https://github.com/go-gitea/gitea/releases/tag/v1.10.0) - 2019-11-13
88
* BREAKING
99
* Fix deadline on update issue or PR via API (#8698)
1010
* Hide some user information via API if user doesn't have enough permission (#8655) (#8657)
11+
* Remove legacy handling of drone token (#8191)
12+
* Change repo search to use exact match for topic search. (#7941)
13+
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742)
14+
* Implement the ability to change the ssh port to match what is in the gitea config (#7286)
15+
* SECURITY
16+
* Ignore mentions for users with no access (#8395)
17+
* Be more strict with git arguments (#7715)
18+
* reserve .well-known username (#7637)
19+
* FEATURE
20+
* Org/Members: display 2FA members states + optimize sql requests (#7621)
21+
* SetDefaultBranch on pushing to empty repository (#7610)
22+
* Adds side-by-side diff for images (#6784)
23+
* API method to list all commits of a repository (#6408)
24+
* Password Complexity Checks (#6230)
25+
* Add option to initialize repository with labels (#6061)
26+
* Add additional password hash algorithms (#6023)
1127
* BUGFIXES
28+
* Allow to merge if file path contains " or \ (#8629) (#8771)
29+
* On windows set core.longpaths true (#8776) (#8786)
30+
* Fix 500 when edit hook (#8782) (#8789)
31+
* Fix Checkbox at RepoSettings Protected Branch (#8799) (#8801)
32+
* Fix SSH2 conditional in key parsing code (#8806) (#8810)
33+
* Fix commit expand button to not go to commit link (#8745) (#8825)
34+
* Fix new user form for non-local users (#8826) (#8828)
35+
* Fix to close opened io resources as soon as not needed (#8839) (#8846)
36+
* Fix edit content button on migrated issue content (#8877) (#8884)
37+
* Fix require external registration password (#8885) (#8890)
38+
* Fix password complexity check on registration (#8887) (#8888)
39+
* Update Github Migration Tests (#8896) (#8938) (#8945)
40+
* Fix issue with user.fullname (#8903)
41+
* Enable punctuations ending mentions (#8889) (#8894)
42+
* Add Close() method to gogitRepository (#8901) (#8956)
43+
* Hotfix for review actions and notifications (#8965)
1244
* Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (#8528) (#8618)
1345
* Fix milestone close timestamp (#8728) (#8730)
1446
* Fix 500 when getting user as unauthenticated user (#8653) (#8663)
@@ -29,22 +61,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
2961
* Fix password complexity regex for special characters (#8524)
3062
* Prevent .code-view from overriding font on icon fonts (#8614) (#8627)
3163
* Allow more than 255 characters for tokens in external_login_user table (#8554)
32-
33-
## [1.10.0-RC1](https://github.com/go-gitea/gitea/releases/tag/v1.10.0-rc1) - 2019-10-14
34-
* BREAKING
35-
* Remove legacy handling of drone token (#8191)
36-
* Change repo search to use exact match for topic search. (#7941)
37-
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742)
38-
* Implement the ability to change the ssh port to match what is in the gitea config (#7286)
39-
* FEATURE
40-
* Org/Members: display 2FA members states + optimize sql requests (#7621)
41-
* SetDefaultBranch on pushing to empty repository (#7610)
42-
* Adds side-by-side diff for images (#6784)
43-
* API method to list all commits of a repository (#6408)
44-
* Password Complexity Checks (#6230)
45-
* Add option to initialize repository with labels (#6061)
46-
* Add additional password hash algorithms (#6023)
47-
* BUGFIXES
4864
* Fix errors in create org UI regarding team access permission (#8506)
4965
* Fix bug on FindExternalUsersByProvider (#8504)
5066
* Create .ssh dir as necessary (#8486)
@@ -244,10 +260,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
244260
* Support setting cookie domain (#6288)
245261
* Move migrating repository from frontend to backend (#6200)
246262
* Delete releases attachments if release is deleted (#6068)
247-
* SECURITY
248-
* Ignore mentions for users with no access (#8395)
249-
* Be more strict with git arguments (#7715)
250-
* reserve .well-known username (#7637)
251263
* TRANSLATION
252264
* Latvian translation for home page (#8468)
253265
* Add home template italian translation (#8352)
@@ -289,6 +301,14 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
289301
* wiki - editor - add buttons 'inline code', 'empty checkbox', 'checked checkbox' (#7243)
290302
* Fix Statuses API only shows first 10 statuses: Add paging and extend API GetCommitStatuses (#7141)
291303

304+
## [1.9.6](https://github.com/go-gitea/gitea/releases/tag/v1.9.6) - 2019-11-13
305+
* BUGFIXES
306+
* Allow to merge if file path contains " or \ (#8629) (#8772)
307+
* Fix 500 when edit hook (#8782) (#8790)
308+
* Fix issue with user.fullname (#8904)
309+
* Update Github Migration Test (#8897) (#8946)
310+
* Add Close() method to gogitRepository (#8901) (#8958)
311+
292312
## [1.9.5](https://github.com/go-gitea/gitea/releases/tag/v1.9.5) - 2019-10-30
293313
* BREAKING
294314
* Hide some user information via API if user doesn't have enough permission (#8655) (#8658)

cmd/admin.go

+3
Original file line numberDiff line numberDiff line change
@@ -375,17 +375,20 @@ func runRepoSyncReleases(c *cli.Context) error {
375375

376376
if err = models.SyncReleasesWithTags(repo, gitRepo); err != nil {
377377
log.Warn(" SyncReleasesWithTags: %v", err)
378+
gitRepo.Close()
378379
continue
379380
}
380381

381382
count, err = getReleaseCount(repo.ID)
382383
if err != nil {
383384
log.Warn(" GetReleaseCountByRepoID: %v", err)
385+
gitRepo.Close()
384386
continue
385387
}
386388

387389
log.Trace(" repo %s releases synchronized to tags: from %d to %d",
388390
repo.FullName(), oldnum, count)
391+
gitRepo.Close()
389392
}
390393
}
391394

docs/content/doc/advanced/migrations.en-us.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ type Uploader interface {
6868
CreateComment(issueNumber int64, comment *Comment) error
6969
CreatePullRequest(pr *PullRequest) error
7070
Rollback() error
71+
Close()
7172
}
7273

73-
```
74+
```

integrations/api_releases_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func TestAPICreateAndUpdateRelease(t *testing.T) {
5151

5252
gitRepo, err := git.OpenRepository(repo.RepoPath())
5353
assert.NoError(t, err)
54+
defer gitRepo.Close()
5455

5556
err = gitRepo.CreateTag("v0.0.1", "master")
5657
assert.NoError(t, err)
@@ -112,6 +113,7 @@ func TestAPICreateReleaseToDefaultBranchOnExistingTag(t *testing.T) {
112113

113114
gitRepo, err := git.OpenRepository(repo.RepoPath())
114115
assert.NoError(t, err)
116+
defer gitRepo.Close()
115117

116118
err = gitRepo.CreateTag("v0.0.1", "master")
117119
assert.NoError(t, err)

integrations/api_repo_file_create_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func TestAPICreateFile(t *testing.T) {
139139
assert.EqualValues(t, expectedFileResponse.Commit.HTMLURL, fileResponse.Commit.HTMLURL)
140140
assert.EqualValues(t, expectedFileResponse.Commit.Author.Email, fileResponse.Commit.Author.Email)
141141
assert.EqualValues(t, expectedFileResponse.Commit.Author.Name, fileResponse.Commit.Author.Name)
142+
gitRepo.Close()
142143
}
143144

144145
// Test creating a file in a new branch

integrations/api_repo_file_update_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func TestAPIUpdateFile(t *testing.T) {
143143
assert.EqualValues(t, expectedFileResponse.Commit.HTMLURL, fileResponse.Commit.HTMLURL)
144144
assert.EqualValues(t, expectedFileResponse.Commit.Author.Email, fileResponse.Commit.Author.Email)
145145
assert.EqualValues(t, expectedFileResponse.Commit.Author.Name, fileResponse.Commit.Author.Name)
146+
gitRepo.Close()
146147
}
147148

148149
// Test updating a file in a new branch

integrations/api_repo_get_contents_list_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) {
7474
repo1.CreateNewBranch(user2, repo1.DefaultBranch, newBranch)
7575
// Get the commit ID of the default branch
7676
gitRepo, _ := git.OpenRepository(repo1.RepoPath())
77+
defer gitRepo.Close()
78+
7779
commitID, _ := gitRepo.GetBranchCommitID(repo1.DefaultBranch)
7880
// Make a new tag in repo1
7981
newTag := "test_tag"

integrations/api_repo_get_contents_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ func testAPIGetContents(t *testing.T, u *url.URL) {
7575
repo1.CreateNewBranch(user2, repo1.DefaultBranch, newBranch)
7676
// Get the commit ID of the default branch
7777
gitRepo, _ := git.OpenRepository(repo1.RepoPath())
78+
defer gitRepo.Close()
79+
7880
commitID, _ := gitRepo.GetBranchCommitID(repo1.DefaultBranch)
7981
// Make a new tag in repo1
8082
newTag := "test_tag"

integrations/api_repo_git_tags_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ func TestAPIGitTags(t *testing.T) {
2929
git.NewCommand("config", "user.email", user.Email).RunInDir(repo.RepoPath())
3030

3131
gitRepo, _ := git.OpenRepository(repo.RepoPath())
32+
defer gitRepo.Close()
33+
3234
commit, _ := gitRepo.GetBranchCommit("master")
3335
lTagName := "lightweightTag"
3436
gitRepo.CreateTag(lTagName, commit.ID.String())

integrations/repofiles_delete_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func testDeleteRepoFile(t *testing.T, u *url.URL) {
7373
test.LoadRepoCommit(t, ctx)
7474
test.LoadUser(t, ctx, 2)
7575
test.LoadGitRepo(t, ctx)
76+
defer ctx.Repo.GitRepo.Close()
7677
repo := ctx.Repo.Repository
7778
doer := ctx.User
7879
opts := getDeleteRepoFileOptions(repo)
@@ -111,6 +112,8 @@ func testDeleteRepoFileWithoutBranchNames(t *testing.T, u *url.URL) {
111112
test.LoadRepoCommit(t, ctx)
112113
test.LoadUser(t, ctx, 2)
113114
test.LoadGitRepo(t, ctx)
115+
defer ctx.Repo.GitRepo.Close()
116+
114117
repo := ctx.Repo.Repository
115118
doer := ctx.User
116119
opts := getDeleteRepoFileOptions(repo)
@@ -139,6 +142,8 @@ func TestDeleteRepoFileErrors(t *testing.T) {
139142
test.LoadRepoCommit(t, ctx)
140143
test.LoadUser(t, ctx, 2)
141144
test.LoadGitRepo(t, ctx)
145+
defer ctx.Repo.GitRepo.Close()
146+
142147
repo := ctx.Repo.Repository
143148
doer := ctx.User
144149

integrations/repofiles_update_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ func TestCreateOrUpdateRepoFileForCreate(t *testing.T) {
191191
test.LoadRepoCommit(t, ctx)
192192
test.LoadUser(t, ctx, 2)
193193
test.LoadGitRepo(t, ctx)
194+
defer ctx.Repo.GitRepo.Close()
195+
194196
repo := ctx.Repo.Repository
195197
doer := ctx.User
196198
opts := getCreateRepoFileOptions(repo)
@@ -201,6 +203,8 @@ func TestCreateOrUpdateRepoFileForCreate(t *testing.T) {
201203
// asserts
202204
assert.Nil(t, err)
203205
gitRepo, _ := git.OpenRepository(repo.RepoPath())
206+
defer gitRepo.Close()
207+
204208
commitID, _ := gitRepo.GetBranchCommitID(opts.NewBranch)
205209
expectedFileResponse := getExpectedFileResponseForRepofilesCreate(commitID)
206210
assert.EqualValues(t, expectedFileResponse.Content, fileResponse.Content)
@@ -220,6 +224,8 @@ func TestCreateOrUpdateRepoFileForUpdate(t *testing.T) {
220224
test.LoadRepoCommit(t, ctx)
221225
test.LoadUser(t, ctx, 2)
222226
test.LoadGitRepo(t, ctx)
227+
defer ctx.Repo.GitRepo.Close()
228+
223229
repo := ctx.Repo.Repository
224230
doer := ctx.User
225231
opts := getUpdateRepoFileOptions(repo)
@@ -230,6 +236,8 @@ func TestCreateOrUpdateRepoFileForUpdate(t *testing.T) {
230236
// asserts
231237
assert.Nil(t, err)
232238
gitRepo, _ := git.OpenRepository(repo.RepoPath())
239+
defer gitRepo.Close()
240+
233241
commitID, _ := gitRepo.GetBranchCommitID(opts.NewBranch)
234242
expectedFileResponse := getExpectedFileResponseForRepofilesUpdate(commitID, opts.TreePath)
235243
assert.EqualValues(t, expectedFileResponse.Content, fileResponse.Content)
@@ -249,6 +257,8 @@ func TestCreateOrUpdateRepoFileForUpdateWithFileMove(t *testing.T) {
249257
test.LoadRepoCommit(t, ctx)
250258
test.LoadUser(t, ctx, 2)
251259
test.LoadGitRepo(t, ctx)
260+
defer ctx.Repo.GitRepo.Close()
261+
252262
repo := ctx.Repo.Repository
253263
doer := ctx.User
254264
opts := getUpdateRepoFileOptions(repo)
@@ -261,6 +271,8 @@ func TestCreateOrUpdateRepoFileForUpdateWithFileMove(t *testing.T) {
261271
// asserts
262272
assert.Nil(t, err)
263273
gitRepo, _ := git.OpenRepository(repo.RepoPath())
274+
defer gitRepo.Close()
275+
264276
commit, _ := gitRepo.GetBranchCommit(opts.NewBranch)
265277
expectedFileResponse := getExpectedFileResponseForRepofilesUpdate(commit.ID.String(), opts.TreePath)
266278
// assert that the old file no longer exists in the last commit of the branch
@@ -288,6 +300,8 @@ func TestCreateOrUpdateRepoFileWithoutBranchNames(t *testing.T) {
288300
test.LoadRepoCommit(t, ctx)
289301
test.LoadUser(t, ctx, 2)
290302
test.LoadGitRepo(t, ctx)
303+
defer ctx.Repo.GitRepo.Close()
304+
291305
repo := ctx.Repo.Repository
292306
doer := ctx.User
293307
opts := getUpdateRepoFileOptions(repo)
@@ -300,6 +314,8 @@ func TestCreateOrUpdateRepoFileWithoutBranchNames(t *testing.T) {
300314
// asserts
301315
assert.Nil(t, err)
302316
gitRepo, _ := git.OpenRepository(repo.RepoPath())
317+
defer gitRepo.Close()
318+
303319
commitID, _ := gitRepo.GetBranchCommitID(repo.DefaultBranch)
304320
expectedFileResponse := getExpectedFileResponseForRepofilesUpdate(commitID, opts.TreePath)
305321
assert.EqualValues(t, expectedFileResponse.Content, fileResponse.Content)
@@ -315,6 +331,8 @@ func TestCreateOrUpdateRepoFileErrors(t *testing.T) {
315331
test.LoadRepoCommit(t, ctx)
316332
test.LoadUser(t, ctx, 2)
317333
test.LoadGitRepo(t, ctx)
334+
defer ctx.Repo.GitRepo.Close()
335+
318336
repo := ctx.Repo.Repository
319337
doer := ctx.User
320338

models/graph_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ func BenchmarkGetCommitGraph(b *testing.B) {
1717
if err != nil {
1818
b.Error("Could not open repository")
1919
}
20+
defer currentRepo.Close()
2021

2122
for i := 0; i < b.N; i++ {
2223
graph, err := GetCommitGraph(currentRepo)

models/issue_comment.go

+16-5
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ func sendCreateCommentAction(e *xorm.Session, opts *CreateCommentOptions, commen
538538
switch opts.Type {
539539
case CommentTypeCode:
540540
if comment.ReviewID != 0 {
541+
// Hotfix for 1.10.0 as the Review object has not yet been committed in the other session
542+
if opts.Review != nil {
543+
comment.Review = opts.Review
544+
}
541545
if comment.Review == nil {
542546
if err := comment.loadReview(e); err != nil {
543547
return err
@@ -596,6 +600,12 @@ func sendCreateCommentAction(e *xorm.Session, opts *CreateCommentOptions, commen
596600
if err = opts.Issue.updateClosedNum(e); err != nil {
597601
return err
598602
}
603+
case CommentTypeReview:
604+
// Hotfix for 1.10.0; make sure a dashboard entry is created
605+
if opts.Content == "" {
606+
return nil
607+
}
608+
act.OpType = ActionCommentIssue
599609
}
600610
// update the issue's updated_unix column
601611
if err = updateIssueCols(e, opts.Issue, "updated_unix"); err != nil {
@@ -751,11 +761,12 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep
751761

752762
// CreateCommentOptions defines options for creating comment
753763
type CreateCommentOptions struct {
754-
Type CommentType
755-
Doer *User
756-
Repo *Repository
757-
Issue *Issue
758-
Label *Label
764+
Type CommentType
765+
Doer *User
766+
Repo *Repository
767+
Issue *Issue
768+
Label *Label
769+
Review *Review
759770

760771
DependentIssueID int64
761772
OldMilestoneID int64

models/migrations/v39.go

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func releaseAddColumnIsTagAndSyncTags(x *xorm.Engine) error {
4747
if err = models.SyncReleasesWithTags(repo, gitRepo); err != nil {
4848
log.Warn("SyncReleasesWithTags: %v", err)
4949
}
50+
gitRepo.Close()
5051
}
5152
if len(repos) < pageSize {
5253
break

models/migrations/v82.go

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ func fixReleaseSha1OnReleaseTable(x *xorm.Engine) error {
9191
if err != nil {
9292
return err
9393
}
94+
defer gitRepo.Close()
9495
gitRepoCache[release.RepoID] = gitRepo
9596
}
9697

models/pull.go

+5
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ func (pr *PullRequest) GetLastCommitStatus() (status *CommitStatus, err error) {
382382
if err != nil {
383383
return nil, err
384384
}
385+
defer headGitRepo.Close()
385386

386387
lastCommitID, err := headGitRepo.GetBranchCommitID(pr.HeadBranch)
387388
if err != nil {
@@ -571,6 +572,7 @@ func (pr *PullRequest) getMergeCommit() (*git.Commit, error) {
571572
if err != nil {
572573
return nil, fmt.Errorf("OpenRepository: %v", err)
573574
}
575+
defer gitRepo.Close()
574576

575577
commit, err := gitRepo.GetCommit(mergeCommit[:40])
576578
if err != nil {
@@ -955,6 +957,7 @@ func (pr *PullRequest) UpdatePatch() (err error) {
955957
if err != nil {
956958
return fmt.Errorf("OpenRepository: %v", err)
957959
}
960+
defer headGitRepo.Close()
958961

959962
// Add a temporary remote.
960963
tmpRemote := com.ToStr(time.Now().UnixNano())
@@ -996,6 +999,7 @@ func (pr *PullRequest) PushToBaseRepo() (err error) {
996999
if err != nil {
9971000
return fmt.Errorf("OpenRepository: %v", err)
9981001
}
1002+
defer headGitRepo.Close()
9991003

10001004
tmpRemoteName := fmt.Sprintf("tmp-pull-%d", pr.ID)
10011005
if err = headGitRepo.AddRemote(tmpRemoteName, pr.BaseRepo.RepoPath(), false); err != nil {
@@ -1185,6 +1189,7 @@ func checkForInvalidation(requests PullRequestList, repoID int64, doer *User, br
11851189
if err != nil {
11861190
log.Error("PullRequestList.InvalidateCodeComments: %v", err)
11871191
}
1192+
gitRepo.Close()
11881193
}()
11891194
return nil
11901195
}

0 commit comments

Comments
 (0)