MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / identity_to_author

Function identity_to_author

atomic-cli/src/commands/record/command.rs:119–125  ·  view source on GitHub ↗

Check if stdin is a terminal (for interactive prompts). Convert an atomic_identity::Identity to atomic_core::change::Author. This bridges the two Author types: atomic_identity has its own Author for lightweight identity operations, while atomic_core::change::Author is used in change headers. This function performs the conversion.

(identity: &Identity)

Source from the content-addressed store, hash-verified

117/// for lightweight identity operations, while atomic_core::change::Author
118/// is used in change headers. This function performs the conversion.
119pub(crate) fn identity_to_author(identity: &Identity) -> Author {
120 Author::with_identity(
121 identity.name.clone(),
122 identity.email.clone(),
123 identity.public_key_base32(),
124 )
125}
126
127pub(crate) fn is_terminal() -> bool {
128 // Use a simple heuristic - check if we're in a CI environment

Calls 2

public_key_base32Method · 0.80
cloneMethod · 0.45