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: PullRequestSimplePropHead label field can be null #65

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

schelv
Copy link
Contributor

@schelv schelv commented Dec 17, 2023

A similar bug was fixed by: 67d4bf5
So I did the same things and it now works locally.

Fixes #64

@yanyongyu yanyongyu added bug Something isn't working schema schema related Rest API labels Dec 17, 2023
@yanyongyu
Copy link
Owner

yanyongyu commented Dec 18, 2023

Could you please update the patch to make both label and user to be nullable? (as described in #56 )

@schelv
Copy link
Contributor Author

schelv commented Dec 18, 2023

@yanyongyu

I did not see this warning at the beginning of githubkit/rest/types.py and githubkit/rest/models.py:

"""DO NOT EDIT THIS FILE!

This file is automatically @generated by githubkit using the follow command:

    python -m codegen && isort . && black .

See https://github.com/github/rest-api-description for more information.
"""

And that's exactly what I did 😁
Looking a second time at pyproject.toml I think my proposed change is wrong.

I now want to do it the proper way and am trying to do the python -m codegen && isort . && black . locally.

As a sanity check I'm running the commands in the master branch.
However I have to remove the following from pyproject.toml to get codegen to work.

"/components/schemas/copilot-seat-details/properties/assignee" = { enum = "<unset>", oneOf = [
  { "$ref" = "#/components/schemas/simple-user" },
  { "$ref" = "#/components/schemas/team" },
  { "$ref" = "#/components/schemas/organization" },
] }

After running isort . and black . 11 files are changed.
Do you know if this is supposed to happen?

@schelv schelv marked this pull request as draft December 18, 2023 22:42
@yanyongyu
Copy link
Owner

The error is caused by schema update made by GitHub as described in #68 . just comment it and mark as [FIXED]

@yanyongyu yanyongyu linked an issue Dec 19, 2023 that may be closed by this pull request
@yanyongyu yanyongyu marked this pull request as ready for review December 19, 2023 10:16
@yanyongyu yanyongyu changed the title fix bug #64 Fix: PullRequestSimplePropHead label field can be null Dec 19, 2023
@yanyongyu yanyongyu merged commit 2e882d0 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 Rest API schema schema related
Projects
None yet
2 participants