This pull request introduces several changes to the GithubClient class in the src/Octoshift/Services directory to enhance response handling and retry logic. The main changes include updating the GetWithRetry and SendAsync methods to handle different types of response content, adding checks for rate limits, and improving the logic for handling forbidden status codes.
Enhancements to response handling:
src/Octoshift/Services/GithubClient.cs: Modified the SendAsync method to process different types of response content, including MultipartFormDataContent and StreamContent, and log the appropriate messages.
Improvements to retry logic:
src/Octoshift/Services/GithubClient.cs: Updated the SendAsync method to handle forbidden status with recursive retry logic, ensuring no infinite recursion occurs. Added logging for retries.
src/Octoshift/Services/GithubClient.cs: Adjusted the GetWithRetry method to include an additional return value for response content, enhancing the retry policy.
[ ] Did you write/update appropriate tests
[ ] Release notes updated (if appropriate)
[ ] Appropriate logging output
[ ] Issue linked
[ ] Docs updated (or issue created)
[ ] New package licenses are added to ThirdPartyNotices.txt (if applicable)
This pull request introduces several changes to the
GithubClient
class in thesrc/Octoshift/Services
directory to enhance response handling and retry logic. The main changes include updating theGetWithRetry
andSendAsync
methods to handle different types of response content, adding checks for rate limits, and improving the logic for handling forbidden status codes.Enhancements to response handling:
src/Octoshift/Services/GithubClient.cs
: Modified theSendAsync
method to process different types of response content, includingMultipartFormDataContent
andStreamContent
, and log the appropriate messages.Improvements to retry logic:
src/Octoshift/Services/GithubClient.cs
: Updated theSendAsync
method to handle forbidden status with recursive retry logic, ensuring no infinite recursion occurs. Added logging for retries.src/Octoshift/Services/GithubClient.cs
: Adjusted theGetWithRetry
method to include an additional return value for response content, enhancing the retry policy.ThirdPartyNotices.txt
(if applicable)