Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions docs/downloads/gitstream-lite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Code generated by gitStream GitHub app - DO NOT EDIT

name: gitStream workflow automation
run-name: |
/:\ gitStream: PR #${{ fromJSON(fromJSON(github.event.inputs.client_payload)).pullRequestNumber }} from ${{ github.event.inputs.full_repository }}

on:
workflow_dispatch:
inputs:
client_payload:
description: The Client payload
required: true
full_repository:
description: the repository name include the owner in `owner/repo_name` format
required: true
head_ref:
description: the head sha
required: true
base_ref:
description: the base ref
required: true
installation_id:
description: the installation id
required: false
resolver_url:
description: the resolver url to pass results to
required: true
resolver_token:
description: Optional resolver token for resolver service
required: false
default: ''

jobs:
gitStream:
timeout-minutes: 15
runs-on: ubuntu-latest
name: gitStream workflow automation
steps:
- name: Evaluate Rules
uses: linear-b/gitstream-github-action@v2-lite
id: rules-engine
with:
full_repository: ${{ github.event.inputs.full_repository }}
head_ref: ${{ github.event.inputs.head_ref }}
base_ref: ${{ github.event.inputs.base_ref }}
client_payload: ${{ github.event.inputs.client_payload }}
installation_id: ${{ github.event.inputs.installation_id }}
resolver_url: ${{ github.event.inputs.resolver_url }}
resolver_token: ${{ github.event.inputs.resolver_token }}
52 changes: 52 additions & 0 deletions docs/github-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,32 @@ You can set up gitStream for a single repo or your entire GitHub organization. S
--8<-- "docs/downloads/gitstream.yml"
```

<div class="result" markdown>
<span>
[:octicons-download-24: Download gitstream.yml (regular version)](/downloads/gitstream.yml){ .md-button }
</span>
<span>
[:octicons-download-24: Download gitstream.yml (lite version)](/downloads/gitstream-lite.yml){ .md-button }
</span>
</div>

!!! tip "Large Repository Support (Lite Version)"
If you're working with a large repository (typically monorepos) and experience timeout issues during GitHub Actions execution, you can use the lite version of gitStream that performs a shallow clone to reduce execution time:

```yaml
jobs:
gitStream:
timeout-minutes: 15
runs-on: ubuntu-latest
name: gitStream workflow automation
steps:
- name: Evaluate Rules
uses: linear-b/gitstream-github-action@v2-lite
id: rules-engine
```

**Important:** The lite version has limitations - automations that rely on Git history (such as code-experts) may not work properly due to the shallow clone.

!!! Success
When finished, you should have the following file structure in your repo.

Expand Down Expand Up @@ -96,6 +122,32 @@ You can set up gitStream for a single repo or your entire GitHub organization. S
--8<-- "docs/downloads/gitstream.yml"
```

<div class="result" markdown>
<span>
[:octicons-download-24: Download gitstream.yml (regular version)](/downloads/gitstream.yml){ .md-button }
</span>
<span>
[:octicons-download-24: Download gitstream.yml (lite version)](/downloads/gitstream-lite.yml){ .md-button }
</span>
</div>

!!! tip "Large Repository Support (Lite Version)"
If you're working with large repositories in your organization (typically monorepos) and experience timeout issues during GitHub Actions execution, you can use the lite version of gitStream that performs a shallow clone to reduce execution time:

```yaml
jobs:
gitStream:
timeout-minutes: 15
runs-on: ubuntu-latest
name: gitStream workflow automation
steps:
- name: Evaluate Rules
uses: linear-b/gitstream-github-action@v2-lite
id: rules-engine
```

**Important:** The lite version has limitations - automations that rely on Git history (such as code-experts) may not work properly due to the shallow clone. See the [troubleshooting section](/troubleshooting/#github-timeout-issues-with-large-repositories) for more details.

!!! Success
Once finished, **all** PRs to your organization's repositories will be processed by the GitHub Action in this repo, and your `cm` repo should have a file directory that looks like this.

Expand Down
33 changes: 31 additions & 2 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Some organizations limit which actions can run, in that case, in the repository

Also, add
```
linear-b/gitstream-github-action@v2,*/*/.github/workflows/gitstream.yml*
linear-b/gitstream-github-action@v2,linear-b/gitstream-github-action@v2-lite,*/*/.github/workflows/gitstream.yml*
```
to the **Allow specified actions and reusable workflows** list, if it is shown.
![GitHub allow marketplace actions](screenshots/github_settings_allow_specified_actions
Expand Down Expand Up @@ -129,7 +129,7 @@ Clicking the `Details` button will show more information and context.

You can add this automation to see details on context variable.

#### gitStream fails when using template strings with special characters (e.g., colon ':')
## gitStream fails when using template strings with special characters (e.g., colon ':')

If a template string (e.g., pull request title, description, or other context variables) contains special characters such as a colon (`:`), gitStream might fail with a YAML parsing error due to invalid syntax.

Expand All @@ -140,6 +140,35 @@ comment: |
{{ pr.title }}
```

## GitHub timeout issues with large repositories

If you're experiencing timeout issues during GitHub Actions execution, particularly with large repositories or monorepos, this is typically caused by the time required to clone the entire repository history.

You can resolve this by using the **lite version** of the gitStream GitHub Action, which performs a shallow clone to reduce execution time:

```yaml
jobs:
gitStream:
timeout-minutes: 15
runs-on: ubuntu-latest
name: gitStream workflow automation
steps:
- name: Evaluate Rules
uses: linear-b/gitstream-github-action@v2-lite
id: rules-engine
```

**Important limitations of the lite version:**
- Automations that rely on Git history (such as `code-experts`) may not work properly due to the shallow clone
- Historical data analysis features will be limited
- Some context variables that depend on full Git history may return incomplete results

<div class="result" markdown>
<span>
[:octicons-download-24: Download gitstream.yml (lite version)](/downloads/gitstream-lite.yml){ .md-button }
</span>
</div>

## How can I debug expressions and see their content?

You can dump any context value to the PR comment. For example, to see the list of changed files, use:
Expand Down