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

Improve signature of Repository.create_repo #2118

Merged
merged 1 commit into from Dec 20, 2021
Merged

Improve signature of Repository.create_repo #2118

merged 1 commit into from Dec 20, 2021

Conversation

xmo-odoo
Copy link
Contributor

@xmo-odoo xmo-odoo commented Nov 29, 2021

The docstring stated that "*" and "none" were valid values for the
organization, but neither was actually supported (unless your
organization was called "none").

Remove the misleading information from the docstring, and add support
for passing in an actual Organization as that's convenient for typing and clarity.

Fixes #2116

Copy link
Collaborator

@s-t-e-v-e-n-k s-t-e-v-e-n-k left a comment

Choose a reason for hiding this comment

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

It's a good start, I have some concerns inline.

github/Repository.py Outdated Show resolved Hide resolved
github/Repository.py Outdated Show resolved Hide resolved
github/Repository.py Outdated Show resolved Hide resolved
The docstring stated that `"*"` and `"none"` were valid values for the
organization, but neither was actually supported (unless your
organization was called `"none"`).

Remove the misleading information from the docstring, and add support
for passing in an actual `Organization` object, for better typing and
reliability properties.

Fixes #2116
@xmo-odoo
Copy link
Contributor Author

xmo-odoo commented Dec 1, 2021

Finally came around to writing a test, suite passes locally (at least when running tox straight).

Not sure how the replay files are supposed to get generated to I created one by hand copying the one from the regular call, and copying over the org data from the fork's owner key (as that's roughly similar, though not exactly the same payload the differences don't matter for this case) to simulate the organization fetch.

@xmo-odoo
Copy link
Contributor Author

xmo-odoo commented Dec 8, 2021

@s-t-e-v-e-n-k are there additional things you need me to change?

@xmo-odoo
Copy link
Contributor Author

Ping, is this still of interest or should I just close it?

@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2021

Codecov Report

Merging #2118 (ec9beeb) into master (5c290c9) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2118      +/-   ##
==========================================
- Coverage   98.90%   98.89%   -0.01%     
==========================================
  Files         108      108              
  Lines       11131    11133       +2     
==========================================
+ Hits        11009    11010       +1     
- Misses        122      123       +1     
Impacted Files Coverage Δ
github/Repository.py 97.25% <75.00%> (-0.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c290c9...ec9beeb. Read the comment docs.

@s-t-e-v-e-n-k s-t-e-v-e-n-k merged commit 001970d into PyGithub:master Dec 20, 2021
@xmo-odoo xmo-odoo deleted the create-fork-signature branch March 24, 2023 13:38
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.

Misleading Repository.create_fork docstring?
3 participants