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
18 changes: 15 additions & 3 deletions docs/automation-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ automations:
- commit
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Maintainability - Behavioral Change: Document this behavioral change and consider adding a configuration option to disable branch-based filtering if needed for flexibility.

Suggested change
- {{ not (is.bot_author or is.bot_branch) }}
- {{ not (is.bot_author or is.bot_branch) }} # Note: Branch-based bot filtering may exclude legitimate PRs with 'renovate/' prefix

run:
- action: code-review@v1
args:
Expand All @@ -313,6 +313,10 @@ guidelines: |
- In Javascript
- Make sure camelCase is used for variable names
- Make sure PascalCase is used for class names
is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}

```

```yaml+jinja title="example - guidelines from file"
Expand All @@ -323,12 +327,16 @@ automations:
- commit
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: code-review@v1
args:
approve_on_LGTM: false
guidelines: {{ "./REVIEW_RULES.md" | readFile() | dump }}

is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
```

!!! tip "Loading Guidelines from Files"
Expand Down Expand Up @@ -421,7 +429,7 @@ automations:
# skip description for Draft PRs and PRs from bots
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: describe-changes@v1
args:
Expand All @@ -436,6 +444,10 @@ guidelines: |

# Load the PR template content from a file in the repository
TEMPLATE: {{ ".github/PULL_REQUEST_TEMPLATE.md" | readFile() | dump }}

is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
```

!!! tip "Excluded Files"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ manifest:
automations:
linearb_ai_review:
if:
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: code-review@v1
args:
Expand All @@ -20,3 +20,7 @@ approve_pr_on_lgtm: false
# the team repo.
# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md`
guidelines: {{ "./REVIEW_RULES.md" | readFile() | dump }}

is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ automations:
linearb_ai_review:
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: code-review@v1
args:
Expand All @@ -21,3 +21,7 @@ approve_pr_on_lgtm: false
# the team repo.
# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md`
guidelines: {{ "./REVIEW_RULES.md" | readFile() | dump }}

is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ automations:
- commit
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: code-review@v1
args:
Expand All @@ -26,3 +26,7 @@ approve_pr_on_lgtm: false
# - For team-specific guidelines: Place the file in the team repository root
# The `dump` filter ensures proper YAML formatting when the file content is inserted
guidelines: {{ "./REVIEW_RULES.md" | readFile() | dump }}

is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ automations:
linearb_ai_description:
# skip description for Draft PRs and PRs from bots
if:
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: describe-changes@v1
args:
concat_mode: append

is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ automations:
# skip description for Draft PRs and PRs from bots
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: describe-changes@v1
args:
concat_mode: append

is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ automations:
# skip description for Draft PRs and PRs from bots
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', '_bot_', 'dependabot', '[bot]']) | nope }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: describe-changes@v1
args:
concat_mode: append


is:
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
5 changes: 3 additions & 2 deletions docs/downloads/gitStream-gl.cm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ automations:
linearb_ai_description:
if:
- {{ not pr.draft }}
- {{ not is.bot }}
- {{ not (is.bot_author or is.bot_branch) }}
run:
- action: describe-changes@v1
args:
Expand Down Expand Up @@ -82,4 +82,5 @@ is:
docs: {{ files | allDocs }}
tests: {{ files | allTests }}
image: {{ files | allImages }}
bot: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
3 changes: 2 additions & 1 deletion docs/downloads/gitstream-bb.cm
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ is:
docs: {{ files | allDocs }}
tests: {{ files | allTests }}
image: {{ files | allImages }}
bot: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
3 changes: 2 additions & 1 deletion docs/downloads/gitstream.cm
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ is:
docs: {{ files | allDocs }}
tests: {{ files | allTests }}
image: {{ files | allImages }}
bot: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}