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

fix for being unable to rename github repo #52

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zan-mateusz
Copy link

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Notes.

  • The Name property was in the list of createOnlyProperties. Removed that so it can be used in update operation
  • The default api user path using the owner and name properties. This has caused issues when trying to update since the name was primaryIdentifier and therefore even though it was specified in update input, it used original value. If name was removed from primaryIdentifier list, it would be unable to call the api correctly for GET handler.
  • Fortunately, there is an alternative that allows us to call the api with the ID instead of owner and name: see here for more reference: undocumented API - support piotrmurach/github#282
  • Therefore, adding the ID as read only parameter and making that ID a primaryIdentifier, then calling the alternative API makes this work as expected, allowing for renaming
  • Since we use octokit endpoints, had to use ts-ignore, as the alternative api method is not part of endpoints interface in octokit - however it works as expected

@zan-mateusz zan-mateusz requested review from a team as code owners November 3, 2023 16:39
@@ -245,6 +249,7 @@
"Name"
],
"readOnlyProperties": [
"/properties/Id",
Copy link
Contributor

Choose a reason for hiding this comment

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

Might break existing stack updates. Please try testing following scenario :
1.Create a stack with out this changes(using current prod changes).
2.Update the stack with this changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants