MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / github_create_comment

Function github_create_comment

crates/opencode-cli/src/main.rs:4798–4813  ·  view source on GitHub ↗
(
    owner: &str,
    repo: &str,
    issue_number: u64,
    body: &str,
    token: Option<&str>,
)

Source from the content-addressed store, hash-verified

4796}
4797
4798fn github_create_comment(
4799 owner: &str,
4800 repo: &str,
4801 issue_number: u64,
4802 body: &str,
4803 token: Option<&str>,
4804) -> anyhow::Result<()> {
4805 let endpoint = format!("repos/{owner}/{repo}/issues/{issue_number}/comments");
4806 gh_api_json(
4807 "POST",
4808 &endpoint,
4809 Some(&serde_json::json!({ "body": body })),
4810 token,
4811 )?;
4812 Ok(())
4813}
4814
4815#[derive(Debug, Clone)]
4816struct GithubPrRuntimeInfo {

Callers 1

handle_github_commandFunction · 0.85

Calls 1

gh_api_jsonFunction · 0.85

Tested by

no test coverage detected