Skip to content

Commit 14567a3

Browse files
authored
Enhance documentation for gitStream CM guidelines and file exclusions (#754)
1 parent 743f628 commit 14567a3

File tree

1 file changed

+59
-54
lines changed

1 file changed

+59
-54
lines changed

docs/automation-actions.md

Lines changed: 59 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -339,60 +339,65 @@ is:
339339
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
340340
```
341341

342-
!!! tip "Loading Guidelines from Files"
343-
344-
**Repository Root Files**: Place your guidelines file (e.g., `REVIEW_RULES.md`) at the root of your repository and reference it with:
345-
```yaml
346-
guidelines: {{ "./REVIEW_RULES.md" | readFile() | dump }}
347-
```
348-
349-
**CM Repository Files**: If you have organization-wide guidelines in your central CM repository, reference them with:
350-
```yaml
351-
guidelines: {{ "../cm/REVIEW_RULES.md" | readFile() | dump }}
352-
```
353-
354-
**Team-specific Files**: For team-level guidelines, place the file in the specific team repository root and use the relative path:
355-
```yaml
356-
guidelines: {{ "./TEAM_REVIEW_RULES.md" | readFile() | dump }}
357-
```
358-
359-
The `dump` filter ensures proper YAML formatting when the file content is inserted into the configuration.
360-
361-
The following files are automatically excluded from the code review.
362-
363-
| File type | Filter type | Values|
364-
| - | - | - |
365-
| Data | Extension | `ini` `csv` `xls` `xlsx` `xlr` `doc` `docx` `txt` `pps` `ppt` `pptx` `dot` `dotx` `log` `tar` `rtf` `dat` `ipynb` `po` `profile` `object` `obj` `dxf` `twb` `bcsymbolmap` `tfstate` `pdf` `rbi` `pem` `crt` `svg` `png` `jpeg` `jpg` `ttf` `app` `bin` `bmp` `bz2` `class` `db` `dll` `dylib` `egg` `eot` `exe` `gif` `gitignore` `glif` `gradle` `gz` `ico` `jar` `lo` `lock` `mp3` `mp4` `nar` `o` `ogg` `otf` `p` `pickle` `pkl` `pyc` `pyd` `pyo` `rkt` `so` `ss` `tgz` `tsv` `war` `webm` `woff` `woff2` `xz` `zip` `zst` `snap` `lockb` |
366-
| Lock | Regex | `.*(yarn\|gemfile\|podfile\|cargo\|composer\|pipfile\|gopkg)\.lock$` `.*gradle\.lockfile$` `.*lock\.sbt$` |
367-
| Build | Regex | `.*dist/.*\\.js` `.*build/.*\\.js` |
368-
| Data | Regex | `.*public/assets/.*\\.js` |
369-
370-
| Lock File Name | Programming Language | Package Manager |
371-
|-------------------------|----------------------|----------------------|
372-
| `package-lock.json` | JavaScript | npm |
373-
| `yarn.lock` | JavaScript | Yarn |
374-
| `npm-shrinkwrap.json` | JavaScript | npm |
375-
| `Pipfile.lock` | Python | pipenv |
376-
| `poetry.lock` | Python | Poetry |
377-
| `conda-lock.yml` | Python | conda |
378-
| `Gemfile.lock` | Ruby | Bundler |
379-
| `composer.lock` | PHP | Composer |
380-
| `packages.lock.json` | .NET | NuGet |
381-
| `project.assets.json` | .NET | .NET Core |
382-
| `pom.xml` | Java | Maven |
383-
| `Cargo.lock` | Rust | Cargo |
384-
| `mix.lock` | Elixir | Mix |
385-
| `pubspec.lock` | Dart/Flutter | pub |
386-
| `go.sum` | Go | Go modules |
387-
| `stack.yaml.lock` | Haskell | Stack |
388-
| `vcpkg.json` | C++ | vcpkg |
389-
| `conan.lock` | C++ | Conan |
390-
| `ivy.xml` | Scala | sbt/Ivy |
391-
| `project.clj` | Clojure | Leiningen |
392-
| `Podfile.lock` | Swift/Objective-C | CocoaPods |
393-
| `Cartfile.resolved` | Swift/Objective-C | Carthage |
394-
| `flake.lock` | Nix | Nix |
395-
| `pnpm-lock.yaml` | JavaScript | pnpm |
342+
!!! tip "Iterative Guidelines Refinement with Playground"
343+
344+
To achieve the exact review behavior you want, use this iterative workflow:
345+
346+
1. Start with the [Playground](https://app.linearb.io/gitstream/playground)
347+
2. Add specific guidelines e.g., "Do not comment on formatting issues"
348+
3. Run in the Playground with a reference PR from your repository
349+
4. Refine guidelines based on the results
350+
5. Repeat cycles 2-4 until you get the expected review behavior
351+
6. Deploy to your repository CM rules - The guidelines will now work consistently on real PRs
352+
353+
354+
**Loading Guidelines from Files**
355+
356+
| Location | Description | File Placement | Configuration |
357+
|----------|-------------|----------------|---------------|
358+
| Repository Root Files | Guidelines file in your repository root | Place your guidelines file (e.g., `REVIEW_RULES.md`) at the root of your repository | `guidelines: {{ "./REVIEW_RULES.md" | readFile() | dump }}` |
359+
| CM Repository Files | Organization-wide guidelines in central CM repository | Place guidelines in your central CM repository | `guidelines: {{ "../cm/REVIEW_RULES.md" | readFile() | dump }}` |
360+
| Team-specific Files | Team-level guidelines in specific team repository | Place the file in the specific team repository root | `guidelines: {{ "./TEAM_REVIEW_RULES.md" | readFile() | dump }}` |
361+
362+
The `dump` filter ensures proper YAML formatting when the file content is inserted into the configuration.
363+
364+
??? "Files Excluded from AI Review"
365+
366+
The following files are automatically excluded from the code review.
367+
368+
| File type | Filter type | Values|
369+
| - | - | - |
370+
| Data | Extension | `ini` `csv` `xls` `xlsx` `xlr` `doc` `docx` `txt` `pps` `ppt` `pptx` `dot` `dotx` `log` `tar` `rtf` `dat` `ipynb` `po` `profile` `object` `obj` `dxf` `twb` `bcsymbolmap` `tfstate` `pdf` `rbi` `pem` `crt` `svg` `png` `jpeg` `jpg` `ttf` `app` `bin` `bmp` `bz2` `class` `db` `dll` `dylib` `egg` `eot` `exe` `gif` `gitignore` `glif` `gradle` `gz` `ico` `jar` `lo` `lock` `mp3` `mp4` `nar` `o` `ogg` `otf` `p` `pickle` `pkl` `pyc` `pyd` `pyo` `rkt` `so` `ss` `tgz` `tsv` `war` `webm` `woff` `woff2` `xz` `zip` `zst` `snap` `lockb` |
371+
| Lock | Regex | `.*(yarn\|gemfile\|podfile\|cargo\|composer\|pipfile\|gopkg)\.lock$` `.*gradle\.lockfile$` `.*lock\.sbt$` |
372+
| Build | Regex | `.*dist/.*\\.js` `.*build/.*\\.js` |
373+
| Data | Regex | `.*public/assets/.*\\.js` |
374+
375+
| Lock File Name | Programming Language | Package Manager |
376+
|-------------------------|----------------------|----------------------|
377+
| `package-lock.json` | JavaScript | npm |
378+
| `yarn.lock` | JavaScript | Yarn |
379+
| `npm-shrinkwrap.json` | JavaScript | npm |
380+
| `Pipfile.lock` | Python | pipenv |
381+
| `poetry.lock` | Python | Poetry |
382+
| `conda-lock.yml` | Python | conda |
383+
| `Gemfile.lock` | Ruby | Bundler |
384+
| `composer.lock` | PHP | Composer |
385+
| `packages.lock.json` | .NET | NuGet |
386+
| `project.assets.json` | .NET | .NET Core |
387+
| `pom.xml` | Java | Maven |
388+
| `Cargo.lock` | Rust | Cargo |
389+
| `mix.lock` | Elixir | Mix |
390+
| `pubspec.lock` | Dart/Flutter | pub |
391+
| `go.sum` | Go | Go modules |
392+
| `stack.yaml.lock` | Haskell | Stack |
393+
| `vcpkg.json` | C++ | vcpkg |
394+
| `conan.lock` | C++ | Conan |
395+
| `ivy.xml` | Scala | sbt/Ivy |
396+
| `project.clj` | Clojure | Leiningen |
397+
| `Podfile.lock` | Swift/Objective-C | CocoaPods |
398+
| `Cartfile.resolved` | Swift/Objective-C | Carthage |
399+
| `flake.lock` | Nix | Nix |
400+
| `pnpm-lock.yaml` | JavaScript | pnpm |
396401

397402
!!! tip
398403

0 commit comments

Comments
 (0)