e30b20dc68
Show OAuth callback error message ( #18185 )
...
* Show callback error message.
* lint
* Use error code to display a message.
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-01-07 21:02:09 +00:00
KN4CK3R and GitHub
bf7b083cfe
Add replay of webhooks. ( #18191 )
2022-01-05 15:00:20 -06:00
KN4CK3R and GitHub
67d7ad681a
Fix wrong redirect on org labels ( #18128 )
2021-12-30 07:44:42 +01:00
658a636afe
Removed unused method. ( #18129 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2021-12-30 11:56:12 +08:00
KN4CK3R and GitHub
211f0c32d2
Removed unused endpoint. ( #18127 )
2021-12-29 17:57:30 -05:00
8fa97a25f0
Set HeadCommit when creating tags. ( #18116 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2021-12-29 19:40:57 +08:00
b748acf2a0
Fixed emoji alias not parsed in links ( #16221 )
...
* Do not skip links.
* Restrict text in links to emojis.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: zeripath <art27@cantab.net >
2021-12-15 23:49:12 +00:00
KN4CK3R and GitHub
bfe597c7b0
Use non-expiring key. ( #17984 )
2021-12-14 15:02:20 -05:00
8e9140dd69
Fixed wording. ( #17973 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2021-12-14 09:45:39 +08:00
6ceef87671
Removed SizeFmt. ( #17890 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2021-12-03 11:33:34 +08:00
KN4CK3R and GitHub
87be76213a
Add migrate from Codebase ( #16768 )
...
This PR adds [Codebase](https://www.codebasehq.com/ ) as migration source.
Supported:
- Milestones
- Issues
- Pull Requests
- Comments
- Labels
2021-12-02 23:24:02 +01:00
KN4CK3R and GitHub
fbf3208229
Added missing data- prefix. ( #17884 )
2021-12-03 00:36:00 +08:00
e8f1f09132
Fixed org styles. ( #17807 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2021-11-25 21:05:04 +08:00
KN4CK3R and GitHub
429ef43793
Use new OneDev /milestones endpoint ( #17782 )
...
OneDev changed the API which fails every build at the moment.
2021-11-23 20:28:06 +01:00
KN4CK3R and GitHub
a09b40de8d
Prevent double sanitize ( #16386 )
...
* Prevent double sanitize.
* Use SanitizeReaderToWriter.
At the moment `actualRender` uses `SanitizeReader` to sanitize the output. But `SanitizeReader` gets called in `markup.render` too so the output gets sanitized twice.
I moved the `SanitizeReader` call into `RenderRaw` because this method does not use `markup.render`. I would like to remove the `RenderRaw`/`RenderRawString` methods too because they are only called from tests, the fuzzer and the `/markup/raw` api endpoint. This endpoint is not in use so I think we could remove them. If we really in the future need a method to render markdown without PostProcessing we could achieve this with a more flexible `renderer.NeedPostProcess` method.
2021-11-19 18:46:47 +08:00
KN4CK3R and GitHub
f34151bdb2
Move user/org deletion to services ( #17673 )
2021-11-19 01:42:27 +08:00
KN4CK3R and GitHub
ea42d3c04e
Fixed commit count. ( #17698 )
...
Added "Tag" label.
Unified branch, tag and commit name.
2021-11-17 23:50:17 +00:00
KN4CK3R and GitHub
ff9564a679
Changed migration text. ( #17654 )
2021-11-15 18:12:09 -05:00
KN4CK3R and GitHub
42ea0023a3
Add migration from GitBucket ( #16767 )
...
This PR adds [GitBucket](https://gitbucket.github.io/ ) as migration source.
Supported:
- Milestones
- Issues
- Pull Requests
- Comments
- Reviews
- Labels
There is no public usable instance so no integration tests added.
2021-11-14 20:11:10 +01:00
edbaa5d3f0
Added GetUserByIDCtx. ( #17602 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2021-11-09 22:21:01 -05:00
KN4CK3R and GitHub
44f2c27d28
Fix CSV render error ( #17406 )
...
closed #17378
Both errors from #17378 were caused by #15175 .
Problem 1 (error with added file):
`ToUTF8WithFallbackReader` creates a `MultiReader` from a `byte[2048]` and the remaining reader. `CreateReaderAndGuessDelimiter` tries to read 10000 bytes from this reader but only gets 2048 because that's the first reader in the `MultiReader`. Then the `if size < 1e4` thinks the input is at EOF and just returns that.
Problem 2 (error with changed file):
The blob reader gets defer closed. That was fine because the old version reads the whole file into memory. Now with the streaming version the close needs to defer after the method.
2021-10-25 00:42:32 +02:00
KN4CK3R and GitHub
f99d50fc9f
Read expected buffer size ( #17409 )
...
* Read expected buffer size.
* Changed name.
2021-10-24 22:12:43 +01:00
KN4CK3R and GitHub
3b06675811
Always set a unique Message-ID header. ( #17206 )
2021-10-01 11:24:43 -04:00
KN4CK3R and GitHub
8fb3a50a37
Render full plain readme. ( #17083 )
2021-09-17 21:46:57 -05:00
KN4CK3R and GitHub
87505a9464
Add AbsoluteListOptions ( #17028 )
...
This PR adds a `ListOptions` type which is not paged but uses absolute values. It is implemented as discussed in Discord.
Extracted from #16510 to clean that PR.
2021-09-14 18:48:27 +01:00
KN4CK3R and GitHub
cd78c30fd3
Use filename as id/class prefix. ( #16997 )
...
Currently the svg minifier (`make svg`) rewrites all `id` and `class` attributes in svg files. Every file gets the ids `a, b, ...`. If multiple svgs with ids are used on a page these ids are conflicting and the results are broken images.
| minified ids | unique ids |
| - | - |
|  |  |
This PR adds a prefix (the filename) to every id/class.
Follow up problem: Because we embed svg images there are duplicated ids if one svg image is used multiple times on a page. As those ids refer to the same content it may be no real problem because browser handle that fine.
2021-09-09 08:06:54 +01:00
KN4CK3R and GitHub
2bb32006fd
Test if LFS object is accessible ( #16865 )
...
* Test if object is accessible.
* Added more logging.
2021-08-31 14:35:08 +01:00
KN4CK3R and GitHub
88abb0dc8a
Decoupled code from DefaultSigningKey ( #16743 )
...
Decoupled code from `DefaultSigningKey`. Makes testing a little bit easier and is cleaner.
2021-08-27 20:28:00 +01:00
KN4CK3R and GitHub
cee5f7c5e2
Add migrate from OneDev ( #16356 )
...
* Use context to simplify logic.
* Added migration from OneDev.
This PR adds [OneDev](https://code.onedev.io/ ) as migration source.
Supported:
- [x] Milestones
- [x] Issues
- [x] Pull Requests
- [x] Comments
- [x] Reviews
- [x] Labels
2021-08-22 00:47:45 +02:00
0bd58d61e5
Added introspection endpoint. ( #16752 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2021-08-20 22:16:45 -04:00
dc2613600c
Keep attachments on tasklist update ( #16750 )
...
* Send attachments too.
* Use tasklist flag.
* use action="ignoreAttachments" instead of "tasklist"
* Use boolean parameter.
Co-authored-by: zeripath <art27@cantab.net >
2021-08-20 15:26:19 -04:00
KN4CK3R and GitHub
4debb74eda
Fix wrong user in OpenID response ( #16736 )
...
* Fixed usage of wrong user.
* Added tests.
2021-08-19 12:11:30 -04:00
9f0c8f90af
Fix migration svg color ( #16715 )
...
* Fixed svg color.
* Use --color-text.
Co-authored-by: Lauris BH <lauris@nix.lv >
2021-08-19 00:07:52 +08:00
422c30d315
Refactored and fixed migration tests. ( #16714 )
...
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2021-08-17 20:47:18 -04:00
d9ef43a712
Replace list.List with slices ( #16311 )
...
* Replaced list with slice.
* Fixed usage of pointer to temporary variable.
* Replaced LIFO list with slice.
* Lint
* Removed type check.
* Removed duplicated code.
* Lint
* Fixed merge.
Co-authored-by: 6543 <6543@obermui.de >
2021-08-09 14:08:51 -04:00
KN4CK3R and GitHub
7d70a6eff8
Fix webhook commits wrong hash on HEAD reset ( #16283 )
...
Use `..` instead of `...` with `rev-list`. In combination with #16282 the receiver can get the correct commit. The behaviour is now like Github.
fixes #11802
2021-06-30 19:49:06 +02:00
KN4CK3R and GitHub
aac663e0da
Implemented head_commit for webhooks ( #16282 )
...
* Removed Len field.
* Added head_commit webhook field.
* Added comment for returns.
2021-06-29 15:34:03 +02:00
9b1b4b5433
Refactor Webhook + Add X-Hub-Signature ( #16176 )
...
This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`.
## ⚠️ BREAKING ⚠️
* The `Secret` field is no longer passed as part of the payload.
* "Breaking" change (or fix?): The webhook history shows the real called url and not the url registered in the webhook (`deliver.go`@129).
Close #16115
Fixes #7788
Fixes #11755
Co-authored-by: zeripath <art27@cantab.net >
2021-06-27 20:21:09 +01:00
KN4CK3R and GitHub
e673e42f7e
Fixed issues not updated by commits ( #16254 )
...
`UpdateIssuesCommit` may get called with fewer commits because of `FeedMaxCommitNum` and therefore may miss some commands.
2021-06-26 10:13:51 +01:00
44b8b07631
Add tag protection ( #15629 )
...
* Added tag protection in hook.
* Prevent UI tag creation if protected.
* Added settings page.
* Added tests.
* Added suggestions.
* Moved tests.
* Use individual errors.
* Removed unneeded methods.
* Switched delete selector.
* Changed method names.
* No reason to be unique.
* Allow editing of protected tags.
* Removed unique key from migration.
* Added docs page.
* Changed date.
* Respond with 404 to not found tags.
* Replaced glob with regex pattern.
* Added support for glob and regex pattern.
* Updated documentation.
* Changed white* to allow*.
* Fixed edit button link.
* Added cancel button.
Co-authored-by: zeripath <art27@cantab.net >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2021-06-25 16:28:55 +02:00
KN4CK3R and GitHub
4cc63e9919
Fix diff expansion is missing final line in a file ( #16222 )
...
* Fixed down offset.
* Fixed wrong line count result.
2021-06-24 17:47:46 +02:00
c9c7afda1a
Add sanitizer rules per renderer ( #16110 )
...
* Added sanitizer rules per renderer.
* Updated documentation.
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2021-06-23 17:09:51 -04:00
383ffcfa34
Small refactoring of modules/private ( #15947 )
...
* Use correct variable name.
* doer is never nil here.
* Use status code constants.
* Replaced generic map with concrete struct.
* Fixed windows lint.
* Removed unused method.
* Changed error codes.
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2021-06-23 15:38:19 -04:00
KN4CK3R and GitHub
31f6b95dfa
Use data path instead of config path ( #16227 )
2021-06-23 16:56:25 +02:00
36c158bc93
Update milestone counters on new issue. ( #16183 )
...
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: zeripath <art27@cantab.net >
2021-06-21 14:34:58 -04:00
4fcae3d06d
Add tests for all webhooks ( #16214 )
...
* Added tests for MS Teams.
* Added tests for Dingtalk.
* Added tests for Telegram.
* Added tests for Feishu.
* Added tests for Discord.
* Added tests for closed issue and pullrequest comment.
* Added tests for Matrix.
* Trim all spaces.
* Added tests for Slack.
* Added JSONPayload tests.
* Added general tests.
* Replaced duplicated code.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2021-06-20 22:12:19 -04:00
KN4CK3R and GitHub
29695cd6d5
Add asymmetric JWT signing ( #16010 )
...
* Added asymmetric token signing.
* Load signing key from settings.
* Added optional kid parameter.
* Updated documentation.
* Add "kid" to token header.
2021-06-17 23:56:46 +02:00
ebf253b841
Add attachments for PR reviews ( #16075 )
...
* First step for multiple dropzones per page.
* Allow attachments on review comments.
* Lint.
* Fixed accidental initialize of the review textarea.
* Initialize SimpleMDE textarea.
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2021-06-14 21:12:33 -04:00
KN4CK3R and GitHub
68503bfae6
Fixed setting of wrong position ( #16148 )
2021-06-14 22:42:58 +02:00
KN4CK3R and GitHub
440039c0cc
Add push to remote mirror repository ( #15157 )
...
* Added push mirror model.
* Integrated push mirror into queue.
* Moved methods into own file.
* Added basic implementation.
* Mirror wiki too.
* Removed duplicated method.
* Get url for different remotes.
* Added migration.
* Unified remote url access.
* Add/Remove push mirror remotes.
* Prevent hangs with missing credentials.
* Moved code between files.
* Changed sanitizer interface.
* Added push mirror backend methods.
* Only update the mirror remote.
* Limit refs on push.
* Added UI part.
* Added missing table.
* Delete mirror if repository gets removed.
* Changed signature. Handle object errors.
* Added upload method.
* Added "upload" unit tests.
* Added transfer adapter unit tests.
* Send correct headers.
* Added pushing of LFS objects.
* Added more logging.
* Simpler body handling.
* Process files in batches to reduce HTTP calls.
* Added created timestamp.
* Fixed invalid column name.
* Changed name to prevent xorm auto setting.
* Remove table header im empty.
* Strip exit code from error message.
* Added docs page about mirroring.
* Fixed date.
* Fixed merge errors.
* Moved test to integrations.
* Added push mirror test.
* Added test.
2021-06-14 19:20:43 +02:00
1295e750b4
Add OpenID claims "profile" and "email". ( #16141 )
...
* Added OpenID claims "profile" and "email".
* Splitted error.
* Added scopes_supported and claims_supported.
* Added more metadata.
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
Co-authored-by: Lauris BH <lauris@nix.lv >
2021-06-14 13:33:16 +03:00
2b39357443
Fixed sanitize errors. ( #15240 )
...
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2021-06-13 23:06:52 -04:00
KN4CK3R and GitHub
21cde5c439
Fix data URI scramble ( #16098 )
...
* Removed unused method.
* No prefix for data uris.
* Added test to prevent regressions.
2021-06-07 18:55:26 +02:00
KN4CK3R and GitHub
3607f79d78
Fixed assert statements. ( #16089 )
2021-06-07 07:27:09 +02:00
ee5e1c4a88
Rewrite of the LFS server ( #15523 )
...
* Restructured code. Moved static checks out of loop.
* Restructured batch api. Add support for individual errors.
* Let router decide if LFS is enabled.
* Renamed methods.
* Return correct status from verify handler.
* Unified media type check in router.
* Changed error code according to spec.
* Moved checks into router.
* Removed invalid v1 api methods.
* Unified methods.
* Display better error messages.
* Added size parameter. Create meta object on upload.
* Use object error on invalid size.
* Skip upload if object exists.
* Moved methods.
* Suppress fields in response.
* Changed error on accept.
* Added tests.
* Use ErrorResponse object.
* Test against message property.
* Add support for the old invalid lfs client.
* Fixed the check because MinIO wraps the error.
* Use individual repositories.
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: Lauris BH <lauris@nix.lv >
2021-06-06 02:59:27 +03:00