Skip to content

Add missing attributes to Repository #2742

Merged
EnricoMi merged 17 commits intoPyGithub:mainfrom
RobPasMue:feat/visibility-in-repository
Sep 4, 2023
Merged

Add missing attributes to Repository #2742
EnricoMi merged 17 commits intoPyGithub:mainfrom
RobPasMue:feat/visibility-in-repository

Conversation

@RobPasMue
Copy link
Contributor

@RobPasMue RobPasMue commented Aug 31, 2023

According to https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#update-a-repository

New parameters are accepted and others have been removed.

Parameters included in this PR:
visibility
is_template
use_squash_pr_title_as_default
squash_merge_commit_title
squash_merge_commit_message
merge_commit_title
merge_commit_message
web_commit_signoff_required

Paramters removed in this PR:
has_downloads

Parameters have also been ordered according to the REST API order in the documentation

@RobPasMue
Copy link
Contributor Author

Hi @trim21 ! Let me know if I need to do anything else to get this feature merged :) I hope I did things properly

Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

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

While you are adding a missing attribute, can you add those that are also missing, e.g.

  • is_template
  • use_squash_pr_title_as_default
  • squash_merge_commit_title
  • squash_merge_commit_message
  • merge_commit_title
  • merge_commit_message
  • web_commit_signoff_required

Please check if I missed some.

@EnricoMi EnricoMi changed the title feat: add visibility in Repository.edit() Add visibility in Repository Aug 31, 2023
@RobPasMue
Copy link
Contributor Author

Yep, for sure @EnricoMi - let me do that! =)

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2023

Codecov Report

Patch coverage: 98.61% and no project coverage change.

Comparison is base (b6a28a2) 97.44% compared to head (c2d2f27) 97.44%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2742   +/-   ##
=======================================
  Coverage   97.44%   97.44%           
=======================================
  Files         139      139           
  Lines       14129    14192   +63     
=======================================
+ Hits        13768    13830   +62     
- Misses        361      362    +1     
Files Changed Coverage Δ
github/Repository.py 96.83% <98.61%> (+0.05%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RobPasMue RobPasMue requested a review from EnricoMi September 1, 2023 06:51
@RobPasMue
Copy link
Contributor Author

@EnricoMi - changes have been addressed - I have also updated removed arguments (like has_downloads) from the edit API - feel free to review again

@RobPasMue RobPasMue changed the title Add visibility in Repository Add missing arguments for Repository.edit(...) Sep 1, 2023
Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

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

Can we get add all those new attributes to _initAttributes and _useAttributes and create getters as well? Please record test data for testAttributes and add those attributes there as well.

@RobPasMue RobPasMue requested a review from EnricoMi September 1, 2023 11:38
@RobPasMue
Copy link
Contributor Author

Hi @EnricoMi - issues addressed. I added the properties, initialized the attributes and modified the useAttributes function. I also updated the test data. I hope everything is fine now. Let me know if you need anything else

@MaxJPRey
Copy link

MaxJPRey commented Sep 1, 2023

Nice work @RobPasMue . Thanks for updating the properties according to the API.

Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

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

Awesome, good work!

@EnricoMi EnricoMi changed the title Add missing arguments for Repository.edit(...) Add missing attributes to Repository Sep 4, 2023
@EnricoMi EnricoMi merged commit 65cfeb1 into PyGithub:main Sep 4, 2023
@RobPasMue
Copy link
Contributor Author

Thanks @EnricoMi! Appreciated your feedback and merging!

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.

4 participants