Repository navigation
Modernize the extension and add a comprehensive test suite - #28
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
===========================================
+ Coverage 31.90% 97.06% +65.15%
===========================================
Files 9 37 +28
Lines 1332 3573 +2241
Branches 233 335 +102
===========================================
+ Hits 425 3468 +3043
+ Misses 873 68 -805
- Partials 34 37 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The `no-member` errors are fixed by `source-roots` in pylint config, a change which should make it into the template. I tried renaming the execution module into `github_mod.py`, but that results in breakage on <3008, which still contain the `github.py` execution module. Its presence means no `__virtualname__` override works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Modernizes the long-unmaintained extension and adds a comprehensive test suite as a foundation for managing the
salt-extensionsGitHub organization with it.This is step 1 of my plan for this extension.
Step 2?: Refactor functions into separate per-entity modules (likely backwards-compatible, if at all).
Step 3: Introduce resource modules.
Step 4: Add more entities we need.
tests/support/github/): a typed entity model served over HTTP, exercising the execution and state modules end-to-end (idempotence, drift, parametrized test mode, error paths). Deprecated API paths are intentionally unimplemented, so regressions to them fail loudly.salt.utils.http, PyGithub internals (_requester,_rawData, ...) or deprecated endpoints (/teams/{team_id}/...).api_urlprofile option.source-roots=srcto fix bogusno-membererrors caused by thesaltext.githubnamespace shadowing PyGithub during static analysis).Previous Behavior
team_presentwithmembersalways crashed (operator precedence bug).ruleset_absentreported success when the ruleset could not be deleted.ruleset_presentdiffed server-populated fields, causing perpetual drift, and test mode discarded forecast changes.get_issues/get_prs/get_milestones/get_issue_commentscrashed withAttributeErroron API errors;is_team_membercrashed on missing teams.remove_reporaised instead of returningFalsefor missing repos;repo_presentfailure comments were misleading.changesin test mode.New Behavior
api_urlprofile option.Merge requirements satisfied?
Commits signed with GPG?
Yes