Skip to content

Commit b53b466

Browse files
authored
Improve git-standup.sh (raycast#533)
1 parent fe07a95 commit b53b466

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

commands/developer-utils/git/git-standup.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,27 @@
1010
# Optional parameters:
1111
# @raycast.icon ./images/git.png
1212
# @raycast.packageName Git
13-
# @raycast.argument1 { "type": "text", "placeholder": "Since", "optional": true }
14-
# @raycast.currentDirectoryPath ~/Developer/script-commands
13+
# @raycast.argument1 { "type": "text", "placeholder": "Project Path"}
14+
# @raycast.argument2 { "type": "text", "placeholder": "Since (e.g: 1 week)", "optional": true }
1515

1616
# Documentation:
1717
# @raycast.author Thomas Paul Mann
1818
# @raycast.authorURL https://github.com/thomaspaulmann
1919
# @raycast.description Lists your commits from the last 24 hours. Optionally specify since when, e.g. "1 week".
2020

2121
if [ -n "$1" ]; then
22-
SINCE="$1"
22+
PROJECT_PATH="$1"
23+
else
24+
echo "Please give project path"
25+
exit 1
26+
fi
27+
28+
if [ -n "$2" ]; then
29+
SINCE="$2"
2330
else
2431
SINCE="yesterday.midnight"
2532
fi
33+
cd "$PROJECT_PATH" || exit 1
2634

2735
USER_NAME=$(git config user.name)
2836
git log --author="$USER_NAME" --since="$SINCE" --oneline --pretty=format:"%s %Cblue(%ar)%Creset" --color

0 commit comments

Comments
 (0)