cec6dce955
- Add git operation endpoints: archive, compare branches, diff, tree, repository extras - Add repo endpoints: contributors, delete fork, get branch/commit status/deploy key/invitation/member/release/tag/webhook, topics, release assets, webhook deliveries/retry - Add PR endpoints: review requests, templates - Add user endpoints: block/unblock, follow/unfollow, presence, personal access tokens, account restore - Add workspace endpoints: billing history, approvals, domains, integrations, invitations, members, webhooks, restore - Add internal API, notification API, IM API modules - Update route configuration and OpenAPI spec
219 lines
7.7 KiB
Rust
219 lines
7.7 KiB
Rust
pub mod git_archive;
|
|
pub mod git_blame;
|
|
pub mod git_blob;
|
|
pub mod git_cherry_pick;
|
|
pub mod git_commit_extras2;
|
|
pub mod git_commit_stats;
|
|
pub mod git_compare;
|
|
pub mod git_compare_branch;
|
|
pub mod git_conflicts;
|
|
pub mod git_count_commits;
|
|
pub mod git_count_diverging;
|
|
pub mod git_create_branch;
|
|
pub mod git_create_commit;
|
|
pub mod git_create_tag;
|
|
pub mod git_delete_branch;
|
|
pub mod git_delete_tag;
|
|
pub mod git_diff;
|
|
pub mod git_diff_extras;
|
|
pub mod git_diff_stats;
|
|
pub mod git_exists;
|
|
pub mod git_gc;
|
|
pub mod git_get_branch;
|
|
pub mod git_get_commit;
|
|
pub mod git_get_tag;
|
|
pub mod git_health;
|
|
pub mod git_info;
|
|
pub mod git_license;
|
|
pub mod git_list_branches;
|
|
pub mod git_list_commits;
|
|
pub mod git_merge;
|
|
pub mod git_merge_check;
|
|
pub mod git_rebase;
|
|
pub mod git_rename_branch;
|
|
pub mod git_repository_extras;
|
|
pub mod git_revert;
|
|
pub mod git_search;
|
|
pub mod git_stats;
|
|
pub mod git_tags;
|
|
pub mod git_tree;
|
|
pub mod git_tree_extras;
|
|
pub mod git_verify_tag;
|
|
|
|
use actix_web::web;
|
|
|
|
pub fn configure(cfg: &mut web::ServiceConfig) {
|
|
cfg.service(
|
|
web::scope("/git")
|
|
.route(
|
|
"/commits",
|
|
web::get().to(git_list_commits::git_list_commits),
|
|
)
|
|
.route(
|
|
"/commits/{revision}",
|
|
web::get().to(git_get_commit::git_get_commit),
|
|
)
|
|
.route(
|
|
"/commits/{revision}/stats",
|
|
web::get().to(git_commit_stats::git_commit_stats),
|
|
)
|
|
.route(
|
|
"/commits",
|
|
web::post().to(git_create_commit::git_create_commit),
|
|
)
|
|
.route(
|
|
"/commits/count",
|
|
web::get().to(git_count_commits::git_count_commits),
|
|
)
|
|
.route("/diff", web::get().to(git_diff::git_diff))
|
|
.route("/diff-stats", web::get().to(git_diff_stats::git_diff_stats))
|
|
.route("/compare", web::get().to(git_compare::git_compare))
|
|
.route(
|
|
"/compare/diverging",
|
|
web::get().to(git_count_diverging::git_count_diverging),
|
|
)
|
|
.route("/archive", web::get().to(git_archive::git_archive))
|
|
.route("/license", web::get().to(git_license::git_license))
|
|
.route(
|
|
"/search/content",
|
|
web::get().to(git_search::git_search_content),
|
|
)
|
|
.route("/search/files", web::get().to(git_search::git_search_files))
|
|
.route(
|
|
"/branches",
|
|
web::get().to(git_list_branches::git_list_branches),
|
|
)
|
|
.route(
|
|
"/branches/{branch_name}",
|
|
web::get().to(git_get_branch::git_get_branch),
|
|
)
|
|
.route(
|
|
"/branches/{branch_name}/compare",
|
|
web::get().to(git_compare_branch::git_compare_branch),
|
|
)
|
|
.route(
|
|
"/branches/{branch_name}/rename",
|
|
web::post().to(git_rename_branch::git_rename_branch),
|
|
)
|
|
.route(
|
|
"/branches",
|
|
web::post().to(git_create_branch::git_create_branch),
|
|
)
|
|
.route(
|
|
"/branches/{branch_name}",
|
|
web::delete().to(git_delete_branch::git_delete_branch),
|
|
)
|
|
.route(
|
|
"/merge-check",
|
|
web::get().to(git_merge_check::git_merge_check),
|
|
)
|
|
.route("/merge", web::post().to(git_merge::git_merge))
|
|
.route("/rebase", web::post().to(git_rebase::git_rebase))
|
|
.route(
|
|
"/cherry-pick",
|
|
web::post().to(git_cherry_pick::git_cherry_pick),
|
|
)
|
|
.route("/revert", web::post().to(git_revert::git_revert))
|
|
.route("/conflicts", web::get().to(git_conflicts::git_conflicts))
|
|
.route("/tree", web::get().to(git_tree::git_tree))
|
|
.route("/blobs", web::get().to(git_blob::git_blob))
|
|
.route("/blame", web::get().to(git_blame::git_blame))
|
|
.route("/tags", web::get().to(git_tags::git_tags))
|
|
.route("/tags", web::post().to(git_create_tag::git_create_tag))
|
|
.route("/tags/{tag_name}", web::get().to(git_get_tag::git_get_tag))
|
|
.route(
|
|
"/tags/{tag_name}/verify",
|
|
web::post().to(git_verify_tag::git_verify_tag),
|
|
)
|
|
.route(
|
|
"/tags/{tag_name}",
|
|
web::delete().to(git_delete_tag::git_delete_tag),
|
|
)
|
|
.route("/info", web::get().to(git_info::git_info))
|
|
.route("/exists", web::get().to(git_exists::git_exists))
|
|
.route("/stats", web::get().to(git_stats::git_stats))
|
|
.route("/health", web::get().to(git_health::git_health))
|
|
.route("/garbage-collect", web::post().to(git_gc::git_gc))
|
|
.route(
|
|
"/default-branch",
|
|
web::get().to(git_repository_extras::git_default_branch),
|
|
)
|
|
.route(
|
|
"/object-format",
|
|
web::get().to(git_repository_extras::git_object_format),
|
|
)
|
|
.route(
|
|
"/size",
|
|
web::get().to(git_repository_extras::git_repository_size),
|
|
)
|
|
.route(
|
|
"/objects-size",
|
|
web::post().to(git_repository_extras::git_objects_size),
|
|
)
|
|
.route(
|
|
"/check-objects",
|
|
web::post().to(git_repository_extras::git_check_objects),
|
|
)
|
|
.route(
|
|
"/merge-base",
|
|
web::get().to(git_repository_extras::git_merge_base),
|
|
)
|
|
.route(
|
|
"/archive/entries",
|
|
web::get().to(git_repository_extras::git_archive_entries),
|
|
)
|
|
.route(
|
|
"/commits/{revision}/ancestors",
|
|
web::get().to(git_repository_extras::git_commit_ancestors),
|
|
)
|
|
.route(
|
|
"/find-commit",
|
|
web::get().to(git_commit_extras2::git_find_commit),
|
|
)
|
|
.route(
|
|
"/commits/by-oid",
|
|
web::post().to(git_commit_extras2::git_commits_by_oid),
|
|
)
|
|
.route(
|
|
"/commit-is-ancestor",
|
|
web::get().to(git_commit_extras2::git_commit_is_ancestor),
|
|
)
|
|
.route(
|
|
"/last-commit",
|
|
web::get().to(git_commit_extras2::git_last_commit),
|
|
)
|
|
.route(
|
|
"/commits/search",
|
|
web::get().to(git_commit_extras2::git_commits_by_message),
|
|
)
|
|
.route("/raw-blob", web::get().to(git_tree_extras::git_raw_blob))
|
|
.route(
|
|
"/file-metadata",
|
|
web::get().to(git_tree_extras::git_file_metadata),
|
|
)
|
|
.route(
|
|
"/find-files",
|
|
web::get().to(git_tree_extras::git_find_files),
|
|
)
|
|
.route("/get-tree", web::get().to(git_tree_extras::git_get_tree))
|
|
.route(
|
|
"/commit-diff/{revision}",
|
|
web::get().to(git_diff_extras::git_commit_diff),
|
|
)
|
|
.route("/patch", web::get().to(git_diff_extras::git_patch))
|
|
.route("/raw-diff", web::get().to(git_diff_extras::git_raw_diff))
|
|
.route(
|
|
"/changed-paths",
|
|
web::get().to(git_diff_extras::git_changed_paths),
|
|
)
|
|
.route(
|
|
"/stream-blame",
|
|
web::get().to(git_diff_extras::git_stream_blame),
|
|
)
|
|
.route(
|
|
"/resolve-conflicts",
|
|
web::post().to(git_diff_extras::git_resolve_conflicts),
|
|
),
|
|
);
|
|
}
|