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

Fix: project v2 item field change type may be labels #69

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

jecluis
Copy link
Contributor

@jecluis jecluis commented Dec 19, 2023

According to the webhook events we're getting sent by github, the changed field_type can be "labels" as well, but this doesn't seem to be covered by the octokit schema.

As an example, take the following snippet:

"action": "edited",
    "projects_v2_item": {
      "id": 12345,
      "node_id": "PVTI_ASDASD",
      "project_node_id": "PVT_ASDASD",
      "content_node_id": "I_ASDASD",
      "content_type": "Issue",
      "creator": {
        "login": "jecluis",
        [...]
      },
      "created_at": "2023-12-18T06:44:23Z",
      "updated_at": "2023-12-18T16:21:38Z",
      "archived_at": null
    },
    "changes": {
      "field_value": {
        "field_node_id": "PVTF_ASDASD",
        "field_type": "labels"
      }
    },

Signed-off-by: Joao Eduardo Luis <joao@1e3ms.io>

According to the webhook events we're getting sent by github, the
changed field_type can be "labels" as well, but this doesn't seem to be
covered by the octokit schema.

Signed-off-by: Joao Eduardo Luis <joao@1e3ms.io>
@yanyongyu yanyongyu added schema schema related WebHook bug Something isn't working labels Dec 19, 2023
@yanyongyu
Copy link
Owner

yanyongyu commented Dec 19, 2023

it seems this field value is not documented in the webhook types... But, the latest openapi description mark this field as simple string instead of enum. I'm working on migrate the codegen to using the openapi instead of octokit #67 . just make a fix currently 🤔 .

pyproject.toml Outdated Show resolved Hide resolved
githubkit/webhooks/models.py Outdated Show resolved Hide resolved
A mistake was made, reviewer kindly suggested the proper fix.

Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
@jecluis
Copy link
Contributor Author

jecluis commented Dec 19, 2023

Fixes applied, sorry for the silly mistake. Thanks @yanyongyu !

@yanyongyu yanyongyu changed the title 🐛 webhooks: project v2 item change may be labels Fix: project v2 item field change type may be labels Dec 19, 2023
@yanyongyu yanyongyu merged commit 9f5ac28 into yanyongyu:master Dec 19, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working schema schema related WebHook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants