MCPcopy Index your code
hub / github.com/gitify-app/gitify / getDeveloperSettingsURL

Function getDeveloperSettingsURL

src/renderer/utils/auth/utils.ts:216–234  ·  view source on GitHub ↗
(account: Account)

Source from the content-addressed store, hash-verified

214 * @returns The URL to the relevant GitHub developer settings page.
215 */
216export function getDeveloperSettingsURL(account: Account): Link {
217 const settingsURL = new URL(`https://${account.hostname}`);
218
219 switch (account.method) {
220 case 'GitHub App':
221 settingsURL.pathname = `/settings/connections/applications/${Constants.OAUTH_DEVICE_FLOW_CLIENT_ID}`;
222 break;
223 case 'OAuth App':
224 settingsURL.pathname = '/settings/developers';
225 break;
226 case 'Personal Access Token':
227 settingsURL.pathname = '/settings/tokens';
228 break;
229 default:
230 settingsURL.pathname = '/settings';
231 break;
232 }
233 return settingsURL.toString() as Link;
234}
235
236/**
237 * Build a pre-filled URL for creating a new Personal Access Token.

Callers 1

openDeveloperSettingsFunction · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected