Skip to content
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

[BUG]: New custom property polymorphic values break deserialization #520

Closed
1 task done
colbylwilliams opened this issue Jun 21, 2024 · 1 comment · Fixed by #521
Closed
1 task done

[BUG]: New custom property polymorphic values break deserialization #520

colbylwilliams opened this issue Jun 21, 2024 · 1 comment · Fixed by #521
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@colbylwilliams
Copy link
Contributor

What happened?

Custom Property and Custom Property Value schemas added new value_types and updated the default_value and value properties to allow for null, string, or array. This breaks deserialization of payloads with Custom Property or Custom Property Values.

More importantly, it breaks deserialization for any webhook payload that has a Repository property, and that Repository includes a custom property value that is an array.

Example workflow_job.completed that failed to deserialize by the webhook processor

{
  "action": "completed",
  "workflow_job": {
    "id": ...
  },
  "repository": {
    "id": ...
    "default_branch": "main",
    "custom_properties": {
      "dev_platform": "workflows",
      "test_ms": [
        "option_d",
        "option_e"
      ],
      "test_ss": "option_c",
      "test_tf": "foo"
    }
  },
  "organization": {
    "login": ...
}

Could not process GitHub event. The JSON value could not be converted to System.String. Path: $.repository.custom_properties.test_ms

Versions

Octokit.Webhooks v2.2.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@colbylwilliams colbylwilliams added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jun 21, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant