feat!: Fix source
property on Repo Custom Properties
#3333
Merged
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.
BREAKING CHANGE: Change
RulesetRepositoryPropertyTargetParameters.Source
fromstring
to*string
.Our application was failing to apply or update Github Rulesets because of the following error:
Following the release of Go Github v65. Digging into this we saw a change in the following PR #3250.
Looking into the Github REST API the
source
attribute is not listed as required. Thus we also did not implement this on our side. The problem that surfaced was the fact that the property was still being sent to the Github API even though it was empty.With this PR we make it optional, a pointer, and i adapted test cases to verify that it is indeed missing when empty.
I tested this with our own fork of Go Github and it works for our case again.
Let me know what you think!