Skip to content

Releases: hackliu/Github_Auto_Commit

Github Auto Commit v1.0.3 — Contribution Activity 支持

Choose a tag to compare

@hackliu hackliu released this 29 Jun 13:38

@

v1.0.3 — 支持自定义 Git 提交身份

新增功能

  • config.yaml 支持配置 user_name / user_email,提交会计入你的 GitHub Contribution Activity

使用方法

编辑 config.yamlcommit 部分,添加你的 GitHub 身份:

commit:
  # ... 其他配置 ...
  
  # Git 提交身份(计入 Contribution Activity 的关键)
  user_name: "hackliu"                      # 你的 GitHub 用户名
  user_email: "your-verified@email.com"     # 你的 GitHub 已验证邮箱

获取已验证邮箱

  1. 登录 GitHub → Settings → Emails
  2. 查看 "Primary email address" 或已添加的邮箱
  3. 将该邮箱填入 user_email 字段

⚠️ 使用 GitHub 提供的 @users.noreply.github.com 匿名邮箱的提交不会计入 Contribution Activity。

如何确认你的 GitHub noreply 邮箱

Settings → Emails → 勾选 "Keep my email addresses private" 后,GitHub 会显示类似 12345678+hackliu@users.noreply.github.com 的地址,这个地址的提交会计入 Contribution

与此不同,默认的 auto-commit-bot@users.noreply.github.com 不属于任何 GitHub 账户,因此不会计入任何人的 Contribution


累积变更(v1.0.1 → v1.0.3)

  • v1.0.3: 可配置 Git 提交身份
  • v1.0.2: Node.js 24 兼容
  • v1.0.1: 8 项代码错误修复
    @

Github Auto Commit v1.0.2 — Node.js 24 兼容

Choose a tag to compare

@hackliu hackliu released this 29 Jun 13:31

@

v1.0.2 — Node.js 24 兼容性更新

修复

  • 消除 GitHub Actions Node.js 20 deprecation warning
    • actions/checkout: v4 → v7
    • actions/setup-python: v5 → v6(原生支持 Node.js 24)

说明

GitHub Actions 已于 2025 年 9 月起弃用 Node.js 20 运行时。本次更新将两个 action 升级到最新版本,行动不再产生以下警告:

Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24.


与 v1.0.1 的累积变更

v1.0.1(Bug Fix Release)包含 8 项代码错误修复(详见 v1.0.1 Release Notes)。
@

Github Auto Commit v1.0.1 — Bug Fix Release

Choose a tag to compare

@hackliu hackliu released this 29 Jun 13:29

@

🔧 v1.0.1 Bug Fix Release

本次发布修复了 8 项代码错误与业务逻辑错误,显著提升了系统的健壮性和可用性。

🔴 严重修复

  1. --once 模式现在遵守 active_hours / skip_weekends

    • 之前 --once 模式无视时间窗口配置,24×7 不间断提交(包括半夜)
    • 现在非活跃时间窗口自动跳过,不产生提交
    • 修复后 GitHub Actions 提交时间将遵守配置的时间窗口
  2. run_once() 失败可见化

    • 之前提交失败时静默退出(exit 0),GitHub Actions 显示绿色但无提交
    • 现在失败时 sys.exit(1),Actions 显示红色并可查看错误详情
    • 捕获 RuntimeError(push 重试全部失败)防止崩溃
  3. 守护进程同日周期重入

    • 之前每日提交目标提前达成后,_seconds_until_next_window() 返回 0 导致立即进入新周期
    • 新增 _seconds_until_tomorrow_window() 确保每天只执行一个周期

🟡 中等修复

  1. GitHub Actions 工作流健壮性

    • 移除 continue-on-error: true(之前 config.yaml 缺失时工作流仍是绿色)
    • 新增 YAML 合法性验证
    • 新增 Token 存在性检查
  2. README 页脚空白行累积

    • 修复 _replace_or_append_footer() 在已有空白行时额外添加换行

🟢 低优先级修复

  1. configure_git_user() 使用 _retry_git_op 获得重试能力
  2. 移除冗余文件类型判断条件
  3. _execute_one_commit() 增加写入后验证和诊断日志

⚠️ 时区注意

GitHub Actions 运行器默认 UTC 时区。active_hours: [8, 23] 对应 UTC 8:00–22:59(北京时间 16:00–次日 06:59)。如需北京时间白天活跃,请改为 active_hours: [1, 15]

完整更新日志

详见 commit: b9e7f7dfix: 修复全部代码错误与业务逻辑错误
@

Github Auto Commit v1.0.0 — Initial Release

Choose a tag to compare

@hackliu hackliu released this 24 Jun 16:20

Github Auto Commit v1.0.0

项目简介

7×24 小时在线自动提交系统 — 自动、持续地向 GitHub 仓库生成真实感提交记录。

核心特性

  • 双模式运行: --daemon 守护进程 + --once 单次执行
  • 完全可配置: YAML 驱动——仓库、分支、频率、时间窗口、消息列表、目标文件
  • 随机化策略: 每日提交次数、间隔时间、提交消息、文件内容均随机
  • 安全认证: Token 仅存 .env,运行时注入 HTTPS URL,绝不落盘
  • 跨平台: Windows / macOS / Linux 统一代码路径
  • 多种部署: systemd / launchd / 任务计划程序 / Docker / GitHub Actions
  • 生产可用: 指数退避重试、Push 冲突自动 rebase、连续失败熔断、陈旧锁清理

快速开始

cp .env.example .env    # 编辑 .env 填入 GitHub Token
nano config.yaml         # 修改 repo_url 为目标仓库
pip install -r requirements.txt
python -m src.main --once

部署方式

详见 README.md §7