File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
packages/components/src/components/context Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import {
2929 clearOAuthQueryParams ,
3030 clearQueryStringFromURL ,
3131} from '../../utils/helpers/auth'
32+ import { Platform } from '../../libs/platform'
3233
3334export interface LoginHelpersProviderProps {
3435 children ?: React . ReactNode
@@ -145,8 +146,22 @@ export function LoginHelpersProvider(props: LoginHelpersProviderProps) {
145146 {
146147 text : 'Create new token' ,
147148 onPress : ( ) => {
149+ const description = Platform . isMacOS
150+ ? 'DevHub (macOS native)'
151+ : Platform . isElectron
152+ ? `DevHub (${ Platform . realOS } )`
153+ : Platform . isDesktop
154+ ? `DevHub (${ Platform . realOS } )`
155+ : Platform . isPad
156+ ? 'DevHub (iPad)'
157+ : Platform . OS === 'ios'
158+ ? 'DevHub (iOS)'
159+ : `DevHub (${ Platform . OS } )`
160+
148161 Browser . openURLOnNewTab (
149- `https://github.com/settings/tokens/new?description=DevHub&scopes=${ (
162+ `https://github.com/settings/tokens/new?description=${ encodeURIComponent (
163+ description ,
164+ ) } &scopes=${ (
150165 constants . FULL_ACCESS_GITHUB_OAUTH_SCOPES ||
151166 _ . uniq ( [ ...constants . DEFAULT_GITHUB_OAUTH_SCOPES , 'repo' ] )
152167 ) . join ( ',' ) } `,
You can’t perform that action at this time.
0 commit comments