Skip to content

Rename Github.get_organization argument login to org#3187

Merged
EnricoMi merged 2 commits intoPyGithub:mainfrom
blyedev:fix/get_orgs_var
Feb 14, 2025
Merged

Rename Github.get_organization argument login to org#3187
EnricoMi merged 2 commits intoPyGithub:mainfrom
blyedev:fix/get_orgs_var

Conversation

@blyedev
Copy link
Copy Markdown
Contributor

@blyedev blyedev commented Feb 4, 2025

Fixes #3186.

@EnricoMi
Copy link
Copy Markdown
Collaborator

You are right, it is called org in the docs: https://docs.github.com/en/rest/orgs/orgs?apiVersion=2022-11-28#get-an-organization

Copy link
Copy Markdown
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.

LGTM!

@EnricoMi EnricoMi changed the title Fix Github.get_organization signature hint #3186 Rename Github.get_organization argument login to org Feb 14, 2025
@blyedev
Copy link
Copy Markdown
Contributor Author

blyedev commented Feb 14, 2025

@EnricoMi it seems the docs build has failed, you might want to rerun it before merging

@EnricoMi EnricoMi enabled auto-merge February 14, 2025 19:41
@EnricoMi EnricoMi added this pull request to the merge queue Feb 14, 2025
@github-actions
Copy link
Copy Markdown

Test Results

    7 files  ±0      7 suites  ±0   4m 11s ⏱️ -7s
  984 tests ±0    984 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 888 runs  ±0  6 887 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 2ebec98. ± Comparison against base commit 4d307a7.

Merged via the queue into PyGithub:main with commit 9e3cf20 Feb 14, 2025
15 checks passed
@cyberious
Copy link
Copy Markdown

IMHO: This was a breaking change and, as such, should have been a major version bump. While calling without arguments is not an issue, we have a wrapper class built to have retry logic with a generic function being passed and using the *kwargs, which this change ended up breaking. However, I am happy to see consistency between API docs and code.

Erethon added a commit to fricklerhandwerk/nix-security-tracker that referenced this pull request Jun 17, 2025
The `get_organization` method's named argument `login` was changed to
`org` PyGithub/PyGithub#3187
Erethon added a commit to fricklerhandwerk/nix-security-tracker that referenced this pull request Jun 17, 2025
The `get_organization` method's named argument `login` was changed to
`org` PyGithub/PyGithub#3187
Erethon added a commit to NixOS/nix-security-tracker that referenced this pull request Jun 17, 2025
The `get_organization` method's named argument `login` was changed to
`org` PyGithub/PyGithub#3187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub.get_organization wrong signature hint due to misnamed variable

4 participants