( session: SessionResource, )
| 332 | * @returns The first branch name, or undefined if none found |
| 333 | */ |
| 334 | export function getBranchFromSession( |
| 335 | session: SessionResource, |
| 336 | ): string | undefined { |
| 337 | const gitOutcome = session.session_context.outcomes?.find( |
| 338 | (outcome): outcome is GitRepositoryOutcome => |
| 339 | outcome.type === 'git_repository', |
| 340 | ) |
| 341 | return gitOutcome?.git_info?.branches[0] |
| 342 | } |
| 343 | |
| 344 | /** |
| 345 | * Content for a remote session message. |
no outgoing calls
no test coverage detected