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

Allow to set GitHub API version #1132

Merged
merged 2 commits into from
Mar 2, 2023
Merged

Allow to set GitHub API version #1132

merged 2 commits into from
Mar 2, 2023

Conversation

anz-ableton
Copy link
Contributor

This adds a new set_api_version method the GitHub class that accepts an API version string as defined here. The version is added to the session headers. Sessions headers remain unchanged if no version string was given.

Addresses #1121.

This adds a new set_api_version method the GitHub class that accepts
an API version string as defined in [1].  The version is added to the
session headers.  Sessions headers remain unchanged if no version string
was given.

Addresses #1121.

[1]: https://docs.github.com/en/rest/overview/api-versions?apiVersion=2022-11-28
Copy link
Owner

@sigmavirus24 sigmavirus24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it would be better to add to __init__ as a parameter.

@anz-ableton
Copy link
Contributor Author

@sigmavirus24 Should the api_version be added to the GitHub or GitHubCore class?

@sigmavirus24
Copy link
Owner

@sigmavirus24 Should the api_version be added to the GitHub or GitHubCore class?

GitHub

This replaces the setter method with a named
parameter of __init__.
@anz-ableton
Copy link
Contributor Author

@sigmavirus24 I removed set_api_version and added an additional api_version argument to __init__ with 009961d.

@sigmavirus24 sigmavirus24 merged commit ce43e6e into sigmavirus24:main Mar 2, 2023
@anz-ableton
Copy link
Contributor Author

@sigmavirus24 Are there any plans for a new release? I'm just asking because the last tag is from March last year.

@sigmavirus24
Copy link
Owner

I don't have the time right now but maybe @staticdev does?

@staticdev
Copy link
Collaborator

@anz-ableton I will find some time soon.

@staticdev
Copy link
Collaborator

staticdev commented Mar 6, 2023

@sigmavirus24 can you add user static on PyPI as maintainer so I can deploy it there also?

@sigmavirus24
Copy link
Owner

Resent the invite @staticdev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants