Celebrate onboarding and agent wins with GitHub star prompts (#5642)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-06-17 22:21:32 -07:00
committed by GitHub
co-authored by Orca
parent 4a3ec0232f
commit fd9e79a77a
38 changed files with 2026 additions and 204 deletions
+10 -2
View File
@@ -236,8 +236,16 @@ function isNoPullRequestError(err: unknown): boolean {
export async function checkOrcaStarred(): Promise<boolean | null> {
await acquire()
try {
await execFileAsync('gh', ['api', `user/starred/${ORCA_REPO}`], { encoding: 'utf-8' })
return true
const { stdout, stderr } = await execFileAsync(
'gh',
['api', '--include', `user/starred/${ORCA_REPO}`],
{ encoding: 'utf-8' }
)
const response = `${stdout ?? ''}\n${stderr ?? ''}`
if (/HTTP\/\S+\s+(?:200|204)\b/.test(response)) {
return true
}
return null
} catch (err) {
const message = err instanceof Error ? err.message : String(err)
// 404 means the user hasn't starred — the only expected "no" answer