Skip to content

Conversation

@vim-zz
Copy link
Collaborator

@vim-zz vim-zz commented Jul 17, 2025

✨ PR Description

Purpose: Refactor bot filtering logic in LinearB AI integrations to improve detection of automated PR sources and prevent unnecessary AI processing.
Main changes:

  • Split bot detection into separate bot_author and bot_branch conditions for more precise filtering
  • Replace nope filter with more readable not (is.bot_author or is.bot_branch) pattern
  • Standardize bot detection logic across all automation templates and documentation

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

@gitstream-cm
Copy link
Contributor

gitstream-cm bot commented Jul 17, 2025

Please mark which AI tools you used for this PR by checking the appropriate boxes:

  • GitHub Copilot
  • Cursor
  • ChatGPT
  • Tabnine
  • JetBrains AI Assistant
  • VSCode IntelliCode
  • Claude
  • Gemini
  • Other AI tool
  • No AI tools were used

Tip: If you want to avoid this comment in the future, you can add a label of the format 🤖 ai-* when creating your PR.

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 refactors bot filtering logic by extracting inline conditions into reusable variables and extends filtering to include branch-based detection. The changes are consistently applied across all files.

1 issues detected:

🧹 Maintainability - Adding branch name pattern matching introduces potential false positives for bot detection

Details: The bot filtering logic has been significantly extended to include branch-based filtering (renovate/ branches) in addition to author-based filtering. This represents a breaking change that could exclude legitimate PRs from developers who use branch names starting with 'renovate/'.
File: docs/automation-actions.md (301-301)

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

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

@gitstream-cm
Copy link
Contributor

gitstream-cm bot commented Jul 17, 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 July 17, 2025 09:26
Copy link
Collaborator

@MishaKav MishaKav left a comment

Choose a reason for hiding this comment

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

💪

@gitstream-cm gitstream-cm bot requested a review from a team July 17, 2025 09:29
@vim-zz vim-zz merged commit 240afc9 into main Jul 17, 2025
16 checks passed
@vim-zz vim-zz deleted the add-renovate-to-bots branch July 17, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants