sourcegit icon indicating copy to clipboard operation
sourcegit copied to clipboard

[PR] 自定义 action 添加仓库本地文件夹的的变量

Open heartacker opened this issue 5 months ago • 3 comments

Image

${repo} 是仓库路径 希望可以添加一个 仓库文件夹名字的变量 如 ${folder}

heartacker avatar Jul 28 '25 07:07 heartacker

建议:

  1. LOCAL_DIR: 当前repo 所在的文件夹名字
  2. REPO_NAME : 远程仓库的名字中项目的名字 如 sourcegit-scm/sourcegit 中的 sourcegit

heartacker avatar Jul 28 '25 09:07 heartacker

建议:

  1. LOCAL_DIR: 当前repo 所在的文件夹名字
  2. REPO_NAME : 远程仓库的名字中项目的名字 如 sourcegit-scm/sourcegit 中的 sourcegit

@love-linger 恳求添加 DIR_NAME,

为啥需要这个的原因是因为

  1. git 在不添加文件夹名字的情况下,默认就是用git 远程仓库的名字, 这相当于我能够获取仓库的名字,这对于大量的仓库的管理非常有用

比如我一个项目很多仓库, 我知道这个文件夹,我加上我公司的git 网址前缀吗,就可以获取到他的 远程仓库,这样对我们配合非常重要,

再次恳求添加支持,PR 已经提交

heartacker avatar Aug 15 '25 02:08 heartacker

对于一个本地仓库来说,该目录是确定的,并非变量,同时自定义命令可以使用脚本文件从运行路径中解析出仓库文件夹名呀。

love-linger avatar Aug 15 '25 03:08 love-linger