-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add ability to delete a token #4235
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9ca5c60
Add ability to delete a token
techknowlogick 4ec4dc8
add swagger file
techknowlogick 8654ad7
resolve swagger issues
techknowlogick e211c28
correct api description
techknowlogick 112ec99
add ID as an output for list API
techknowlogick b91a969
update code.gitea.io/sdk with changes
techknowlogick 9cae3ea
Merge branch 'master' into issue-4234
techknowlogick f426f13
ID first
techknowlogick b6891c1
Merge branch 'master' into issue-4234
techknowlogick 0d8a446
Merge branch 'master' into issue-4234
techknowlogick 071ad8d
Merge branch 'master' into issue-4234
techknowlogick 255ccc9
add some tests
techknowlogick ae4f22a
fix syntax
techknowlogick b47947a
make fmt
techknowlogick 52f139a
missing import
techknowlogick 1afda06
remove import
techknowlogick be1687f
tokens api can only auth via basic auth
techknowlogick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
Question for reviewers: This deletes based on ID (int), however we only return the name (string) of the token above. So this works, but users need to know what the ID (int) is before using this. My question is: Should this be changed to delete based on token name (string)?
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.
How does GitHub API works?
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.
@lafriks Their docs say they use the integer ID of the token: https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization
They also list the ID in the response when listing the tokens, so I will keep this PR the same, and I'll update this PR to include the ID in the List endpoint.