You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use @octokit/routes to generate a list of requests that would need to be sent. Use preview headers where they are required (There are 508 requests for api.github.com as of March 18)
Figure out required setups for each request. E.g. for "Add labels to issues" the setup would be
Create repository
Create issue
Create label
Then after the "Add labels to issues" request was recorded, delete the temporary repository again.
We might be able to use the route path as an indication of the "hierarchy of requests", meaning what setup is needed to record a certain request.
Once we have the list requests together with necessary setups, we have to create user accounts and other resources need to send the requests, e.g. an organization and apps.
Run the requests, record the responses, referencing the routes recorded in @ocotkit/routes so the two can be combined easily.
The endpoint responses would differ from the current scenarios as they would all be a single request/response.
Improvements
Record response with all preview headers enabled for the endpoint.
Normalize responses like we do in @octokit/fixtures
Bonus: Once responses are normalized, we could add the responses to @octokit/fixtures for testing
Reuse setups to record requests. E.g. when recording "create an issue", that setup can be used for "get an issue" and many others.
The text was updated successfully, but these errors were encountered:
I’m not sure how much of this could be automated. We will definitely end up with some settings that we’d need to maintain. And I’m sure there are plenty of edge cases that will be more complex.
We want to explore how to record responses for all endpoints of GitHub’s REST API.
Here is how I would approach this. My work-in-progress lives at gr2m/github-rest-api-responses
@octokit/routes
to generate a list of requests that would need to be sent. Use preview headers where they are required(There are 508 requests for api.github.com as of March 18)
Then after the "Add labels to issues" request was recorded, delete the temporary repository again.
We might be able to use the route path as an indication of the "hierarchy of requests", meaning what setup is needed to record a certain request.
@ocotkit/routes
so the two can be combined easily.The endpoint responses would differ from the current scenarios as they would all be a single request/response.
Improvements
The text was updated successfully, but these errors were encountered: