ryinner / githubinfo
从 git 获取信息的简单包
1.0.0
2024-04-05 06:18 UTC
README
这是一个从 git 获取信息的简单包。
Informer 使用本地命令调用以获取有关仓库的信息。它仅运行 shell 脚本并通过正则表达式清理消息。
功能
(new Informer)->getConfigUsername
-git config user.name
,返回字符串;(new Informer)->getCurrentBranch
-git branch
+ 正则表达式,返回字符串;(new Informer)->getLastCommitHashByOriginBranch
-git ls-remote --heads origin
+ 正则表达式,返回字符串;