-
Notifications
You must be signed in to change notification settings - Fork 572
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels