Repository navigation
Conversation
|
Thanks, good catch on temporary private forks. Supporting them shouldn't change how normal repositories are backed up unless there's a strong reason to, so a few things could do with adjusting. The main one is the PR comment format. Switching every repository to GraphQL changes the saved structure of On tests: 10 existing tests fail with The milestones/labels/releases 404 handling looks good. |
The reason is not making PR comment data structure be dependent on whether it was made in a temporary private fork or not (or more specifically, whether the normal issue comments endpoint 404s or not).
If you think it's important to keep this structure, it would be possible to map the fields out to their REST API equivalents. I'm not sure whether that's an acceptable approach for you.
Hmm, I guess incremental runs are going to be problematic, if the structure is now changed... If the above suggestion of mapping things out to old fields is acceptable then that would make things easier.
Hmm, I was under the impression that the token is required for the tool to run anyway. Is that not the case?
I could but then the tools reading the backups could encounter both formats, making things less consistent (unless the above suggestion of mapping out fields is acceptable). I'm not sure that's such a good idea.
I simply forgot to update the test data to include the
I can add that once we're clear on the other conversation points. Btw, you don't seem to be a maintainer or collaborator based on your badge - am I right in assuming that your feedback isn't necessarily going to be consistent with what the repo owner will want me to do in order to accept the contribution? |
One more thing worth noting is that the formats wouldn't be mixed within a single PR as comments are fetched from scratch every time a pull request is updated ("is due for repository checkpoint"). Between different PRs, however, the structures of |
Fixes #547
The biggest change involves fetching PR comments - per https://github.com/orgs/community/discussions/213137
/repos/{owner}/{repo}/issues/{issue_number}/commentsdoes not work on temporary private forks. Instead, I switched comment retrieval for pull requests to use a GraphQL query. The same data should be present in both old REST API and new GraphQL API implementation but the way it's structured into fields is not the same for some information. I used the implementation for discussion comments as a starting point so let me know, if there's any other field from IssueComment that you think is worth including.