Skip to content

Commit b29124e

Browse files
authored
Merge pull request #727 from linear-b/gh-lite-version
GH Action lite version
2 parents b4a92c0 + 8a41ee0 commit b29124e

File tree

3 files changed

+132
-2
lines changed

3 files changed

+132
-2
lines changed

docs/downloads/gitstream-lite.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Code generated by gitStream GitHub app - DO NOT EDIT
2+
3+
name: gitStream workflow automation
4+
run-name: |
5+
/:\ gitStream: PR #${{ fromJSON(fromJSON(github.event.inputs.client_payload)).pullRequestNumber }} from ${{ github.event.inputs.full_repository }}
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
client_payload:
11+
description: The Client payload
12+
required: true
13+
full_repository:
14+
description: the repository name include the owner in `owner/repo_name` format
15+
required: true
16+
head_ref:
17+
description: the head sha
18+
required: true
19+
base_ref:
20+
description: the base ref
21+
required: true
22+
installation_id:
23+
description: the installation id
24+
required: false
25+
resolver_url:
26+
description: the resolver url to pass results to
27+
required: true
28+
resolver_token:
29+
description: Optional resolver token for resolver service
30+
required: false
31+
default: ''
32+
33+
jobs:
34+
gitStream:
35+
timeout-minutes: 15
36+
runs-on: ubuntu-latest
37+
name: gitStream workflow automation
38+
steps:
39+
- name: Evaluate Rules
40+
uses: linear-b/gitstream-github-action@v2-lite
41+
id: rules-engine
42+
with:
43+
full_repository: ${{ github.event.inputs.full_repository }}
44+
head_ref: ${{ github.event.inputs.head_ref }}
45+
base_ref: ${{ github.event.inputs.base_ref }}
46+
client_payload: ${{ github.event.inputs.client_payload }}
47+
installation_id: ${{ github.event.inputs.installation_id }}
48+
resolver_url: ${{ github.event.inputs.resolver_url }}
49+
resolver_token: ${{ github.event.inputs.resolver_token }}

docs/github-installation.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,32 @@ You can set up gitStream for a single repo or your entire GitHub organization. S
5858
--8<-- "docs/downloads/gitstream.yml"
5959
```
6060

61+
<div class="result" markdown>
62+
<span>
63+
[:octicons-download-24: Download gitstream.yml (regular version)](/downloads/gitstream.yml){ .md-button }
64+
</span>
65+
<span>
66+
[:octicons-download-24: Download gitstream.yml (lite version)](/downloads/gitstream-lite.yml){ .md-button }
67+
</span>
68+
</div>
69+
70+
!!! tip "Large Repository Support (Lite Version)"
71+
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:
72+
73+
```yaml
74+
jobs:
75+
gitStream:
76+
timeout-minutes: 15
77+
runs-on: ubuntu-latest
78+
name: gitStream workflow automation
79+
steps:
80+
- name: Evaluate Rules
81+
uses: linear-b/gitstream-github-action@v2-lite
82+
id: rules-engine
83+
```
84+
85+
**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.
86+
6187
!!! Success
6288
When finished, you should have the following file structure in your repo.
6389

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

125+
<div class="result" markdown>
126+
<span>
127+
[:octicons-download-24: Download gitstream.yml (regular version)](/downloads/gitstream.yml){ .md-button }
128+
</span>
129+
<span>
130+
[:octicons-download-24: Download gitstream.yml (lite version)](/downloads/gitstream-lite.yml){ .md-button }
131+
</span>
132+
</div>
133+
134+
!!! tip "Large Repository Support (Lite Version)"
135+
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:
136+
137+
```yaml
138+
jobs:
139+
gitStream:
140+
timeout-minutes: 15
141+
runs-on: ubuntu-latest
142+
name: gitStream workflow automation
143+
steps:
144+
- name: Evaluate Rules
145+
uses: linear-b/gitstream-github-action@v2-lite
146+
id: rules-engine
147+
```
148+
149+
**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.
150+
99151
!!! Success
100152
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.
101153

docs/troubleshooting.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Some organizations limit which actions can run, in that case, in the repository
3636

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

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

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

134134
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.
135135

@@ -140,6 +140,35 @@ comment: |
140140
{{ pr.title }}
141141
```
142142

143+
## GitHub timeout issues with large repositories
144+
145+
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.
146+
147+
You can resolve this by using the **lite version** of the gitStream GitHub Action, which performs a shallow clone to reduce execution time:
148+
149+
```yaml
150+
jobs:
151+
gitStream:
152+
timeout-minutes: 15
153+
runs-on: ubuntu-latest
154+
name: gitStream workflow automation
155+
steps:
156+
- name: Evaluate Rules
157+
uses: linear-b/gitstream-github-action@v2-lite
158+
id: rules-engine
159+
```
160+
161+
**Important limitations of the lite version:**
162+
- Automations that rely on Git history (such as `code-experts`) may not work properly due to the shallow clone
163+
- Historical data analysis features will be limited
164+
- Some context variables that depend on full Git history may return incomplete results
165+
166+
<div class="result" markdown>
167+
<span>
168+
[:octicons-download-24: Download gitstream.yml (lite version)](/downloads/gitstream-lite.yml){ .md-button }
169+
</span>
170+
</div>
171+
143172
## How can I debug expressions and see their content?
144173

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

0 commit comments

Comments
 (0)