this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lint

+42 -11
+42 -11
packages/remanso/src/commands/github.ts
··· 4 4 import { command, flag } from "cmd-ts"; 5 5 import { log, spinner, confirm, text } from "@clack/prompts"; 6 6 import { exitOnCancel } from "../../../cli/src/lib/prompts"; 7 - import { getCredentials, listCredentials } from "../../../cli/src/lib/credentials"; 7 + import { 8 + getCredentials, 9 + listCredentials, 10 + } from "../../../cli/src/lib/credentials"; 8 11 9 12 export const WORKFLOW_YAML = `name: Publish to the PDS 10 13 on: ··· 43 46 }).trim(); 44 47 45 48 // Parse SSH: git@github.com:owner/repo.git 46 - const sshMatch = remote.match(/git@github\.com:([^/]+)\/([^.]+)(?:\.git)?$/); 49 + const sshMatch = remote.match( 50 + /git@github\.com:([^/]+)\/([^.]+)(?:\.git)?$/, 51 + ); 47 52 if (sshMatch) { 48 53 return { owner: sshMatch[1]!, repo: sshMatch[2]! }; 49 54 } ··· 86 91 async function setSecrets(): Promise<void> { 87 92 const remote = detectGitHubRemote(); 88 93 if (!remote) { 89 - log.warn( 90 - "Could not detect GitHub remote. Skipping secret setup.", 91 - ); 94 + log.warn("Could not detect GitHub remote. Skipping secret setup."); 92 95 log.info( 93 96 "Add ATP_IDENTIFIER and ATP_APP_PASSWORD manually in your GitHub repo settings.", 94 97 ); ··· 120 123 log.info(`Using stored credentials for: ${identifier}`); 121 124 } else { 122 125 identifier = exitOnCancel( 123 - await text({ message: "ATProto handle (ATP_IDENTIFIER):", placeholder: "you.bsky.social" }), 126 + await text({ 127 + message: "ATProto handle (ATP_IDENTIFIER):", 128 + placeholder: "you.bsky.social", 129 + }), 124 130 ); 125 131 appPassword = exitOnCancel( 126 - await text({ message: "App Password (ATP_APP_PASSWORD):", placeholder: "xxxx-xxxx-xxxx-xxxx" }), 132 + await text({ 133 + message: "App Password (ATP_APP_PASSWORD):", 134 + placeholder: "xxxx-xxxx-xxxx-xxxx", 135 + }), 127 136 ); 128 137 } 129 138 } else if (storedIds.length > 1) { ··· 143 152 appPassword = creds.password; 144 153 } else { 145 154 identifier = exitOnCancel( 146 - await text({ message: "ATProto handle (ATP_IDENTIFIER):", placeholder: "you.bsky.social" }), 155 + await text({ 156 + message: "ATProto handle (ATP_IDENTIFIER):", 157 + placeholder: "you.bsky.social", 158 + }), 147 159 ); 148 160 appPassword = exitOnCancel( 149 - await text({ message: "App Password (ATP_APP_PASSWORD):", placeholder: "xxxx-xxxx-xxxx-xxxx" }), 161 + await text({ 162 + message: "App Password (ATP_APP_PASSWORD):", 163 + placeholder: "xxxx-xxxx-xxxx-xxxx", 164 + }), 150 165 ); 151 166 } 152 167 ··· 156 171 s.start("Setting ATP_IDENTIFIER secret..."); 157 172 const r1 = spawnSync( 158 173 "gh", 159 - ["secret", "set", "ATP_IDENTIFIER", "--body", identifier, "--repo", repoFlag], 174 + [ 175 + "secret", 176 + "set", 177 + "ATP_IDENTIFIER", 178 + "--body", 179 + identifier, 180 + "--repo", 181 + repoFlag, 182 + ], 160 183 { stdio: "pipe" }, 161 184 ); 162 185 if (r1.status === 0) { ··· 169 192 s.start("Setting ATP_APP_PASSWORD secret..."); 170 193 const r2 = spawnSync( 171 194 "gh", 172 - ["secret", "set", "ATP_APP_PASSWORD", "--body", appPassword, "--repo", repoFlag], 195 + [ 196 + "secret", 197 + "set", 198 + "ATP_APP_PASSWORD", 199 + "--body", 200 + appPassword, 201 + "--repo", 202 + repoFlag, 203 + ], 173 204 { stdio: "pipe" }, 174 205 ); 175 206 if (r2.status === 0) {