Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Commit 7ef3d70

Browse files
CopilotMuntasirSZN
andcommitted
feat: enable GitHub aliasing by default matching JS behavior
- Change --github-alias flag to --no-github-alias (enabled by default) - GitHub aliasing now matches @unjs/changelogen default behavior - Token still required for API calls (reads from GITHUB_TOKEN or GH_TOKEN env vars) - Changed warning to debug message when token not provided (since it's default) - Users can disable with --no-github-alias flag if desired - All tests passing (27 suites) - Matches parity with JS version per https://github.com/unjs/changelogen/blob/main/CHANGELOG.md Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com>
1 parent 309a527 commit 7ef3d70

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/cli.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub fn run() -> Result<ExitCode> {
6363
clean,
6464
sign,
6565
yes,
66-
github_alias,
66+
no_github_alias,
6767
github_token,
6868
} => {
6969
// Read GitHub token from env if not provided
@@ -86,7 +86,7 @@ pub fn run() -> Result<ExitCode> {
8686
clean,
8787
sign,
8888
yes,
89-
github_alias,
89+
github_alias: !no_github_alias,
9090
github_token,
9191
})?;
9292
if let Some(path) = output {
@@ -123,7 +123,7 @@ pub fn run() -> Result<ExitCode> {
123123
clean,
124124
sign,
125125
yes,
126-
github_alias,
126+
no_github_alias,
127127
github_token,
128128
} => {
129129
// Read GitHub token from env if not provided
@@ -146,7 +146,7 @@ pub fn run() -> Result<ExitCode> {
146146
clean,
147147
sign,
148148
yes,
149-
github_alias,
149+
github_alias: !no_github_alias,
150150
github_token,
151151
})?;
152152
if outcome.wrote {

src/cli_def.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ pub enum Commands {
5555
/// Auto-confirm (skip prompts)
5656
#[arg(long)]
5757
yes: bool,
58-
/// Enable GitHub aliasing (convert email addresses to @handles)
58+
/// Disable GitHub aliasing (enabled by default, converts email addresses to @handles)
5959
#[arg(long)]
60-
github_alias: bool,
60+
no_github_alias: bool,
6161
/// GitHub token for API access (reads from GITHUB_TOKEN or GH_TOKEN env vars)
6262
#[arg(long)]
6363
github_token: Option<String>,
@@ -84,9 +84,9 @@ pub enum Commands {
8484
sign: bool,
8585
#[arg(long)]
8686
yes: bool,
87-
/// Enable GitHub aliasing (convert email addresses to @handles)
87+
/// Disable GitHub aliasing (enabled by default, converts email addresses to @handles)
8888
#[arg(long)]
89-
github_alias: bool,
89+
no_github_alias: bool,
9090
/// GitHub token for API access (reads from GITHUB_TOKEN or GH_TOKEN env vars)
9191
#[arg(long)]
9292
github_token: Option<String>,

src/pipeline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ pub fn run_release(opts: ReleaseOptions) -> Result<ReleaseOutcome> {
135135
warn!("failed to resolve GitHub handles: {}", e);
136136
}
137137
} else {
138-
warn!(
139-
"--github-alias specified but no token provided (use --github-token or GITHUB_TOKEN env var)"
138+
debug!(
139+
"GitHub aliasing enabled but no token provided; skipping handle resolution (set GITHUB_TOKEN or GH_TOKEN env var, or use --no-github-alias to disable)"
140140
);
141141
}
142142
}

0 commit comments

Comments
 (0)