corrections

This commit is contained in:
vyas 2020-08-06 13:03:13 +05:30
parent 85e1c4ff0a
commit 238038139d
4 changed files with 16 additions and 16 deletions

View file

@ -39,11 +39,11 @@ fi
test -z "$user" && abort "git config user.email required"
# personal access token
# config name is personal-access-token '_' is not allowed in git config
# config name is github-personal-access-token '_' is not allowed in git config
personal_access_token=$(git config git-extras.personal-access-token)
github_personal_access_token=$(git config git-extras.github-personal-access-token)
test -z "$personal_access_token" && abort "git config git-extras.personal-access-token required"
test -z "$github_personal_access_token" && abort "git config git-extras.github-personal-access-token required"
# branch
@ -90,7 +90,7 @@ body=$(json "$title" "$body" "$branch" "$base")
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $personal_access_token" \
-H "Authorization: token $github_personal_access_token" \
-H "X-GitHub-OTP: $mfa_code" \
"https://api.github.com/repos/$project/pulls" -d "$body"

View file

@ -10,13 +10,13 @@ Create pull request for a project on GitHub via command line\.
.P
Uses the email from \fBgit config user\.email\fR to open the pull request\.
.P
Personal access token is required for making API call to open the pull request\.
Personal access token is required for making API call to open the pull request in Github\.
.P
Makre sure the personal access token has the right \fBOAuth\fR scopes for the repo(s)
Make sure the personal access token has the right \fBOAuth\fR scopes for the repo(s)
.P
use \fBgit config \-\-global \-\-add git\-extras\.personal\-access\-token <your\-personal\-access\-token>\fR
Use \fBgit config \-\-global \-\-add git\-extras\.github\-personal\-access\-token <your\-personal\-access\-token>\fR
.P
if using mutiple accounts, override the global value in the specific repo using \fBgit config git\-extras\.personal\-access\-token <other\-acc\-personal\-access\-token>\fR
If using mutiple accounts, override the global value in the specific repo using \fBgit config git\-extras\.github\-personal\-access\-token <other\-acc\-personal\-access\-token>\fR
.SH "OPTIONS"
<target branch>
.P

View file

@ -85,13 +85,13 @@
<p>Uses the email from <code>git config user.email</code> to open the pull request.</p>
<p>Personal access token is required for making API call to open the pull request.</p>
<p>Personal access token is required for making API call to open the pull request in Github.</p>
<p>Makre sure the personal access token has the right <code>OAuth</code> scopes for the repo(s)</p>
<p>Make sure the personal access token has the right <code>OAuth</code> scopes for the repo(s)</p>
<p>use <code>git config --global --add git-extras.personal-access-token &lt;your-personal-access-token&gt;</code></p>
<p>Use <code>git config --global --add git-extras.github-personal-access-token &lt;your-personal-access-token&gt;</code></p>
<p>if using mutiple accounts, override the global value in the specific repo using <code>git config git-extras.personal-access-token &lt;other-acc-personal-access-token&gt;</code></p>
<p>If using mutiple accounts, override the global value in the specific repo using <code>git config git-extras.github-personal-access-token &lt;other-acc-personal-access-token&gt;</code></p>
<h2 id="OPTIONS">OPTIONS</h2>

View file

@ -11,13 +11,13 @@ Create pull request for a project on GitHub via command line.
Uses the email from `git config user.email` to open the pull request.
Personal access token is required for making API call to open the pull request.
Personal access token is required for making API call to open the pull request in Github.
Makre sure the personal access token has the right `OAuth` scopes for the repo(s)
Make sure the personal access token has the right `OAuth` scopes for the repo(s)
use `git config --global --add git-extras.personal-access-token <your-personal-access-token>`
Use `git config --global --add git-extras.github-personal-access-token <your-personal-access-token>`
if using mutiple accounts, override the global value in the specific repo using `git config git-extras.personal-access-token <other-acc-personal-access-token>`
If using mutiple accounts, override the global value in the specific repo using `git config git-extras.github-personal-access-token <other-acc-personal-access-token>`
## OPTIONS