docs: add pr.author_type context variable [LINBEE-12321] - #859
Conversation
Documents the new variable, the lowercase values, and the two coverage limits (GitHub PAT-based automation and Bitbucket access-token bot users both report `user`). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| OSS Licenses | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
There was a problem hiding this comment.
✨ PR Review
The PR is a clear and useful documentation addition for pr.author_type. The explanation of limitations and the fallback example pattern are valuable. One subtle but important issue exists in the example code snippet that could mislead users.
1 issues detected:
🐞 Bug - `"[bot]"` is a regex character class matching one of 'b', 'o', or 't', not the literal `[bot]` suffix used in GitHub bot usernames. 🛠️
Details: In the fallback example, "[bot]" is used as a match-list entry. In regex, [bot] is a character class that matches any single character that is 'b', 'o', or 't' — not the literal string [bot]. GitHub appends the literal suffix [bot] to automated account usernames (e.g., github-actions[bot], dependabot[bot]), so the documented pattern will silently produce incorrect results: it will match far too broadly (any name containing 'b', 'o', or 't') while missing the exact intended pattern.
File: docs/context-variables.md (335-335)
🛠️ A suggested code correction is included in the review comments.
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how
There was a problem hiding this comment.
Pull request overview
Adds documentation for the new pr.author_type context variable so automations can distinguish PRs opened by user, bot, or organization, and includes platform-specific caveats to set expectations.
Changes:
- Added
pr.author_typeto theprcontext variable table. - Added a dedicated “PR author type” note section with usage examples and GitHub/Bitbucket limitations.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/gs feedback False positive. |
Documents
pr.author_type(user/bot/organization).Values are lowercase, matching
pr.statusandrepo.visibility. Notes the two coverage limits: GitHub PAT-based automation and Bitbucket access-token bot users both reportuser.✨ PR Description
Purpose: Document the new
pr.author_typecontext variable that identifies PR author account type (user, bot, or organization).Main changes:
pr.author_typefield to PR context variables table with string type and account kind valuesGenerated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how