-
Notifications
You must be signed in to change notification settings - Fork 1.2k
git-fork | update to match REST-API auth standards as of 2021-06 #928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
duckunix
commented
Jun 4, 2021
- Removed prompt for OATH Token
- Change prompt from 'password' to 'GitHub Personal Access Token'
- Removed prompt for OATH Token - Change prompt from 'password' to 'GitHub Personal Access Token'
bin/git-fork
Outdated
| read user | ||
| [ -n "$user" ] || abort "git username required" | ||
| echo "Enter github password for user \"$user\"" | ||
| echo "Enter github Personal Access Token for user \"$user\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can fetch token like this:
git-extras/bin/git-pull-request
Line 34 in 206fe7c
| github_personal_access_token=$(git config git-extras.github-personal-access-token) |
Don't forget to update the doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I have updated the code based on @spacewander 's feedback. Thanks!
Added support for pulling personal-access-token, borrowing from git-pull-request
| # 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the doc like this:
https://github.com/tj/git-extras/blob/master/man/git-pull-request.md#description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay...updated.
…personal access token
|
This address #927 |
man/git-fork.md
Outdated
|
|
||
| Remotes will use ssh if you have it configured with GitHub, if not, https will be used. | ||
|
|
||
| Create pull request for a project on GitHub via command line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should update the "pull request" to "fork"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack...good catch. Fixed.
man/git-fork.md
Outdated
| Create a fork of a project on GitHub via command line. | ||
|
|
||
| A personal access token is required for making the API call to open the pull request(s) in GitHub. [API Documentation here](https://docs.github.com/en/rest/reference/pulls#create-a-pull-request) | ||
| A personal access token is required for making the API call to create a fork in GitHub. [API Documentation here](https://docs.github.com/en/rest/reference/pulls#create-a-pull-request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link should be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed that. Thanks for keeping a good eye on the PRs. Fixed this via 30383f9
Added support for pulling personal-access-token, borrowing from git-pull-request