Skip to content

Commit d822fa6

Browse files
authored
Remove conflict handling from GH_TOKEN aliases (#1724)
Signed-off-by: William Woodruff <william@yossarian.net>
1 parent 773439b commit d822fa6

File tree

4 files changed

+8
-107
lines changed

4 files changed

+8
-107
lines changed

crates/zizmor/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ struct App {
9595
offline: bool,
9696

9797
/// The GitHub API token to use [env: GH_TOKEN or GITHUB_TOKEN or ZIZMOR_GITHUB_TOKEN]
98-
#[arg(long, env, hide_env = true, value_parser = GitHubToken::new, conflicts_with_all = ["github_token", "zizmor_github_token"])]
98+
#[arg(long, env, hide_env = true, value_parser = GitHubToken::new)]
9999
gh_token: Option<GitHubToken>,
100100

101101
/// This is an alias for `--gh-token` / `GH_TOKEN`.
102-
#[arg(long, env, hide = true, value_parser = GitHubToken::new, conflicts_with_all = ["gh_token", "zizmor_github_token"])]
102+
#[arg(long, env, hide = true, value_parser = GitHubToken::new)]
103103
github_token: Option<GitHubToken>,
104104

105105
/// This is an alias for `--gh-token` / `GH_TOKEN` / `--github-token` / `GITHUB_TOKEN`
106-
#[arg(long, env, hide = true, value_parser = GitHubToken::new, conflicts_with_all = ["gh_token", "github_token"])]
106+
#[arg(long, env, hide = true, value_parser = GitHubToken::new)]
107107
zizmor_github_token: Option<GitHubToken>,
108108

109109
/// The GitHub Server Hostname. Defaults to github.com

crates/zizmor/tests/integration/cli.rs

Lines changed: 0 additions & 102 deletions
This file was deleted.

crates/zizmor/tests/integration/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
mod acceptance;
55
/// Audit-specific tests.
66
mod audit;
7-
/// Basic CLI tests.
8-
mod cli;
97
/// Helpers.
108
mod common;
119
/// Configuration discovery tests.

docs/release-notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ of `zizmor`.
99

1010
## Next (UNRELEASED)
1111

12+
### Bug Fixes 🐛
13+
14+
* Fixed a bug where `zizmor` would error if given both a `GH_TOKEN` and
15+
a `GITHUB_TOKEN` (or `ZIZMOR_GITHUB_TOKEN`) via the environment (#1724)
16+
1217
### New Features 🌈
1318

1419
* **New audit**: [secrets-outside-env] detects usage of the `secrets` context

0 commit comments

Comments
 (0)