Files
Luhan Xiao e25ee6920e fix: 修复 MaaMacGui changelog 贡献者 mention (#16978)
## 变更内容

修复 MaaMacGui 子仓库 changelog 中贡献者 mention 可能错误的问题。

- associated PR 存在时,优先使用 PR 作者的 `user.login`,并保持 PR title / PR link
逻辑不变。
- 无 associated PR 时,使用 GitHub commit API 的 `author.login` 作为贡献者。
- 无法确认 GitHub login 时,不追加作者 mention。
- 不再使用 git author name / display name / commit author name 生成
`@mention`。
- 不写入主仓库 `contributors` 映射,避免污染主仓库贡献者缓存。
- 过滤空 contributors,避免生成无效 mention。

## 验证

- `python3 -m py_compile
tools/ChangelogGenerator/changelog_generator.py`
- `git diff --cached --check`
- 使用 MaaMacGui 真实历史区间验证:
  - `Add localized strings for relaunch case` 输出 `@ABA2396`
  - `RelaunchAnchor` 输出 `@hguandl`
  - 不再输出 `@uye` / `@hao Guan`
  - PR 记录仍正常输出 `@FireflySentinel` / `@ColdSpellhere`

## Summary by Sourcery

基于 GitHub 元数据而非本地 git 作者信息,改进 MaaMacGui 更新日志中的贡献者提及方式。

Bug 修复:
- 防止空的贡献者账号在生成的更新日志中产生无效的 @提及。
- 确保 MaaMacGui 更新日志使用关联的 PR 作者登录名或提交作者登录名作为贡献者提及,避免错误或缺失的映射。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Improve MaaMacGui changelog contributor mentions based on GitHub
metadata instead of local git author information.

Bug Fixes:
- Prevent empty contributor handles from producing invalid @mentions in
generated changelogs.
- Ensure MaaMacGui changelog uses the associated PR author login or
commit author login as the contributor mention, avoiding incorrect or
missing mappings.

</details>
2026-06-04 00:17:15 +08:00
..
2023-03-14 22:29:49 +08:00