gitea/models/migrations
lengyuqu 078e2b2c39
Add support for corporate WeChat webhooks (#15910)
* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* Update templates/admin/hook_new.tmpl

Co-authored-by: a1012112796 <1012112796@qq.com>

* Update services/webhook/wechatwork.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* 修善wechatwork

* 修善wechatwork

* fix

* Update locale_cs-CZ.ini

fix

* fix build

* fix

* fix build

* make webhooks.zh-cn.md

* delet unnecessary blank line

* delet unnecessary blank line

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* Update templates/admin/hook_new.tmpl

Co-authored-by: a1012112796 <1012112796@qq.com>

* Update services/webhook/wechatwork.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* 修善wechatwork

* 修善wechatwork

* fix

* fix build

* fix

* fix build

* make webhooks.zh-cn.md

* delet unnecessary blank line

* delet unnecessary blank line

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix

* fix

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix wechat

* fix wechat

* fix wechat

* fix wechat

* Fix invalid params and typo of email templates (#16394)

Signed-off-by: Meano <meanocat@gmail.com>

* Add LRU mem cache implementation (#16226)

The current default memory cache implementation is unbounded in size and number of
objects cached. This is hardly ideal.

This PR proposes creating a TwoQueue LRU cache as the underlying cache for Gitea.
The cache is limited by the number of objects stored in the cache (rather than size)
for simplicity. The default number of objects is 50000 - which is perhaps too small
as most of our objects cached are going to be much less than 1kB.

It may be worth considering using a different LRU implementation that actively limits
sizes or avoids GC - however, this is just a beginning implementation.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* [skip ci] Updated translations via Crowdin

* Replace `plugins/docker` with `techknowlogick/drone-docker`in ci (#16407)

* plugins/docker -> techknowlogick/drone-docker

* It is multi-arch

* docs: rewrite email setup (#16404)

* Add intro for both the docs page and mailer methods
  * Fix numbering level in SMTP section
  * Recommends implicit TLS

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

* Validate Issue Index before querying DB (#16406)

* Fix external renderer (#16401)

* fix external renderer

* use GBackground context as fallback

* no fallback, return error

Co-authored-by: Lauris BH <lauris@nix.lv>

* Add checkbox to delete pull branch after successful merge (#16049)

* Add checkbox to delete pull branch after successful merge

* Omit DeleteBranchAfterMerge field in json

* Log a warning instead of error when PR head branch deleted

* Add DefaultDeleteBranchAfterMerge to PullRequestConfig

* Add support for delete_branch_after_merge via API

* Fix for API: the branch should be deleted from the HEAD repo

If head and base repo are the same, reuse the already opened ctx.Repo.GitRepo

* Don't delegate to CleanupBranch, only reuse branch deletion code

CleanupBranch contains too much logic that has already been performed by the Merge

* Reuse gitrepo in MergePullRequest

Co-authored-by: Andrew Thornton <art27@cantab.net>

* [skip ci] Updated translations via Crowdin

* Detect encoding changes while parsing diff (#16330)

* Detect encoding changes while parsing diff

* Let branch/tag name be a valid ref to get CI status (#16400)

* fix #16384#

* refactor: move shared helper func to utils package

* extend Tests

* use ctx.Repo.GitRepo if not nil

* fix

* fix

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix build

* fix build

* Apply suggestions from code review

Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: myheavily <myheavily>
Co-authored-by: zhaoxin <gitea@fake.local>
Co-authored-by: Meano <Meano@foxmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: GiteaBot <teabot@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Bagas Sanjaya <bagasdotme@gmail.com>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-23 12:41:27 +08:00
..
fixtures Create Proper Migration Tests (#15116) 2021-03-24 19:27:22 +01:00
migrations.go Add option to provide signature for a token to verify key ownership (#14054) 2021-07-13 15:28:07 +02:00
migrations_test.go Let package git depend on setting but not opposite (#15241) 2021-06-26 13:28:55 +02:00
testlogger_test.go Create Proper Migration Tests (#15116) 2021-03-24 19:27:22 +01:00
v70.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v71.go Use single shared random string generation function (#15741) 2021-05-10 07:45:17 +01:00
v72.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v73.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v74.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v75.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v76.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v77.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v78.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v79.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v80.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v81.go Upgrade xorm to v1.0.0 (#10646) 2020-03-22 11:12:55 -04:00
v82.go Migrations (v82,v96,v99,v136) remove dependencies (#12286) 2020-07-22 09:27:22 -05:00
v83.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v84.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v85.go Use single shared random string generation function (#15741) 2021-05-10 07:45:17 +01:00
v86.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v87.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v88.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v89.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v90.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v91.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v92.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v93.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v94.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v95.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v96.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v97.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v98.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v99.go Migrations (v82,v96,v99,v136) remove dependencies (#12286) 2020-07-22 09:27:22 -05:00
v100.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v101.go Allow more than 255 characters for tokens in external_login_user table (#8554) 2019-10-18 09:58:36 +03:00
v102.go Use transaction in V102 migration (#12395) 2020-08-06 19:16:49 +01:00
v103.go Allow Protected Branches to Whitelist Deploy Keys (#8483) 2019-10-21 09:21:45 +01:00
v104.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v105.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v106.go Auto-subscribe user to repository when they commit/tag to it (#7657) 2019-11-10 09:22:19 +00:00
v107.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v108.go Improve notification (#8835) 2019-11-12 16:33:34 +08:00
v109.go Team permission to create repository in organization (#8312) 2019-11-20 19:27:49 +08:00
v110.go Upgrade xorm to v1.0.0 (#10646) 2020-03-22 11:12:55 -04:00
v111.go Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
v112.go Add a storage layer for attachments (#11387) 2020-08-18 12:23:45 +08:00
v113.go Change target branch for pull request (#6488) 2019-12-16 14:20:25 +08:00
v114.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v115.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v116.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v117.go Add branch protection option to block merge on requested changes. (#9592) 2020-01-03 19:47:09 +02:00
v118.go Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532) 2020-01-09 01:47:45 +00:00
v119.go Refactor: Remove Dependencys from Migration v112-v119 (#11811) 2020-06-09 16:34:05 -04:00
v120.go Add owner_name column for table repository for maintaince reason (#9717) 2020-01-12 17:36:21 +08:00
v121.go Restricted users (#6274) 2020-01-13 18:33:46 +01:00
v122.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v123.go Migrate reactions when migrating repository from github (#9599) 2020-01-15 12:14:07 +01:00
v124.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v125.go Migrate reviews when migrating repository from github (#9463) 2020-01-23 19:28:15 +02:00
v126.go Update topics repo count when deleting repository (#10051) 2020-01-31 08:57:19 +02:00
v127.go Language statistics bar for repositories (#8037) 2020-02-11 11:34:17 +02:00
v128.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v129.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v130.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v131.go System-wide webhooks (#10546) 2020-03-09 00:08:05 +02:00
v132.go Allow to set protected file patterns that can not be changed under no conditions (#10806) 2020-03-27 00:26:34 +02:00
v133.go make avatar lookup occur at image request (#10540) 2020-03-27 14:34:39 +02:00
v134.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v135.go Add Organization Wide Labels (#10814) 2020-04-01 01:14:46 -03:00
v136.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v137.go Prevent merge of outdated PRs on protected branches (#11012) 2020-04-16 22:00:36 -03:00
v138.go Add a way to mark Conversation (code comment) resolved (#11037) 2020-04-18 10:50:25 -03:00
v139.go Fix issue ref migration (#11419) 2020-05-15 15:05:18 +01:00
v140.go Change language statistics to save size instead of percentage (#11681) 2020-05-30 10:46:15 +03:00
v141.go Fix migration v141 (#14387) 2021-01-28 23:58:33 +01:00
v142.go Add migration to set IsArchived false if it is null (#11853) 2020-06-11 16:18:11 -04:00
v143.go Decrease the num_stars when deleting a repo (#11954) 2020-07-07 15:16:34 -04:00
v144.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v145.go Fix Migration 145 on MSSQL if varchar is changed to nvarchar (#12445) 2020-08-10 16:01:10 +03:00
v146.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v147.go Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
v148.go [BugFix] Fix comment broken issue ref dependence (#12651) 2020-09-04 09:36:56 +08:00
v149.go Add Created & Updated to Milestone (#12662) 2020-09-05 13:38:54 -04:00
v150.go Add Primary Key to Topic and RepoTopic (#12639) 2020-09-10 20:45:01 +01:00
v151.go Add migration for password algorithm change (#12784) 2020-09-15 18:02:41 -04:00
v152.go Add configurable Trust Models (#11712) 2020-09-20 00:44:55 +08:00
v153.go Add team support for review request (#12039) 2020-10-12 20:55:13 +01:00
v154.go Save TimeStamps for Star, Label, Follow, Watch and Collaboration to Database (#13124) 2020-10-12 20:01:57 -04:00
v155.go [Enhancement] Allow admin to merge pr with protected file changes (#12078) 2020-10-13 14:50:57 -04:00
v156.go Tagger can be empty, as can Commit and Author - tolerate this (#15835) 2021-05-12 01:11:42 -04:00
v157.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v158.go chore(models): rewrite code format. (#14754) 2021-03-14 19:52:12 +01:00
v159.go Include OriginalAuthor in Reaction constraint (#13505) 2020-11-10 22:37:11 +00:00
v160.go Add block on official review requests branch protection (#13705) 2020-11-28 21:30:46 +02:00
v161.go Add support for corporate WeChat webhooks (#15910) 2021-07-23 12:41:27 +08:00
v162.go Add support for corporate WeChat webhooks (#15910) 2021-07-23 12:41:27 +08:00
v163.go Change topic name size from 25 to 50 (#14150) 2020-12-26 23:28:47 +00:00
v164.go Minimal OpenID Connect implementation (#14139) 2021-01-02 00:33:27 +08:00
v165.go Fix wrong type on hooktask to convert typ from char(16) to varchar(16) (#14148) 2021-01-06 16:11:23 +01:00
v166.go Remove unused commit (#14741) 2021-02-20 15:02:39 +01:00
v167.go Redirect on changed user and org name (#11649) 2021-01-24 16:23:05 +01:00
v168.go noop (#14521) 2021-01-29 23:52:13 +08:00
v169.go Use OldRef instead of CommitSHA for DeleteBranch comments (#14604) 2021-02-08 11:09:14 +08:00
v170.go Add dismiss review feature (#12674) 2021-02-11 18:32:25 +01:00
v171.go Add v171 (addSortingColToProjectBoard) migration for #14634 (#14652) 2021-02-12 13:01:26 +02:00
v172.go v172 migration adds created_unix field instead of expiry (#15458) 2021-04-13 20:04:17 -04:00
v173.go Add UI to delete tracked times (#14100) 2021-02-19 12:52:11 +02:00
v174.go Delete Labels & IssueLabels on Repo Delete too (#15039) 2021-03-19 21:01:24 +02:00
v175.go Fix postgres ID sequences broken by recreate-table (#15015) 2021-03-18 02:06:40 -04:00
v176.go Create Proper Migration Tests (#15116) 2021-03-24 19:27:22 +01:00
v176_test.go Create Proper Migration Tests (#15116) 2021-03-24 19:27:22 +01:00
v177.go Create Proper Migration Tests (#15116) 2021-03-24 19:27:22 +01:00
v177_test.go Create Proper Migration Tests (#15116) 2021-03-24 19:27:22 +01:00
v178.go Add LFS Migration and Mirror (#14726) 2021-04-08 18:25:57 -04:00
v179.go OAuth2 auto-register (#5123) 2021-04-14 14:02:12 +02:00
v180.go v180 migration should be standalone (#16151) 2021-06-14 15:07:49 -04:00
v181.go Rework repository archive (#14723) 2021-06-23 17:12:38 -04:00
v181_test.go Always store primary email address into email_address table and also the state (#15956) 2021-06-08 11:52:51 +08:00
v182.go Add a new table issue_index to store the max issue index so that issue could be deleted with no duplicated index (#15599) 2021-06-14 10:22:55 +08:00
v182_test.go Add a new table issue_index to store the max issue index so that issue could be deleted with no duplicated index (#15599) 2021-06-14 10:22:55 +08:00
v183.go Add push to remote mirror repository (#15157) 2021-06-14 19:20:43 +02:00
v184.go Add Status Updates whilst Gitea migrations are occurring (#15076) 2021-06-16 18:02:24 -04:00
v185.go Rework repository archive (#14723) 2021-06-23 17:12:38 -04:00
v186.go Add tag protection (#15629) 2021-06-25 16:28:55 +02:00
v187.go Refactor Webhook + Add X-Hub-Signature (#16176) 2021-06-27 20:21:09 +01:00
v188.go Add option to provide signature for a token to verify key ownership (#14054) 2021-07-13 15:28:07 +02:00