1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! GitHub CLI auth payloads for bash tool execution.
//!
//! This module stores the environment variables and redaction list that the
//! bash tool injects when it needs GitHub App credentials for `gh` commands.
//!
//! # Examples
//!
//! ```ignore
//! let auth = GitHubCommandAuth::new("secret".into(), None);
//! assert!(!auth.redactions.is_empty());
//! ```
/// Shell environment for authenticated GitHub CLI commands.
///
/// The bash tool injects these variables when a command needs access to a
/// CodeTether-provisioned GitHub token. The same token is also tracked for
/// output redaction.
///
/// # Examples
///
/// ```ignore
/// let auth = GitHubCommandAuth::new("secret".into(), Some("/tmp/gh".into()));
/// assert_eq!(auth.env[0].0, "GH_TOKEN");
/// ```