Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ os_support:
package_name: github
project_name: github
python_requires: '3.10'
relax_pylint: true
relax_pylint: false
salt_version: '3006'
source_url: https://github.com/salt-extensions/saltext-github
ssh_fixtures: false
Expand Down
22 changes: 5 additions & 17 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ recursive=no
# source root is an absolute path or a path relative to the current working
# directory used to determine a package namespace for modules located under the
# source root.
source-roots=
# Resolve the saltext namespace package correctly. Without this, pylint
# considers `github` (i.e. saltext.github) a top-level package, which
# shadows PyGithub's module during static analysis (=> no-member errors).
source-roots=src

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
Expand Down Expand Up @@ -433,32 +436,17 @@ confidence=HIGH,
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=consider-using-f-string,
duplicate-code,
disable=duplicate-code,
fixme,
inconsistent-return-statements,
keyword-arg-before-vararg,
line-too-long,
logging-fstring-interpolation,
missing-class-docstring,
missing-function-docstring,
missing-module-docstring,
no-else-return,
no-member,
protected-access,
redefined-argument-from-local,
redefined-builtin,
redefined-outer-name,
too-few-public-methods,
too-many-boolean-expressions,
too-many-branches,
too-many-instance-attributes,
too-many-lines,
too-many-locals,
too-many-nested-blocks,
too-many-positional-arguments,
too-many-return-statements,
too-many-statements,
ungrouped-imports,
wrong-import-position

Expand Down
1 change: 1 addition & 0 deletions changelog/+add_team_profile.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `add_team` refreshing the team cache using the default profile instead of the configured one
1 change: 1 addition & 0 deletions changelog/+api_url.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added the optional `api_url` profile option for targeting GitHub Enterprise Server instances
1 change: 1 addition & 0 deletions changelog/+is_team_member_missing_team.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed ``is_team_member`` crashing with a ``TypeError`` when the team does not exist. It now returns ``False``.
1 change: 1 addition & 0 deletions changelog/+list_funcs_error_crash.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed ``get_issues``, ``get_issue_comments``, ``get_prs`` and ``get_milestones`` crashing with an ``AttributeError`` when the API returned an error. They now raise a ``CommandExecutionError`` carrying the API error message.
1 change: 1 addition & 0 deletions changelog/+milestone_pops.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `get_milestones`/`get_milestone` crashing on API payloads missing optional keys
1 change: 1 addition & 0 deletions changelog/+pygithub_auth.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a PyGithub deprecation warning by migrating to `github.Auth.Token` authentication
1 change: 1 addition & 0 deletions changelog/+pygithub_public_api.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The execution module now exclusively relies on public PyGithub APIs instead of internal ones (``_requester``, ``_identity``, ``_rawData``, manual ``PaginatedList`` construction). It also avoids deprecated API paths (``/teams/{team_id}/...``) by addressing teams by slug and checking team memberships via the ``memberships`` endpoints. The minimum supported PyGithub version is now 2.2.
1 change: 1 addition & 0 deletions changelog/+remove_repo_missing.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `remove_repo` raising an exception instead of returning `False` for nonexistent repositories
1 change: 1 addition & 0 deletions changelog/+repo_present_profile.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `repo_present` not passing the configured profile when creating repositories
1 change: 1 addition & 0 deletions changelog/+repo_present_team_add_comment.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed ``repo_present`` reporting a failed team *removal* when *adding* a repository to a team failed.
1 change: 1 addition & 0 deletions changelog/+ruleset_absent_delete_failure.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed ``ruleset_absent`` reporting success when the ruleset could not be deleted. The module function returns a truthy error dict on failure, which was mistaken for success, and the failure result was subsequently overwritten by the "does not exist" fallback.
1 change: 1 addition & 0 deletions changelog/+ruleset_states.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `ruleset_present` drift detection, which compared server-populated fields and iterated the wrong parameter set, and made the ruleset states report forecast changes in test mode
1 change: 1 addition & 0 deletions changelog/+single_http_stack.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All API calls are now routed through the PyGithub client, honoring the configured `api_url`, authentication and retry handling uniformly
1 change: 1 addition & 0 deletions changelog/+team_present_members.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `team_present` crashing when managing team members
1 change: 1 addition & 0 deletions changelog/+testmode_projected_changes.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All states now report the projected changes in test mode, matching the changes reported on actual application. Exception: ``team_present`` does not project member/repo changes for teams that do not exist yet.
5 changes: 3 additions & 2 deletions docs/ref/utils/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ _________
Utilities
_________

.. currentmodule:: saltext.github.utils
.. currentmodule:: saltext.github

.. autosummary::
:toctree:

github
utils
utils.github
5 changes: 5 additions & 0 deletions docs/ref/utils/saltext.github.utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
saltext.github.utils
====================

.. automodule:: saltext.github.utils
:members:
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def lint_tests(session):
Run PyLint against the test suite. Set PYLINT_REPORT to a path to capture output.
"""
flags = [
"--disable=I,redefined-outer-name,no-member,missing-module-docstring,missing-function-docstring,missing-class-docstring,attribute-defined-outside-init,inconsistent-return-statements,too-few-public-methods,too-many-public-methods,unused-argument",
"--disable=I,redefined-outer-name,no-member,missing-module-docstring,missing-function-docstring,missing-class-docstring,attribute-defined-outside-init,inconsistent-return-statements,too-few-public-methods,too-many-public-methods",
]
if session.posargs:
paths = session.posargs
Expand Down Expand Up @@ -404,7 +404,7 @@ def lint_tests_pre_commit(session):
Run PyLint against the code and the test suite. Set PYLINT_REPORT to a path to capture output.
"""
flags = [
"--disable=I,redefined-outer-name,no-member,missing-module-docstring,missing-function-docstring,missing-class-docstring,attribute-defined-outside-init,inconsistent-return-statements,too-few-public-methods,too-many-public-methods,unused-argument",
"--disable=I,redefined-outer-name,no-member,missing-module-docstring,missing-function-docstring,missing-class-docstring,attribute-defined-outside-init,inconsistent-return-statements,too-few-public-methods,too-many-public-methods",
]
if session.posargs:
paths = session.posargs
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ requires-python = ">= 3.10"
dynamic = ["version"]
dependencies = [
"salt>=3006",
"PyGithub",
"PyGithub>=2.2",
]

[project.readme]
Expand Down
Loading
Loading