-
Notifications
You must be signed in to change notification settings - Fork 44
Add i18n examples and revise the AI integration page for clarity. #774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7c90d8f
89a7ce2
a361eef
63a1230
3afa41f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Repository Overview | ||
|
|
||
| This is the gitStream repository - a workflow automation tool for git repositories that allows users to create automated code review workflows using YAML and Jinja2 templates. gitStream processes Continuous Merge (CM) files (`.cm` extension) that define automations for pull/merge requests across GitHub, GitLab, and Bitbucket. | ||
|
|
||
| ## Development Commands | ||
|
|
||
| ### Documentation Server | ||
| The documentation is built using MkDocs Material theme. | ||
|
|
||
| ```bash | ||
| # Set up Python virtual environment (Python <= 3.10 required) | ||
| python -m venv .venv | ||
| . ./.venv/bin/activate | ||
|
|
||
| # Install dependencies | ||
| pip install -r requirements.txt | ||
|
|
||
| # Run documentation server locally | ||
| mkdocs serve # Runs at http://127.0.0.1:8000/ | ||
|
|
||
| # Build documentation | ||
| mkdocs build | ||
| ``` | ||
|
|
||
| ## Code Architecture | ||
|
|
||
| ### Project Structure | ||
| - **docs/** - Documentation source files (Markdown) | ||
| - `automations/` - Automation examples and library | ||
| - `downloads/` - Downloadable CM files and templates | ||
| - `integrations/` - Third-party integration documentation | ||
| - `screenshots/` - Documentation images | ||
| - **plugins/filters/** - JavaScript filter function plugins that extend gitStream capabilities | ||
| - Each plugin has its own directory with `index.js`, `README.md`, and optional test files | ||
| - Plugins enable custom data processing and external API integrations | ||
| - **site/** - Generated documentation site (do not edit directly) | ||
| - **automations/** - Example automation configurations | ||
| - **tutorials/** - Tutorial projects demonstrating gitStream usage | ||
|
|
||
| ### Core Concepts | ||
|
|
||
| 1. **CM Files (.cm)**: YAML + Jinja2 configuration files that define automation rules | ||
| - Located in `.cm/` directory at repository root | ||
| - Can also be defined at organization level in a special `cm` repository | ||
| - Each file must contain `manifest:` and `automations:` sections | ||
|
|
||
| 2. **Automation Components**: | ||
| - **Context Variables**: Pre-defined objects like `files`, `branch`, `repo` providing PR metadata | ||
| - **Filter Functions**: Functions applied to variables using pipe operator `|` | ||
| - **Automation Actions**: Actions like `add-comment`, `set-required-approvals`, `add-label` | ||
| - **Custom Expressions**: Reusable Jinja2 expressions defined in CM files | ||
|
|
||
| 3. **Plugin System**: JavaScript plugins in `plugins/filters/` that create new filter functions | ||
| - Each plugin exports a filter function that can be used in CM files | ||
| - Plugins can connect to external APIs or perform complex data processing | ||
|
|
||
| ### Key Files | ||
| - `mkdocs.yml` - Documentation site configuration | ||
| - `requirements.txt` - Python dependencies for documentation | ||
| - `.cm/*.cm` - Repository-level automation rules | ||
| - `docs/downloads/gitstream.cm` - Default automation template | ||
|
|
||
| ## Important Notes | ||
|
|
||
| - When editing CM files, preserve YAML indentation as it's significant | ||
| - Organization-level rules can be overridden by repository-level rules with the same identifier | ||
| - The identifier is composed of filename + automation name (e.g., `gitstream/safe_changes`) | ||
| - gitStream triggers on PR creation and updates by default, with configurable explicit triggers | ||
| - Draft PRs are ignored by default (configurable via explicit triggers on GitHub) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,7 @@ category: [quality, genai, efficiency, quickstart] | |||||
| starter_kits: [genai] | ||||||
| quickstart: true | ||||||
| --- | ||||||
| # Add PR Description Using LinearB's AI :material-star-circle: | ||||||
| # PR Description Using LinearB's AI | ||||||
|
|
||||||
| <!-- --8<-- [start:example]--> | ||||||
| Use the [`describe-changes`](/automation-actions/#describe-changes) automation action to automatically generate and append a concise, AI-generated description to a pull request. This ensures that all PRs include meaningful and helpful descriptions, improving review efficiency. | ||||||
|
|
@@ -22,8 +22,6 @@ Use the [`describe-changes`](/automation-actions/#describe-changes) automation a | |||||
|
|
||||||
| * Append the AI-generated description to the PR description. | ||||||
|
|
||||||
| === "For GitHub" | ||||||
|
|
||||||
| !!! example "Configuration Example" | ||||||
| ```yaml+jinja | ||||||
| --8<-- "docs/downloads/automation-library/integrations/LinearBAI/describe-pr.cm" | ||||||
|
|
@@ -34,29 +32,47 @@ Use the [`describe-changes`](/automation-actions/#describe-changes) automation a | |||||
| </span> | ||||||
| </div> | ||||||
|
|
||||||
| === "For GitLab" | ||||||
|
|
||||||
| !!! example "Configuration Example" | ||||||
| ```yaml+jinja | ||||||
| --8<-- "docs/downloads/automation-library/integrations/LinearBAI/describe-pr-gl.cm" | ||||||
| ``` | ||||||
| <div class="result" markdown> | ||||||
| <span> | ||||||
| [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/LinearBAI/describe-pr-gl.cm){ .md-button } | ||||||
| </span> | ||||||
| </div> | ||||||
| #### Localization Support | ||||||
|
|
||||||
| You can request the AI to add PR descriptions in your preferred language by adding it to the guidelines: | ||||||
|
|
||||||
| ```yaml+jinja | ||||||
| automations: | ||||||
| linearb_ai_desc: | ||||||
| if: | ||||||
| - {{ not pr.draft }} | ||||||
| run: | ||||||
| - action: describe-changes@v1 | ||||||
| args: | ||||||
| concat_mode: append | ||||||
| guidelines: | | ||||||
| - Use Korean language for all comments | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧾 Readability - Terminology Inconsistency: Change "Use Korean language for all comments" to "Use Korean language for all descriptions" or "Use Korean language for all PR descriptions".
Suggested change
|
||||||
| ``` | ||||||
|
|
||||||
| #### Repository rules file example | ||||||
|
|
||||||
| 1. Add the rules file to your repo root: | ||||||
|
|
||||||
| ```title="./DESCRIPTION_RULES.md" | ||||||
| - Add emojis to highlight important changes. | ||||||
| - Use clear and concise language. | ||||||
| - Avoid using jargon or technical terms. | ||||||
| ``` | ||||||
|
|
||||||
| 2. Load the file in the PR descriptions automation: | ||||||
|
|
||||||
| ``` | ||||||
| automations: | ||||||
| linearb_ai_desc: | ||||||
| if: | ||||||
| - {{ not pr.draft }} | ||||||
| run: | ||||||
| - action: describe-changes@v1 | ||||||
| args: | ||||||
| concat_mode: append | ||||||
| guidelines: {{ "./DESCRIPTION_RULES.md" | readFile() | dump }} | ||||||
| ``` | ||||||
|
|
||||||
| === "For Bitbucket" | ||||||
|
|
||||||
| !!! example "Configuration Example" | ||||||
| ```yaml+jinja | ||||||
| --8<-- "docs/downloads/automation-library/integrations/LinearBAI/describe-pr-bb.cm" | ||||||
| ``` | ||||||
| <div class="result" markdown> | ||||||
| <span> | ||||||
| [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/LinearBAI/describe-pr-bb.cm){ .md-button } | ||||||
| </span> | ||||||
| </div> | ||||||
| <!-- --8<-- [end:example]--> | ||||||
|
|
||||||
| ## Additional Resources | ||||||
|
|
||||||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧾 Readability - Misleading Terminology: Change "Use Korean language for all comments" to "Use Korean language for all descriptions" to accurately reflect that this generates PR descriptions.