Skip to content

Commit eb6e005

Browse files
committed
Add method for getting the raw job logs
1 parent 2407f13 commit eb6e005

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/github.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,19 @@ impl GithubClient {
219219
.context("failed to update pr state")?;
220220
Ok(())
221221
}
222+
223+
pub async fn raw_job_logs(
224+
&self,
225+
repo: &IssueRepository,
226+
job_id: u128,
227+
) -> anyhow::Result<String> {
228+
let url = format!("{}/actions/jobs/{job_id}/logs", repo.url(&self));
229+
let (body, _req_dbg) = self
230+
.send_req(self.get(&url))
231+
.await
232+
.context("failed to retrieve job logs")?;
233+
Ok(String::from_utf8_lossy(&body).to_string())
234+
}
222235
}
223236

224237
#[derive(Debug, serde::Serialize)]

0 commit comments

Comments
 (0)