summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix CSS specificity issue with easymde's css (#18201)silverwind2022-01-072-1/+2
| | | | | | | | | | | | | | | | * Fix CSS specificity issue with easymde's css PR #18069 introduced a regression in certain overwritten editor styles because the dynamic loading of easymde.min.css causes its's style to apply after our supposed override styles. Solve this by bundling the styles into index.css. We should later aim to completely replace easymde.min.css completely with our own styles so there are no more conflicts. * Update web_src/js/features/comp/EasyMDE.js Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix mermaid rendering in milestone dashboard (#18202)silverwind2022-01-071-1/+1
| | | Fixes: https://github.com/go-gitea/gitea/issues/18200
* Don't store assets modified time into generated files (#18193)Lunny Xiao2022-01-0611-22/+110
|
* Add warning for BIDI characters in page renders and in diffs (#17562)zeripath2022-01-0726-87/+809
| | | | | | | | | | | | Fix #17514 Given the comments I've adjusted this somewhat. The numbers of characters detected are increased and include things like the use of U+300 to make à instead of à and non-breaking spaces. There is a button which can be used to escape the content to show it. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Gwyneth Morgan <gwymor@tilde.club> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2022-01-0727-118/+23
|
* Bump mermaid from 8.13.4 to 8.13.8 (#18198)dependabot[bot]2022-01-062-16/+16
| | | | | | | | | | | | | | | | Bumps [mermaid](https://github.com/knsv/mermaid) from 8.13.4 to 8.13.8. - [Release notes](https://github.com/knsv/mermaid/releases) - [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/docs/CHANGELOG.md) - [Commits](https://github.com/knsv/mermaid/compare/8.13.4...8.13.8) --- updated-dependencies: - dependency-name: mermaid dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix location for custom/options/license (#18194)yearski2022-01-061-1/+1
|
* Enable partial clone by default (#18195)Gusted2022-01-065-30/+14
| | | | | - Enable partial clones(which are by default disabled from git) by default, unless configured otherwise. - Resolves #18190
* Add option to convert CRLF to LF line endings for sendmail (#18075)zeripath2022-01-064-7/+20
| | | | | | | | | | | | | It appears that several versions of sendmail require that the mail is sent to them with LF line endings instead of CRLF endings - which of course they will then convert back to CRLF line endings to comply with the SMTP standard. This PR adds another setting SENDMAIL_CONVERT_CRLF which will pass the message writer through a filter. This will filter out and convert CRLFs to LFs before writing them out to sendmail. Fix #18024 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add replay of webhooks. (#18191)KN4CK3R2022-01-058-13/+108
|
* Load EasyMDE/CodeMirror dynamically, remove RequireEasyMDE (#18069)wxiaoguang2022-01-0517-221/+237
| | | This PR makes frontend load EasyMDE/CodeMirror dynamically, and removes `RequireEasyMDE`.
* refactoring nits (#18188)65432022-01-055-21/+22
| | | | | | | * no octal for time values * rm artifact from refactoring Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* slight optimization for default avatar (#18187)Lunny Xiao2022-01-051-7/+16
| | | | | | | * slight optimization * Update comment Co-authored-by: 6543 <6543@obermui.de>
* code.gitea.io/sdk/gitea v0.14.0 -> v0.15.1 (#18186)65432022-01-0529-134/+696
|
* Team permission allow different unit has different permission (#17811)Lunny Xiao2022-01-0527-170/+610
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Team permission allow different unit has different permission * Finish the interface and the logic * Fix lint * Fix translation * align center for table cell content * Fix fixture * merge * Fix test * Add deprecated * Improve code * Add tooltip * Fix swagger * Fix newline * Fix tests * Fix tests * Fix test * Fix test * Max permission of external wiki and issues should be read * Move team units with limited max level below units table * Update label and column names * Some improvements * Fix lint * Some improvements * Fix template variables * Add permission docs * improve doc * Fix fixture * Fix bug * Fix some bug * fix * gofumpt * Integration test for migration (#18124) integrations: basic test for Gitea {dump,restore}-repo This is a first step for integration testing of DumpRepository and RestoreRepository. It: runs a Gitea server, dumps a repo via DumpRepository to the filesystem, restores the repo via RestoreRepository from the filesystem, dumps the restored repository to the filesystem, compares the first and second dump and expects them to be identical The verification is trivial and the goal is to add more tests for each topic of the dump. Signed-off-by: Loïc Dachary <loic@dachary.org> * Team permission allow different unit has different permission * Finish the interface and the logic * Fix lint * Fix translation * align center for table cell content * Fix fixture * merge * Fix test * Add deprecated * Improve code * Add tooltip * Fix swagger * Fix newline * Fix tests * Fix tests * Fix test * Fix test * Max permission of external wiki and issues should be read * Move team units with limited max level below units table * Update label and column names * Some improvements * Fix lint * Some improvements * Fix template variables * Add permission docs * improve doc * Fix fixture * Fix bug * Fix some bug * Fix bug Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Aravinth Manivannan <realaravinth@batsense.net>
* Integration test for migration (#18124)Aravinth Manivannan2022-01-041-0/+104
| | | | | | | | | | | | | | | | integrations: basic test for Gitea {dump,restore}-repo This is a first step for integration testing of DumpRepository and RestoreRepository. It: runs a Gitea server, dumps a repo via DumpRepository to the filesystem, restores the repo via RestoreRepository from the filesystem, dumps the restored repository to the filesystem, compares the first and second dump and expects them to be identical The verification is trivial and the goal is to add more tests for each topic of the dump. Signed-off-by: Loïc Dachary <loic@dachary.org>
* Update `TODOs` badge to reflect new default branch (#18182)Patrick DeVivo2022-01-042-4/+4
| | | | | * Update `TODOs` badge to reflect `main` as default branch * update `README_ZH.md` as well
* Increase Salt randomness (#18179)Gusted2022-01-046-14/+115
| | | | | | | | | | | - The current implementation of `RandomString` doesn't give you a most-possible unique randomness. It gives you 6*`length` instead of the possible 8*`length` bits(or as `length`x bytes) randomness. This is because `RandomString` is being limited to a max value of 63, this in order to represent the random byte as a letter/digit. - The recommendation of pbkdf2 is to use 64+ bit salt, which the `RandomString` doesn't give with a length of 10, instead of increasing 10 to a higher number, this patch adds a new function called `RandomBytes` which does give you the guarentee of 8*`length` randomness and thus corresponding of `length`x bytes randomness. - Use hexadecimal to store the bytes value in the database, as mentioned, it doesn't play nice in order to convert it to a string. This will always be a length of 32(with `length` being 16). - When we detect on `Authenticate`(source: db) that a user has the old format of salt, re-hash the password such that the user will have it's password hashed with increased salt. Thanks to @zeripath for working out the rouge edges from my first commit 😄. Co-authored-by: lafriks <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* Add MP4 as default allowed attachment type (#18170)Gusted2022-01-043-3/+3
|
* [skip ci] Updated translations via CrowdinGiteaBot2022-01-041-0/+72
|
* Include folders into size cost (#18158)Gusted2022-01-031-2/+2
| | | | | | | | | - Include folders for the disk consumption size, they should be included as they are also saved on the disk :) - Have a more accurate picture of the size of a repo. - Mostly they are the size of the file system's block size. E.g. 4Kb on Linux.
* Don't delete branch if other PRs with this branch are open (#18164)a10121127962022-01-035-1/+68
| | | | | fix #18149 Signed-off-by: a1012112796 <1012112796@qq.com>
* Remove unused route "/tasks/trigger" (#18160)Gusted2022-01-033-66/+0
| | | ref: https://github.com/go-gitea/gitea/pull/18160#issuecomment-1004091325
* Fix EasyMDE validation (#18161)wxiaoguang2022-01-033-24/+40
|
* Fix bug (#18168)Lunny Xiao2022-01-031-1/+1
|
* tests: add coverage for models migration helpers (#18162)Aravinth Manivannan2022-01-033-1/+173
| | | | | | | | They were previously not covered at all, either by integration tests or unit tests. This PR also fixes a bug where the `num_comments` field was incorrectly set to include all types of comments. It sets num_closed_issues: 0 as default in milestone unit test fixtures. If they are not set, Incr("num_closed_issues") will be a noop because the field is null.
* [skip ci] Updated translations via CrowdinGiteaBot2022-01-031-0/+5
|
* Require codereview to have content (#18156)Gusted2022-01-023-13/+38
| | | | | - Report a validityError when the codeReview have no comment. - Resolves #18151 - Refactor
* chore(lint): use golangci-lint to call revive and misspell checker. (#18145)Bo-Yi Wu2022-01-023-54/+31
| | | | | | replace revive and misspell with golangci-lint Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Update owners for 2022 (#18155)65432022-01-021-0/+5
|
* Refactor auth package (#17962)Lunny Xiao2022-01-0287-2770/+2880
|
* Unify and simplify TrN for i18n (#18141)wxiaoguang2022-01-0219-136/+148
| | | | | Refer: https://github.com/go-gitea/gitea/pull/18135#issuecomment-1003246099 Now we have a unique and simple `TrN`, and make the fix of PR #18135 also use the better `TrN` logic.
* Use correct user when determining max repo limits for error messages (#18153)Gusted2022-01-023-3/+3
| | | - Use the correct user(`owner` instead of `ctx.User`) to get the maxCreationLimit.
* Add singuliere to MAINTAINERS (#18148)singuliere2022-01-021-0/+1
| | | Signed-off-by: singuliere <singuliere@autistici.org>
* [skip ci] Updated licenses and gitignoresGiteaBot2022-01-026-1/+105
|
* Add API to get issue/pull comments and events (timeline) (#17403)qwerty2872022-01-019-0/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API to get issue/pull comments and events (timeline) Adds an API to get both comments and events in one endpoint with all required data. Closes go-gitea/gitea#13250 * Fix swagger * Don't show code comments (use review api instead) * fmt * Fix comment * Time -> TrackedTime * Use var directly * Add logger * Fix lint * Fix test * Add comments * fmt * [test] get issue directly by ID * Update test * Add description for changed refs * Fix build issues + lint * Fix build * Use string enums * Update swagger * Support `page` and `limit` params * fmt + swagger * Use global slices Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Upgrade certmagic from v0.14.1 to v0.15.2 (#18138)Lunny Xiao2022-01-010-0/+0
|
* Upgrade certmagic from v0.14.1 to v0.15.2 (#18138)Lunny Xiao2022-01-0120-142/+294
|
* Allow admin to associate missing LFS objects for repositories (#18143)wxiaoguang2022-01-013-26/+57
| | | | | | | This PR reworked the Find pointer files feature in Settings -> LFS page. When a LFS object is missing from database but exists in LFS content store, admin can associate it to the repository by clicking the Associate button. This PR is not perfect (because the LFS module itself should be improved too), it's just a nice-to-have feature to help users recover their LFS repositories (eg: database was lost / table was truncated)
* Upgrade bleve from v2.0.6 to v2.3.0 (#18132)Lunny Xiao2022-01-0170-639/+1262
|
* tests: s/GITEA_UNIT_TESTS_VERBOSE/GITEA_UNIT_TESTS_LOG_SQL/ (#18142)singuliere2022-01-012-2/+2
| | | | | | | | | | | The GITEA_UNIT_TESTS_VERBOSE variable is an undocumented variable introduced in 2017 (see 1028ef2defd94a64f2433b07fe5d93681864cebb) whose sole purpose has been to log SQL statements when running unit tests. It is renamed for clarity and a warning is displayed for backward compatibility for people and scripts that know about it. The documentation is updated to reflect this change.
* services/repository: fix ListUnadoptedRepositories incorrect total count ↵singuliere2022-01-012-110/+156
| | | | | | | | | | | | | | | | (#17865) The total count returned by ListUnadoptedRepositories is incorrectly calculated. The code snippet within ListUnadoptedRepositories used to verify unadopted repositories is repeated three times in the function. It is moved in the checkUnadoptedRepositories function and a unit test is added to verify it works as expected. A unit test is added to verify the total count returned by ListUnadoptedRepositories is as expected. Signed-off-by: singuliere <singuliere@autistici.org>
* Improve document for developers: Windows CGO, unit test option (#18140)wxiaoguang2021-12-311-2/+12
|
* Reset the conflicted files list in testpatch (#18139)zeripath2021-12-311-0/+1
| | | | | | | | Although #18004 will seriously reduce the likelihood of finding conflicts in the first place - one bug was introduced whereby the conflicted files status was not being reset properly. This leads to conflicted PRs remaining conflicted when the conflict has been resolved. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Use correct translation key (#18135)Gusted2021-12-313-3/+22
| | | | | - Resolves #18122 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-12-311-0/+15
|
* [Frontport] Changelog v1.15.9 (#18136)65432021-12-302-1/+19
| | | | | * Changelog ## [1.15.9](https://github.com/go-gitea/gitea/releases/tag/v1.15.9) - 2021-12-30 * docs: bump version
* Fix wrong redirect on org labels (#18128)KN4CK3R2021-12-301-1/+1
|
* Fix performance regression when user has many organization (#18125)Lunny Xiao2021-12-301-12/+18
|
* docs: add various ways to install from package (#18120)Tony2021-12-301-7/+78
| | | | | | zh-cn Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>