getPollConfig returns the polling configuration from context, or defaults.
(ctx context.Context)
| 79 | |
| 80 | // getPollConfig returns the polling configuration from context, or defaults. |
| 81 | func getPollConfig(ctx context.Context) PollConfig { |
| 82 | if config, ok := ctx.Value(pollConfigKey{}).(PollConfig); ok { |
| 83 | return config |
| 84 | } |
| 85 | // Default: 9 attempts with 1s delay = 8s max wait |
| 86 | // Based on observed latency in remote server: p50 ~5s, p90 ~7s |
| 87 | return PollConfig{MaxAttempts: 9, Delay: 1 * time.Second} |
| 88 | } |
| 89 | |
| 90 | // findLinkedCopilotPR searches for a PR created by the copilot-swe-agent bot that references the given issue. |
| 91 | // It queries the issue's timeline for CrossReferencedEvent items from PRs authored by copilot-swe-agent. |
no outgoing calls
no test coverage detected