1
1
mirror of https://gitea.com/gitea/tea synced 2025-11-13 04:32:03 +01:00
tea/modules/task
Lunny Xiao cc20b52ab3 feat: add validation for object-format flag in repo create command (#741)
This PR adds validation for the `--object-format` flag in the `repo create` command. The flag now accepts only `sha1` or `sha256` as valid values, and returns an error for any other value.

Changes:
- Added validation in `runRepoCreate` to check for valid object format values
- Added unit tests to verify the validation logic
- Fixed the field name from `ObjectFormat` to `ObjectFormatName` to match the SDK

The changes ensure that users get clear error messages when using invalid object format values, improving the user experience.

Fix #727
Fix #660
Fix #767

Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/tea/pulls/741
Reviewed-by: TheFox0x7 <thefox0x7@noreply.gitea.com>
2025-09-12 16:51:43 +00:00
..
issue_create.go Use bubbletea instead of survey for interacting with TUI (#786) 2025-08-11 18:23:52 +00:00
issue_edit.go spdx (#581) 2023-09-08 01:40:02 +00:00
labels_export.go spdx (#581) 2023-09-08 01:40:02 +00:00
labels.go spdx (#581) 2023-09-08 01:40:02 +00:00
login_create.go feat: add validation for object-format flag in repo create command (#741) 2025-09-12 16:51:43 +00:00
login_httpsign.go spdx (#581) 2023-09-08 01:40:02 +00:00
login_ssh.go spdx (#581) 2023-09-08 01:40:02 +00:00
milestone_create.go spdx (#581) 2023-09-08 01:40:02 +00:00
pull_checkout.go spdx (#581) 2023-09-08 01:40:02 +00:00
pull_clean.go spdx (#581) 2023-09-08 01:40:02 +00:00
pull_create_test.go spdx (#581) 2023-09-08 01:40:02 +00:00
pull_create.go Fix bug (#793) 2025-08-15 02:38:45 +00:00
pull_merge.go Support auto detecting branch for PRs (#525) 2024-07-26 19:21:48 +00:00
pull_review.go spdx (#581) 2023-09-08 01:40:02 +00:00
repo_clone.go spdx (#581) 2023-09-08 01:40:02 +00:00