gitflow-github 2.1.0

gf 的 GitHub 适配器,基于 gh CLI 提供 Issue/PR/Release/Review 等能力。GitHub adapter for gf via gh CLI.
Documentation
1
2
3
4
5
6
7
8
9
//! Shared parsing for timestamps returned by GitHub APIs and `gh`.

/// Parse an RFC 3339 timestamp, warning and using the Unix epoch if malformed.
pub(crate) fn parse_api_datetime(value: &str) -> chrono::DateTime<chrono::Utc> {
    value.parse().unwrap_or_else(|_| {
        tracing::warn!(value, "Failed to parse GitHub API timestamp, using epoch");
        chrono::DateTime::UNIX_EPOCH
    })
}