diff options
| author | Frank <[email protected]> | 2025-07-20 12:36:53 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-07-20 12:36:53 -0400 |
| commit | 933d50e25a7076e4587d2579c07f21f6bc02d07f (patch) | |
| tree | c9e6a30b9abfd034948404ee65f87ecdead7bbde /packages | |
| parent | 800bee2722029ac6f531a4c18c7e52c1697a3c64 (diff) | |
| download | opencode-933d50e25a7076e4587d2579c07f21f6bc02d07f.tar.gz opencode-933d50e25a7076e4587d2579c07f21f6bc02d07f.zip | |
wip: github actions
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/cli/cmd/install-github.ts | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/packages/opencode/src/cli/cmd/install-github.ts b/packages/opencode/src/cli/cmd/install-github.ts index 604d76a48..a3114f7d8 100644 --- a/packages/opencode/src/cli/cmd/install-github.ts +++ b/packages/opencode/src/cli/cmd/install-github.ts @@ -84,40 +84,22 @@ export const InstallGithubCommand = cmd({ let provider = await prompts.select({ message: "Select provider", maxItems: 8, - options: [ - ...pipe( - providers, - values(), - sortBy( - (x) => priority[x.id] ?? 99, - (x) => x.name ?? x.id, - ), - map((x) => ({ - label: x.name, - value: x.id, - hint: priority[x.id] === 0 ? "recommended" : undefined, - })), + options: pipe( + providers, + values(), + sortBy( + (x) => priority[x.id] ?? 99, + (x) => x.name ?? x.id, ), - { - value: "other", - label: "Other", - }, - ], + map((x) => ({ + label: x.name, + value: x.id, + hint: priority[x.id] === 0 ? "recommended" : undefined, + })), + ), }) if (prompts.isCancel(provider)) throw new UI.CancelledError() - if (provider === "other") { - provider = await prompts.text({ - message: "Enter provider id", - validate: (x) => (x.match(/^[a-z-]+$/) ? undefined : "a-z and hyphens only"), - }) - if (prompts.isCancel(provider)) throw new UI.CancelledError() - provider = provider.replace(/^@ai-sdk\//, "") - if (prompts.isCancel(provider)) throw new UI.CancelledError() - prompts.log.warn( - `This only stores a credential for ${provider} - you will need configure it in opencode.json, check the docs for examples.`, - ) - } return provider } @@ -211,7 +193,11 @@ on: jobs: opencode: - if: startsWith(github.event.comment.body, 'hey opencode') + if: | + startsWith(github.event.comment.body, 'opencode') || + startsWith(github.event.comment.body, 'hi opencode') || + startsWith(github.event.comment.body, 'hey opencode') || + contains(github.event.comment.body, '@opencode-agent') runs-on: ubuntu-latest permissions: id-token: write |
