Skip to content
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

getGithubAccessToken API #2273

Merged
merged 1 commit into from
Aug 19, 2019
Merged

getGithubAccessToken API #2273

merged 1 commit into from
Aug 19, 2019

Conversation

yann300
Copy link
Collaborator

@yann300 yann300 commented Aug 19, 2019

@@ -10,14 +10,15 @@ import * as packageJson from '../../../package.json'
const profile = {
name: 'settings',
displayName: 'Settings',
methods: [],
methods: ['getGithubAccessToken'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why "Access" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that's Personal access tokens in https://github.com/settings/tokens

@@ -162,4 +163,8 @@ module.exports = class SettingsTab extends ViewPlugin {
this._deps.themeModule.switchTheme()
return this._view.el
}

getGithubAccessToken () {
return new Promise((resolve, reject) => resolve(this.config.get('settings/gist-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.

You don't need to return a promise :

return this.config.get('settings/gist-access-token')

@yann300 yann300 force-pushed the getgithubKey_as_api branch 2 times, most recently from 75f2549 to a2e46cf Compare August 19, 2019 14:12
@yann300 yann300 merged commit 028e3c1 into master Aug 19, 2019
@yann300 yann300 deleted the getgithubKey_as_api branch September 29, 2019 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants