diff --git a/src/forges/github/commit.rs b/src/forges/github/commit.rs index 70590ce..86c603a 100644 --- a/src/forges/github/commit.rs +++ b/src/forges/github/commit.rs @@ -13,7 +13,8 @@ pub async fn status( let repo_details = &github.repo_details; let hostname = repo_details.forge.hostname(); let repo_path = &repo_details.repo_path; - let url = format!("https://api.{hostname}/repos/{repo_path}/commits/{commit}/statuses"); + let url = format!("https://api.{hostname}.net/repos/{repo_path}/commits/{commit}/statuses"); + tracing::debug!(?url, "get commit status"); let Ok(response) = github .net .get(url) diff --git a/src/forges/github/tests/mod.rs b/src/forges/github/tests/mod.rs index 49b861d..72ba837 100644 --- a/src/forges/github/tests/mod.rs +++ b/src/forges/github/tests/mod.rs @@ -108,7 +108,7 @@ mod github { macro_rules! status_tests{ ($($name:ident: $value:expr, )*) => { $( - #[tokio::test] + #[test_log::test(tokio::test)] async fn $name() { let (states, expected) = $value; let repo_details = given::repo_details(); @@ -557,8 +557,10 @@ mod github { repo_details: &git::RepoDetails, commit: &git::Commit, ) { + let url = a_commit_status_url(repo_details, commit); + tracing::debug!(?url, "mock request"); net.on() - .get(a_commit_status_url(repo_details, commit)) + .get(url) .respond(StatusCode::OK) .body( json!(states @@ -578,7 +580,7 @@ mod github { ) -> String { let hostname = repo_details.forge.hostname(); let repo_path = &repo_details.repo_path; - format!("https://api.{hostname}/repos/{repo_path}/commits/{commit}/statuses") + format!("https://api.{hostname}.net/repos/{repo_path}/commits/{commit}/statuses") } pub fn a_webhook_auth() -> WebhookAuth {