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

Optimization: skip deleted files #42

Merged
merged 1 commit into from
Apr 28, 2024
Merged

Optimization: skip deleted files #42

merged 1 commit into from
Apr 28, 2024

Conversation

johnlk
Copy link
Contributor

@johnlk johnlk commented Apr 28, 2024

This will allow for less tokens to be passed to the model, as well as better results.

@johnlk johnlk self-assigned this Apr 28, 2024
Copy link

Score: 85
Improvements:
  • Using `==` for string comparison in bash script is not safe, consider using `=` for portability.
  • Variable naming could be more descriptive
  • Code lacks comments for clarity
@@ -25,8 +25,13 @@ github::get_commit_diff() {
       }
 
       file=$(_jq '.filename')
       file_status=$(_jq '.status')
       exclude_file=false
 
       if [ "$file_status" = "removed" ]; then
         continue
       fi

       for ignore_file_pattern in $ignore_files_list; do
         if [[ $file = $ignore_file_pattern ]]; then
           exclude_file=true
         fi
       done

@johnlk johnlk merged commit 45c9ed9 into main Apr 28, 2024
1 check passed
@johnlk johnlk deleted the john/ignore-deleted-files branch April 28, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant