Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 48d97fe

Browse files
committed
Cleanup dead endpoints
1 parent 373bf36 commit 48d97fe

14 files changed

Lines changed: 66 additions & 371 deletions

File tree

crates/mesa-dev/src/client/commits.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::low_level::apis::{commits_api, Error};
2-
use crate::low_level::commits;
32
use crate::models;
43

54
use super::pagination::{paginate, PaginatedResponse};
@@ -91,34 +90,4 @@ impl<'a> CommitsClient<'a> {
9190
.await
9291
}
9392

94-
/// Create a commit with file operations.
95-
///
96-
/// Uses the hand-written implementation to work around the missing
97-
/// `Upsert` action variant in the generated code.
98-
///
99-
/// # Errors
100-
///
101-
/// Returns an error if the API request fails.
102-
#[allow(clippy::too_many_arguments)]
103-
#[tracing::instrument(skip(self, author, files), fields(org = self.repo.org.org, repo = self.repo.repo), err(Debug))]
104-
pub async fn create(
105-
&self,
106-
branch: &str,
107-
message: &str,
108-
author: &commits::CommitAuthor,
109-
files: &[commits::CommitFile],
110-
base_sha: Option<&str>,
111-
) -> Result<commits::CommitResponse, Error<commits::CreateCommitError>> {
112-
commits::create_commit(
113-
self.repo.org.config,
114-
self.repo.org.org,
115-
self.repo.repo,
116-
branch,
117-
message,
118-
author,
119-
files,
120-
base_sha,
121-
)
122-
.await
123-
}
12493
}

crates/mesa-dev/src/low_level/commits.rs

Lines changed: 0 additions & 205 deletions
This file was deleted.

crates/mesa-dev/src/low_level/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//! provides hand-written replacements for endpoints where the `OpenAPI` code
66
//! generator produces incorrect types.
77
8-
pub mod commits;
98
pub mod content;
109

1110
/// OpenAPI-generated API client modules.

crates/mesa-dev/tests/client.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
mod common;
1313

1414
use futures::TryStreamExt;
15-
use mesa_dev::low_level::commits::{CommitAuthor, CommitFile};
1615
use mesa_dev::MesaClient;
1716

1817
/// Smoke test: exercises the MesaClient -> OrgClient -> RepoClient chain.
@@ -37,18 +36,17 @@ async fn client_round_trip() {
3736

3837
let repo = org.repos().at(&repo_name);
3938

40-
// Create a commit via the client
41-
let author = CommitAuthor::new("Test".to_string(), "test@test.com".to_string());
42-
let files = vec![CommitFile::Upsert {
43-
path: "hello.txt".to_string(),
44-
content: "world".to_string(),
45-
encoding: None,
46-
}];
47-
let commit = repo
48-
.commits()
49-
.create("main", "test commit", &author, &files, None)
50-
.await
51-
.expect("create commit failed");
39+
// Seed a commit so the repo has content to query
40+
let config = common::test_config();
41+
let commit = common::create_commit(
42+
&config,
43+
&org_name,
44+
&repo_name,
45+
"main",
46+
"test commit",
47+
&[("hello.txt", "world")],
48+
)
49+
.await;
5250
assert!(!commit.sha.is_empty());
5351

5452
// List branches

0 commit comments

Comments
 (0)