Skip to content

Commit cb862b6

Browse files
committed
Merge pull request #13 from DavidSouther/hotfix/login
hotfix/login: Added calls to github_login at appropriate points in workflow.
2 parents 7fdf80e + 604d820 commit cb862b6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎bin/git-hub-helpers‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ github(){
1111
URL=$1
1212
DATA=$2
1313

14+
github_login
15+
1416
AUTH="Authorization: token $(cat ~/.github_token)"
1517
CURL="curl"
1618
if [ ! -z "$DATA" ] ; then
@@ -42,7 +44,7 @@ github_user(){
4244

4345
# Get an access token.
4446
github_login(){
45-
curl -u $(github_user) -d '{"scopes":["repo"],"note":"git-hub-flow"}' $API/authorizations | json token >| ~/.github_token
47+
[ -f ~/.github_token ] || curl -u $(github_user) -d '{"scopes":["repo"],"note":"git-hub-flow"}' $API/authorizations | json token >| ~/.github_token
4648
}
4749

4850
# Find the pr number from the current branch.

0 commit comments

Comments
 (0)