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

test: enable debug on git blame query #832

Merged
merged 3 commits into from
Apr 14, 2023
Merged

Conversation

zolamk
Copy link
Contributor

@zolamk zolamk commented Apr 13, 2023

Description

enable debugging on the git blame query so that we can see the executed query in error messages.

🤖 Generated by Copilot at d9183a4

Add a debug flag to the GetGitBlame function and update the error messages in the corresponding unit tests. This is to help diagnose a 403 Forbidden error when fetching blame information from GitHub.

Related issue

Type of change

Improvements (non-breaking change without functionality)

How was this tested?

Unit tests

Checklist

  • I have performed a self-review of my code
  • I have added tests that prove my fix/feature works (if applicable) and have tested properly
  • I have ran task check -f and have no issues

Code review and merge strategy (ship/show/ask)

Ask: this pull request requires a code review before merge

HOW

🤖 Generated by Copilot at d9183a4

  • Enable debug flag for GraphQL client in GetGitBlame function to log request and response details (link)
  • Update expected error messages in unit tests for GetGitBlame and AssignCodeAuthorReviewerCode functions to match the new error message with request details (link, link)

@reviewpad reviewpad bot added improvements Non-breaking change without functionality ask Pull request requires a code review before merge small small pull request labels Apr 13, 2023
@reviewpad
Copy link

reviewpad bot commented Apr 13, 2023

AI-Generated Summary: This pull request contains two patches:

  1. The first patch enables debug mode on the git blame query in codehost/github/blame.go. This change allows for more detailed error messages when debugging issues related to git blame queries.
  2. The second patch fixes tests in codehost/github/blame_test.go and plugins/aladino/actions/assignCodeAuthorReviewers_test.go by updating the expected error messages to include the additional debug information from the changes made in the first patch.

@reviewpad reviewpad bot added the plugins Modifications to the plugins directory label Apr 13, 2023
@reviewpad
Copy link

reviewpad bot commented Apr 13, 2023

Reviewpad Report

ℹ️ Messages

  • If you are adding or updating a built-in, please do not forget to update the docs
  • If you have added a new function or action do not forget to include it in the built-in list!

‼️ Errors

  • The pull request does not have a linked issue. Please link one. Reviewpad will only assign a reviewer when the pull request is linked to an issue.

@reviewpad
Copy link

reviewpad bot commented Apr 13, 2023

AI-Generated Summary: This pull request contains 3 patches that focus on updating and fixing tests related to the git blame feature in the codebase. The changes include:

  1. Enabling debug mode on the git blame query in codehost/github/blame.go for better error visibility during testing.
  2. Fixing the expected error messages in the codehost/github/blame_test.go and plugins/aladino/actions/assignCodeAuthorReviewers_test.go files to match the new debug information.
  3. Modifying the test case for assignCodeAuthorReviewers_test.go to fix the file paths in the git blame query.

@ferreiratiago ferreiratiago merged commit c56857c into main Apr 14, 2023
@ferreiratiago ferreiratiago deleted the test/git-blame-debug branch April 14, 2023 11:06
@reviewpad
Copy link

reviewpad bot commented Apr 14, 2023

📈 Pull Request Metrics

💻 Coding Time: 34 minutes
🛻 Pickup Time: 12 minutes
👀 Review Time: 21 hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ask Pull request requires a code review before merge improvements Non-breaking change without functionality plugins Modifications to the plugins directory small small pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants