Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exclude context lines from git diff #247

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxnowack
Copy link

If there are more than 0 lines of context returned by `git diff', the CLI will also detect these context lines as changes, even though these lines have not been modified.
I noticed this bug while using the feature-flag-pr-insights-action. Some pull requests were commented by the action with variable changes (added and removed at the same time, but that is another issue), but the variables were not touched in the PR.

@laurawarr
Copy link
Contributor

Hey @maxnowack, we rely on the context lines to help us find matches. For example, if a call to the variable method was split across multiple lines and only one was modified, we'd still consider that a change.

         this.dvcClient.variable(
             user,
-            'variable-key',
+            'new-variable',
             true
         )

For the case where the variable call wasn't changed at all, I'm testing with this diff and seeing the expected output, can you provide more details or a code snippet for the case you're describing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants