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

Add GetDiffData method #18

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nyankoframe
Copy link

Add GetDiffData method so that clients can request PR diff data using RestClient with authentication.

Comment on lines +106 to +107
var diffData = await _client.ExecuteGetAsync<string>(request);
return diffData.Content;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if a request fails? E.g. 401, 404, 500, etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the GIthub plugin gets back text indicating the error message ("Not Found", etc.) and shows an error dialog indicating that it couldn't parse the diff.

I need to debug this further, as it seems even sending the PAT in the headers is not enough for one particular organization.

@nyankoframe nyankoframe marked this pull request as draft May 9, 2021 05:10
Add GetDiffData method so that clients can request PR diff data
using RestClient with authentication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants