Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

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
"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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants