The open source coding agent.
TypeScript
Add gitlab-opencode to GitLab docs
Viktor Nagy1aae1c795db6
diff --git a/packages/web/src/content/docs/gitlab.mdx b/packages/web/src/content/docs/gitlab.mdxindex 66c006c8034..3810ba3185f 100644--- a/packages/web/src/content/docs/gitlab.mdx+++ b/packages/web/src/content/docs/gitlab.mdx@@ -3,12 +3,52 @@ title: GitLabdescription: Use OpenCode in GitLab issues and merge requests.---+## Integration options++There are at least two approaches to run OpenCode in GitLab:++- Run it in GitLab pipelines as a regular pipeline+- Run it through GitLab Duo++In both cases, OpenCode will run on your GitLab runners.++## GitLab CI integration++OpenCode works in a regular GitLab pipeline. You build it into a pipeline as a [CI component](https://docs.gitlab.com/ee/ci/components/)++---++### Features++- **Use custom configuration per job**: Configure OpenCode with a [custom configuration directory](./config/#custom-directory) to enable/disable functionality per OpenCode invocation.+- **Minimal setup**: The CI component sets up OpenCode in the background, you only need to create the OpenCode configuration and the initial prompt.+- **Flexible**: The CI component supports several inputs for customizing its behavior++### Setup++1. Store your OpenCode authentication JSON as a File type CI environment variables under **Settings -> CI/CD -> Variables**. Tip: Mark it "Masked and hidden".+2. Add code blocks like the following to your `.gitlab-ci.yml` file:++```+include:+ - component: $CI_SERVER_FQDN/nagyv/gitlab-opencode/[email protected]+ inputs:+ config_dir: ${CI_PROJECT_DIR}/opencode-config+ auth_json: $OPENCODE_AUTH_JSON # The variable name for your OpenCode authentication JSON+ command: optional-custom-command+ message: "Your prompt here"+```++See more inputs and use cases in [its documentation](https://gitlab.com/explore/catalog/nagyv/gitlab-opencode).++## GitLab Duo integration+OpenCode integrates with your GitLab workflow.Mention `@opencode` in a comment, and OpenCode will execute tasks within your GitLab CI pipeline.----## Features+### Features- **Triage issues**: Ask OpenCode to look into an issue and explain it to you.- **Fix and implement**: Ask OpenCode to fix an issue or implement a feature.@@ -17,7 +57,7 @@ Mention `@opencode` in a comment, and OpenCode will execute tasks within your Gi----## Setup+### SetupOpenCode runs in your GitLab CI/CD pipeline, here's what you'll need to set it up:@@ -113,7 +153,7 @@ You can refer to the [GitLab CLI agents docs](https://docs.gitlab.com/user/duo_a----## Examples+### ExamplesHere are some examples of how you can use OpenCode in GitLab.