Skip to content

Conversation

@duckunix
Copy link
Contributor

@duckunix 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\""
Copy link
Collaborator

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:

github_personal_access_token=$(git config git-extras.github-personal-access-token)

Don't forget to update the doc

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, interesting 🤔

Copy link
Contributor Author

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!

duckunix added 2 commits June 4, 2021 20:08
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay...updated.

@duckunix
Copy link
Contributor Author

duckunix commented Jun 5, 2021

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.
Copy link
Collaborator

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"

Copy link
Contributor Author

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)
Copy link
Collaborator

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.

Copy link
Contributor Author

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

@spacewander spacewander merged commit b225ed4 into tj:master Jun 9, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants