MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getOpenUrlsCommands

Function getOpenUrlsCommands

packages/cli/src/ui/commands/setupGithubCommand.ts:29–46  ·  view source on GitHub ↗
(readmeUrl: string)

Source from the content-addressed store, hash-verified

27
28// Generate OS-specific commands to open the GitHub pages needed for setup.
29function getOpenUrlsCommands(readmeUrl: string): string[] {
30 // Determine the OS-specific command to open URLs, ex: 'open', 'xdg-open', etc
31 const openCmd = getUrlOpenCommand();
32
33 // Build a list of URLs to open
34 const urlsToOpen = [readmeUrl];
35
36 const repoInfo = getGitHubRepoInfo();
37 if (repoInfo) {
38 urlsToOpen.push(
39 `https://github.com/${repoInfo.owner}/${repoInfo.repo}/settings/secrets/actions`,
40 );
41 }
42
43 // Create and join the individual commands
44 const commands = urlsToOpen.map((url) => `${openCmd} "${url}"`);
45 return commands;
46}
47
48export const setupGithubCommand: SlashCommand = {
49 name: 'setup-github',

Callers 1

Calls 2

getUrlOpenCommandFunction · 0.85
getGitHubRepoInfoFunction · 0.85

Tested by

no test coverage detected