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