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)
| 226 | /// for lightweight identity operations, while atomic_core::change::Author |
| 227 | /// is used in change headers. This function performs the conversion. |
| 228 | pub(crate) fn identity_to_author(identity: &Identity) -> Author { |
| 229 | Author::with_identity( |
| 230 | identity.name.clone(), |
| 231 | identity.email.clone(), |
| 232 | identity.public_key_base32(), |
| 233 | ) |
| 234 | } |
| 235 | |
| 236 | pub(crate) fn is_terminal() -> bool { |
| 237 | // Use a simple heuristic - check if we're in a CI environment |