@jswork/ushell-module-git 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,10 +7,10 @@ BASE_BRANCH=${1:-dev}
7
7
  GIT_URL=$(git config --get remote.origin.url)
8
8
 
9
9
  # 从 GIT_URL 中 获取 applyai-dev/applyai-frontend
10
- PROJECT_NAME=$(echo $GIT_URL | awk -F'/' '{print $4}')
10
+ REPO_PATH=$(echo "$GIT_URL" | awk -F'[:/]' '{print $(NF-1)"/"$NF}' | cut -d '.' -f 1)
11
11
 
12
12
  # 获取当前分支名称
13
13
  CURRENT_BRANCH=$(git branch --show-current)
14
14
 
15
15
  # 打开 GitHub 对比页面
16
- open "https://github.com/$PROJECT_NAME/compare/$BASE_BRANCH...$CURRENT_BRANCH?expand=1"
16
+ open "https://github.com/$REPO_PATH/compare/$BASE_BRANCH...$CURRENT_BRANCH?expand=1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/ushell-module-git",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Unix like shell module for git.",
5
5
  "main": "index.sh",
6
6
  "repository": {