This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Read JSON input from stdin | |
| input=$(cat) | |
| # Extract git remote repo name | |
| cwd=$(echo "$input" | jq -r '.workspace.current_dir // empty') | |
| reponame="" | |
| if [ -n "$cwd" ] && [ -d "$cwd" ]; then | |
| remote_url=$(git -C "$cwd" --no-optional-locks remote get-url origin 2>/dev/null) |