git-fork | update to match REST-API auth standards as of 2021-06#928
Merged
spacewander merged 6 commits intotj:masterfrom Jun 9, 2021
Merged
git-fork | update to match REST-API auth standards as of 2021-06#928spacewander merged 6 commits intotj:masterfrom
spacewander merged 6 commits intotj:masterfrom
Conversation
Contributor
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'
spacewander
reviewed
Jun 4, 2021
| read user | ||
| [ -n "$user" ] || abort "git username required" | ||
| echo "Enter github password for user \"$user\"" | ||
| echo "Enter github Personal Access Token for user \"$user\"" |
Collaborator
There was a problem hiding this comment.
We can fetch token like this:
git-extras/bin/git-pull-request
Line 34 in 206fe7c
Don't forget to update the doc
Contributor
Author
There was a problem hiding this comment.
Okay, I have updated the code based on @spacewander 's feedback. Thanks!
Added support for pulling personal-access-token, borrowing from git-pull-request
spacewander
reviewed
Jun 5, 2021
| # 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) |
Collaborator
There was a problem hiding this comment.
…personal access token
Contributor
Author
|
This address #927 |
spacewander
requested changes
Jun 7, 2021
|
|
||
| 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. |
Collaborator
There was a problem hiding this comment.
Should update the "pull request" to "fork"
Contributor
Author
There was a problem hiding this comment.
Ack...good catch. Fixed.
spacewander
reviewed
Jun 7, 2021
| 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) |
Collaborator
There was a problem hiding this comment.
The link should be updated.
Contributor
Author
There was a problem hiding this comment.
Sorry, missed that. Thanks for keeping a good eye on the PRs. Fixed this via 30383f9
bl-ue
approved these changes
Jun 7, 2021
spacewander
approved these changes
Jun 8, 2021
spacewander
pushed a commit
to spacewander/git-extras
that referenced
this pull request
Jul 9, 2021
Added support for pulling personal-access-token, borrowing from git-pull-request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.