-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Error when parsing repository that uses multiselect custom-properties #3229
Comments
Oh! Wow... TIL! Thank you for the report, @spalberg ! So to truly support anything, it sounds like it needs to be changed to a Thoughts? |
That would be a breaking API change, but if you agree, would you like to put together a PR, @spalberg ? |
Thanks for the quick response @gmlewis! Disclaimer: I have yet to write my first line of go 😅 But I think that I could also try myself on that PR over the weekend. |
Sounds like a great plan, @spalberg ! Welcome to Go! It is one of my all-time favorite programming languages and I think you will enjoy it! Great... the issue is yours. We have some helpful tips in the CONTRIBUTING.md file to help you get started. |
Hi @gmlewis, |
Problem overview
We started using githubs custom properties recently and noticed that our reviewdog/action-actionlint checks started to fail with the following error:
reviewdog/action-actionlint uses reviewdog/reviewdog which in turn uses the current version of google/go-github to parse github related json.
Analysis
Handling for
custom_properties
was added in this PR: #3065.The field is expected to be a map of string values (https://github.com/google/go-github/pull/3065/files#diff-7a0544e44d81e972917728b13efd3fa55e7f9d1bd8edb745216494fa1e178f93R80).
The actual api response can also include non-string values. The following is part of an actual api response obtained by using the github cli (
gh api repos/OWNER/REPO
):The custom property
technologies
is multi select and github seems to return the selected values as an array which causes the parser to error out. The custom propertyorg-managed-rulesets
is of type boolean and represented using a string by github.Sadly, githubs api docs are really bad when it comes to
custom_property
, so I can't say for sure if there are other output options than string or array of strings:The text was updated successfully, but these errors were encountered: