Skip to content

Conversation

vim-zz
Copy link
Collaborator

@vim-zz vim-zz commented Sep 18, 2025

✨ PR Description

Purpose: Add bot author checks to skip Estimated Time to Review (ETR) automation for bot-created pull requests.
Main changes:

  • Added bot_author detection rule for identifying automated PR authors using pattern matching
  • Updated ETR automation condition to skip processing when PR author is a bot
  • Applied consistent bot detection across multiple automation rules for better maintainability

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca
Copy link
Contributor

@gitstream-cm gitstream-cm bot left a comment

Choose a reason for hiding this comment

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

✨ PR Review

The PR adds bot author detection to skip ETR automation for bot-generated PRs, which is a good improvement. However, the implementation has significant code duplication and structural inconsistencies.

2 issues detected:

🧹 Maintainability - Identical logic repeated multiple times increases maintenance burden and risk of inconsistent updates.

Details: The bot_author detection logic is duplicated 4 times throughout the file with identical template expressions. This violates the DRY principle and creates maintenance overhead when the bot detection criteria need to be updated.
File: docs/managed-mode.md

🧾 Readability - Inconsistent structural organization makes the configuration harder to understand and follow.

Details: The is: sections are placed inconsistently - some immediately follow automation blocks, others appear at section boundaries. This creates confusion about proper scope and organization.
File: docs/managed-mode.md

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

Copy link
Contributor

gitstream-cm bot commented Sep 18, 2025

A screenshot of the relevant part of docs after the changes is a life saver 🛟

@gitstream-cm gitstream-cm bot requested a review from a team September 18, 2025 13:20
Comment on lines +24 to +25
is:
bot_author: {{ pr.author | match(list=[\"github-actions\", \"_bot_\", \"[bot]\", \"dependabot\"]) | some }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you remove the escaping in all exmaples please (they come becase i took it from logs)

Suggested change
is:
bot_author: {{ pr.author | match(list=[\"github-actions\", \"_bot_\", \"[bot]\", \"dependabot\"]) | some }}
is:
bot_author: {{ pr.author | match(list=["github-actions", "_bot_", "[bot]", "dependabot"]) | some }}
Copy link

claude bot commented Sep 18, 2025

PR Review: Add bot_author checks to skip ETR automation for bot PRs

Code Quality Assessment: ✅ APPROVE

Positive aspects:

  • Consistent implementation of bot_author condition across all relevant automations
  • Good reuse of the is.bot_author expression following DRY principles
  • Clear intent - effectively excludes bot PRs from ETR automation
  • Uses appropriate regex patterns for common bot naming conventions

Potential improvements:

  • Consider expanding bot detection patterns to include renovate, greenkeeper, etc.
  • The is.bot_author definition is repeated 4 times - could add documentation note about shared conditions

Assessment summary:

  • No security risks - only affects automation triggers
  • Efficient implementation using short-circuiting some filter
  • No performance concerns
  • Documentation-only change, no unit tests required
  • Low risk, high value improvement

This change effectively prevents ETR automation from running on bot PRs, improving both resource utilization and workflow clarity.

Rating: ✅ APPROVED - Clean implementation following gitStream best practices.

@gitstream-cm gitstream-cm bot requested a review from a team September 18, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment