Update attachment_pdf_view_prompt.yml#3982
Closed
mrobertsonris wants to merge 3 commits intosublime-security:mainfrom
Closed
Update attachment_pdf_view_prompt.yml#3982mrobertsonris wants to merge 3 commits intosublime-security:mainfrom
mrobertsonris wants to merge 3 commits intosublime-security:mainfrom
Conversation
100% TP across all our Orgs.
github-actions bot
added a commit
that referenced
this pull request
Feb 7, 2026
…nimal content and view prompt
Test Rules Sync - Action RequiredThis PR was not automatically synced to test-rules because the author is not a member of the To enable syncing, an organization member can comment Once triggered, the rules will be synced on the next scheduled run (every 10 minutes). |
markmsublime
approved these changes
Feb 9, 2026
eric-sim-sublime
added a commit
that referenced
this pull request
Feb 9, 2026
The previous logic used git merge-base to find a comparison point, but this breaks when the PR contains merge commits from main. When comparing files at HEAD (a merge commit) vs the calculated merge-base, it would incorrectly detect all of main's recent changes as PR changes. This fix uses git's three-dot diff syntax (origin/main...HEAD) which automatically finds the correct merge-base and compares only the changes introduced by the PR branch, regardless of merge commits. Changes: - Use 'git diff origin/main...HEAD --find-renames' to find changed files - For each file, search for the old file with same rule ID (handles renames) - Compare source fields using 'git show' directly - Remove unnecessary sr-main checkout step (no longer needed) - Handles all merge commit scenarios (HEAD, middle of history, multiple merges) Benefits: - Correctly detects only PR changes even with merge commits - Handles file renames by searching for matching rule IDs - More efficient (no need to checkout entire base branch) - More robust (uses git's built-in three-dot diff) Fixes issue where PRs with merge commits incorrectly triggered tests for hundreds of unchanged rules (e.g., PR #3982 detected 774 rules when 0 changed). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Member
|
@mrobertsonris due to some technical difficulties, we've had to replicate this change in a different PR: #3987. I'm going to close this PR and get the other merged. Thanks for the feedback on this rule! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
100% TP across all our Orgs.