Skip to content

Commit

Permalink
feat: adding git configs to yolo auth (#36)
Browse files Browse the repository at this point in the history
* feat: adding git configs to yolo auth

* Update yolo.sh
  • Loading branch information
venkatamutyala authored Dec 28, 2023
1 parent 4a6843b commit b5b4904
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/tools/yolo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,12 @@ yolo() {

echo "Set up git with gh auth"
gh auth setup-git

# Configure git config
git_email=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /user/emails | jq '.[] | select(.primary == true) | .email' -r)
git_name=$(gh api user | jq '.name' -r)
git config --global user.email "${git_email}"
git config --global user.name "${git_name}"
git config --global core.autocrlf input
fi
}

0 comments on commit b5b4904

Please sign in to comment.