mirror of
https://github.com/sst/opencode.git
synced 2025-08-22 05:54:08 +00:00
docs: gitlab
This commit is contained in:
parent
8b01676ec0
commit
256d074411
2 changed files with 96 additions and 70 deletions
|
@ -67,7 +67,14 @@ export default defineConfig({
|
|||
|
||||
{
|
||||
label: "Usage",
|
||||
items: ["docs/tui", "docs/cli", "docs/ide", "docs/share", "docs/github"],
|
||||
items: [
|
||||
"docs/tui",
|
||||
"docs/cli",
|
||||
"docs/ide",
|
||||
"docs/share",
|
||||
"docs/github",
|
||||
"docs/gitlab"
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
|
|
|
@ -19,10 +19,21 @@ Mention `@opencode` in a comment, and opencode will execute tasks within your Gi
|
|||
|
||||
## Setup
|
||||
|
||||
Refer to the [GitLab CLI agents docs](https://docs.gitlab.com/user/duo_agent_platform/agent_assistant/)
|
||||
for detailed setup instructions.
|
||||
opencode runs in your GitLab CI/CD pipeline, here's what you'll need to set it up:
|
||||
|
||||
Here is an example of the agent configuration:
|
||||
:::tip
|
||||
Check out the [**GitLab docs**](https://docs.gitlab.com/user/duo_agent_platform/agent_assistant/) for up to date instructions.
|
||||
:::
|
||||
|
||||
1. Configure your GitLab environment
|
||||
2. Set up CI/CD
|
||||
3. Get an AI model provider API key
|
||||
4. Create a service account
|
||||
5. Configure CI/CD variables
|
||||
6. Create a flow config file, here's an example:
|
||||
|
||||
<details>
|
||||
<summary>Flow configuration</summary>
|
||||
|
||||
```yaml
|
||||
image: node:22-slim
|
||||
|
@ -95,12 +106,20 @@ variables:
|
|||
- GITLAB_HOST
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
You can refer to the [GitLab CLI agents docs](https://docs.gitlab.com/user/duo_agent_platform/agent_assistant/) for detailed instructions.
|
||||
|
||||
---
|
||||
|
||||
## Examples
|
||||
|
||||
Here are some examples of how you can use opencode in GitLab.
|
||||
|
||||
:::tip
|
||||
You can configure to use a different trigger phrase than `@opencode`.
|
||||
:::
|
||||
|
||||
- **Explain an issue**
|
||||
|
||||
Add this comment in a GitLab issue.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue