@jswork/ushell-module-git 1.0.26 → 1.0.28

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.
package/index.sh CHANGED
@@ -86,7 +86,8 @@ alias github-cache='ssh-add ~/.ssh/id_rsa.github.com >/dev/null 2>/dev/null;';
86
86
  alias mvg="${ROOT_PATH}/modules/08-mvg.sh";
87
87
 
88
88
  # oprr
89
- alias oprr="${ROOT_PATH}/modules/09-oprr.sh"
89
+ alias oprr="${ROOT_PATH}/modules/09-oprr.sh";
90
+ alias opc="${ROOT_PATH}/modules/10-opc.sh";
90
91
 
91
92
  # git-url-cli
92
93
  # alias guc='git-url-cli'
@@ -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"
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # GIT_URL: git@github.com:afeiship/ushell-module-git.git
4
+ GIT_URL=$(git config --get remote.origin.url)
5
+
6
+ # 从 GIT_URL 中 获取 applyai-dev/applyai-frontend
7
+ REPO_PATH=$(echo "$GIT_URL" | awk -F'[:/]' '{print $(NF-1)"/"$NF}' | cut -d '.' -f 1)
8
+
9
+ # 获取当前分支名称
10
+ CURRENT_BRANCH=$(git branch --show-current)
11
+
12
+ # 打开 GitHub 对比页面
13
+ open "https://github.com/$REPO_PATH/commits/$CURRENT_BRANCH"
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.28",
4
4
  "description": "Unix like shell module for git.",
5
5
  "main": "index.sh",
6
6
  "repository": {