This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
Fixed issue with pushing project to empty GitHub repo #9086
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Backend code was trying to delete an empty repo and then crete it with auto_init set to true. This needs the
admin
GH scope, though, which is not requested. Changed this to creating a dummy readme file instead.Fixed bug in edit ProjectsPage that was not refreshing the installed projects on project patch. This was causing projects that were patched to have a GitHub repo link to not have their options updated to reflect that.
🤖 Generated by Copilot at 7575cf5
This pull request refactors the resource and project management features of the client and server packages to use the new
Engine
class and to handle some edge cases. It also updates theuploadToRepo
function to avoid deleting and recreating GitHub repositories.References
closes #9081 #9082
Explanation
🤖 Generated by Copilot at 7575cf5
Engine.instance.api
instead ofAPI.instance.client
in the client components (link, link, link, link, link)ProjectsPage.tsx
(link)useEffect
hook to listen to thepatched
event of the project service and update the installed projects list inProjectsPage.tsx
(link)uploadToRepo
function to handle the empty repository case by creating a dummy README.md file ingithub-helper.ts
(link)owner
when fetching the project owners in theproject
service hook inproject.ts
(link)🤖 Generated by Copilot at 7575cf5
QA Steps
List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.
Checklist