You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a custom property at my organization and set it on a few repos, and then started seeing this on digger workflows:
level=ERROR msg="Failed to parse GitHub context. error parsing GitHub context JSON: json: cannot unmarshal array into Go struct field Repository.repository.custom_properties of type string"
I chatted with cursor, and got this reasoning:
The issue is in the UnmarshalJSON method in models.go. When parsing GitHub events (lines 60-83), it unmarshals into github.PullRequestEvent, github.IssueCommentEvent, etc. from github.com/google/go-github/v55/github. These event types include a Repository struct from the go-github library, which defines custom_properties as a string, but GitHub now returns it as an array.
I see that go-github is currently at v80, and v55 is from september 2023, so this probably needs updating.
soop3rn0t, automationforthepeople, gkrinc, jvanst, cjohnson1306 and 8 more