File tree Expand file tree Collapse file tree
packages/slack-bot/src/completion Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 */
44
55import type { AgentResponse , CallbackContext } from "../types" ;
6+ import type { ManualPullRequestArtifactMetadata } from "@open-inspect/shared" ;
67
78/**
89 * Slack Block Kit block type (subset).
@@ -143,11 +144,13 @@ function getManualCreatePrUrl(artifacts: AgentResponse["artifacts"]): string | n
143144 if ( ! artifact . metadata || typeof artifact . metadata !== "object" ) {
144145 return false ;
145146 }
146- if ( artifact . metadata . mode === "manual_pr" ) {
147+ const metadata = artifact . metadata as Partial < ManualPullRequestArtifactMetadata > &
148+ Record < string , unknown > ;
149+ if ( metadata . mode === "manual_pr" ) {
147150 return true ;
148151 }
149152 // Backward-compatible fallback for older artifacts that may not include mode.
150- return artifact . metadata . mode == null && typeof artifact . metadata . createPrUrl === "string" ;
153+ return metadata . mode == null && typeof metadata . createPrUrl === "string" ;
151154 } ) ;
152155
153156 if ( ! manualBranchArtifact ) {
You can’t perform that action at this time.
0 commit comments