cloudformation-github-resource-providers
cloudformation-github-resource-providers copied to clipboard
fix for being unable to rename github repo
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
Nameproperty was in the list ofcreateOnlyProperties. Removed that so it can be used in update operation - The default api user path using the
ownerandnameproperties. 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
IDinstead ofownerandname: see here for more reference: https://github.com/piotrmurach/github/issues/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