diff --git a/bin/git-fork b/bin/git-fork index ba85283f..3d3742fd 100755 --- a/bin/git-fork +++ b/bin/git-fork @@ -17,9 +17,9 @@ read -r user # personal access token # config name is github-personal-access-token '_' is not allowed in git config -github_personal_access_token=$(git config git-extras.github-personal-access-token) +github_personal_access_token=$(git config --default "$GITHUB_TOKEN" git-extras.github-personal-access-token) -test -z "$github_personal_access_token" && abort "git config git-extras.github-personal-access-token required" +test -z "$github_personal_access_token" && abort "GITHUB_TOKEN, or git config git-extras.github-personal-access-token required" # extract owner + project from repo url project=${url##*/} diff --git a/bin/git-pull-request b/bin/git-pull-request index 5787da14..3bd2060e 100755 --- a/bin/git-pull-request +++ b/bin/git-pull-request @@ -31,9 +31,9 @@ EOF # personal access token # config name is github-personal-access-token '_' is not allowed in git config -github_personal_access_token=$(git config git-extras.github-personal-access-token) +github_personal_access_token=$(git config --default "$GITHUB_TOKEN" git-extras.github-personal-access-token) -test -z "$github_personal_access_token" && abort "git config git-extras.github-personal-access-token required" +test -z "$github_personal_access_token" && abort "GITHUB_TOKEN or git config git-extras.github-personal-access-token required" # branch diff --git a/man/git-fork.1 b/man/git-fork.1 index e259745e..805fbf9b 100644 --- a/man/git-fork.1 +++ b/man/git-fork.1 @@ -49,7 +49,7 @@ A personal access token is required for making the API call to create a new fork Make sure the personal access token has the right \fBOAuth\fR scopes for the repo(s) . .P -Use \fBgit config \-\-global \-\-add git\-extras\.github\-personal\-access\-token \fR +Use \fBGITHUB_TOKEN\fR environment variable, or \fBgit config \-\-global \-\-add git\-extras\.github\-personal\-access\-token \fR . .P If using multiple accounts, override the global value in the specific repo using \fBgit config git\-extras\.github\-personal\-access\-token \fR diff --git a/man/git-fork.html b/man/git-fork.html index 3ad0fbf5..cba625a3 100644 --- a/man/git-fork.html +++ b/man/git-fork.html @@ -105,7 +105,7 @@

DESCRIPTION

Make sure the personal access token has the right OAuth scopes for the repo(s)

-

Use git config --global --add git-extras.github-personal-access-token <your-personal-access-token>

+

Use GITHUB_TOKEN environment variable, or git config --global --add git-extras.github-personal-access-token <your-personal-access-token>

If using multiple accounts, override the global value in the specific repo using git config git-extras.github-personal-access-token <other-acc-personal-access-token>

diff --git a/man/git-fork.md b/man/git-fork.md index 701ac87a..ace3ffdf 100644 --- a/man/git-fork.md +++ b/man/git-fork.md @@ -27,7 +27,7 @@ git-fork(1) -- Fork a repo on github Make sure the personal access token has the right `OAuth` scopes for the repo(s) - Use `git config --global --add git-extras.github-personal-access-token ` + Use `GITHUB_TOKEN` environment variable, or `git config --global --add git-extras.github-personal-access-token ` If using multiple accounts, override the global value in the specific repo using `git config git-extras.github-personal-access-token ` diff --git a/man/git-pull-request.1 b/man/git-pull-request.1 index b44859c4..3d8981c0 100644 --- a/man/git-pull-request.1 +++ b/man/git-pull-request.1 @@ -19,7 +19,7 @@ A personal access token is required for making the API call to open the pull req Make sure the personal access token has the right \fBOAuth\fR scopes for the repo(s) . .P -Use \fBgit config \-\-global \-\-add git\-extras\.github\-personal\-access\-token \fR +Use \fBGITHUB_TOKEN\fR environment variable, or \fBgit config \-\-global \-\-add git\-extras\.github\-personal\-access\-token \fR . .P If using multiple accounts, override the global value in the specific repo using \fBgit config git\-extras\.github\-personal\-access\-token \fR diff --git a/man/git-pull-request.html b/man/git-pull-request.html index fa5796e1..58f280e1 100644 --- a/man/git-pull-request.html +++ b/man/git-pull-request.html @@ -86,7 +86,7 @@

DESCRIPTION

Make sure the personal access token has the right OAuth scopes for the repo(s)

-

Use git config --global --add git-extras.github-personal-access-token <your-personal-access-token>

+

Use GITHUB_TOKEN environment variable, or git config --global --add git-extras.github-personal-access-token <your-personal-access-token>

If using multiple accounts, override the global value in the specific repo using git config git-extras.github-personal-access-token <other-acc-personal-access-token>

@@ -104,9 +104,9 @@

EXAMPLES

create pull-request for spacewander/spacewander-toolbox 'master' title: test - body: - base [master]: - GitHub two-factor authentication code (leave blank if not set up): + body: + base [master]: + GitHub two-factor authentication code (leave blank if not set up): ... diff --git a/man/git-pull-request.md b/man/git-pull-request.md index 8c1489b9..9b40d9e7 100644 --- a/man/git-pull-request.md +++ b/man/git-pull-request.md @@ -13,7 +13,7 @@ A personal access token is required for making the API call to open the pull req Make sure the personal access token has the right `OAuth` scopes for the repo(s) -Use `git config --global --add git-extras.github-personal-access-token ` +Use `GITHUB_TOKEN` environment variable, or `git config --global --add git-extras.github-personal-access-token ` If using multiple accounts, override the global value in the specific repo using `git config git-extras.github-personal-access-token `