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

Function github_is_pr_context

crates/opencode-cli/src/main.rs:4195–4204  ·  view source on GitHub ↗
(event_name: &str, payload: &serde_json::Value)

Source from the content-addressed store, hash-verified

4193}
4194
4195fn github_is_pr_context(event_name: &str, payload: &serde_json::Value) -> bool {
4196 match event_name {
4197 "pull_request" | "pull_request_review_comment" => true,
4198 "issue_comment" => payload
4199 .get("issue")
4200 .and_then(|issue| issue.get("pull_request"))
4201 .is_some(),
4202 _ => false,
4203 }
4204}
4205
4206fn github_mentions() -> Vec<String> {
4207 std::env::var("MENTIONS")

Callers 1

handle_github_commandFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected