Ado-wrapper

Latest version: v1.39.0

Safety actively analyzes 690691 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

1.38.0

Added

- `Commit.get_all_by_repo` is now paginated, going from only 100 results to now unlimited.
- All session requests made will now be logged per entry. This allows for better debugging and call de-duplication. This can be enabled by setting `latest_log_count` to either a number more than 0, or -1 to store infinite logs.
- Variable group mappings are now a mapping of string -> (string | Secret), a new type which can mark things as secrets (import from root).

Changed

- Fixed a small issue with `Commit.get_all_by_repo()`, which had a trailing `&`.
- Fixed an issue with the paginator always fetching one more page than it needed.
- Once again fixed the `PullRequest.link()` method, which improperly returned a daylight savings related bug. This is accounted for now.
- System messages for `PullRequestComment`s now also include resolving merge conflicts.
- Optimised a call in startup which means one less API call is made on initialisation.

---

1.37.0

Added

- `PullRequest`s can now be (automatically) paginated, meaning you can fetch more than 100 (or 1000) results using `.get_all()`.
- `Project`s `get_pipeline_settings()` function now returns the retention policy settings marked at the top as well.
- Added `BuildTimeline.get_link()`.
- `BuildTimeline`s now also store their `build_id`

Changed

- Fixed `PullRequest.link()`, `PullRequestComment.link()` and `Repo.link()`
- Reworked how `Repo.get_all_pull_requests()` works and it's underlying function.
- Used aliases for a lot of `Repo`s functions, making it DRY-er and removing code duplication.
- Removed `get_content_static()`, it was bloated code and should never have been included.
- `Commit`s __str__ method has been removed and replaced by the auto generated one from dataclasses

---

1.36.0

Added

- StateManager.add_resource_to_state() now only takes the resource, rather than the id, type, etc, and extracts these itself now.
- `BuildArtifact`s now have a `build_id` attribute.
- `Commit`s now have the `repo_id` attribute.
- `Artifact`s, `AuditLog`s, `Commit`s, `PersonalAccessToken`s, `PullRequestComment`s, `ReleaseDefinition`s & `Release`s now have proper .`link` methods.

Changed

- Fixed a bug with `PullRequest`s `creation_date` and `comment_type` attributes being mixed up when using `from_request_payload`

---

1.35.0

Added

- `SecureFile`s can now be created and deleted using the appropriate functions
- `BuildDefinition`s can now allow the use of `SecureFile`s, using `BuildDefinition.allow_secure_file()`
- `SecureFiles` can now be downloaded (the contents), although like `VariableGroup.get_variable_group_contents()`, it's very slow (20-60 seconds)
- `PullRequestComment`s & `PullRequestCommentThread`s now also include their parent pull request id and repo id for convenience.

Changed

- `StateManager`s now also store the ADO `Organisation` and `Project`, preventing deletes of resources from different orgs/projects (solves a small bug)
- `PullRequestCommentThread` are now StateManaged properly, and can be deleted, created, etc via state.

---

1.34.0

Added

- Added `SecureFile`s, which are in a minimal state, only fetching, listing and getting by name are currently impelmented, the rest will be in the next version.
- Added `.link(ado_client)` attribute to most resources, e.g. repo, variable group, run etc.

Changed

- You can now import `PullRequestComment` directly from root
- Fixed `Reviewer`s `from_json()` and `to_json()` sometimes not working properly.
- Lists of custom resources are now properly converted to and from json
- `delete_after` parameter of `TemporaryResource`s now defaults to `True`, meaning things will be temporary after all.

---

1.33.0

Added

- Added Organisation settings getters, including `get_organisation_overview_settings`, `get_organisation_security_policy_settings`, `get_organisation_repository_settings`, `get_organisation_repository_advanced_settings`, `get_organisation_pipeline_settings` and `get_organisation_board_process_settings`.
- `OrgRepoSettingsProgrammaticNamesTypes` and `OrgRepoSettingsInternalNamesTypes` to typing_info.py
- PullRequests.get_all() now has a filter for start and end time of PR creation, as well as a new limit (in the form of an int).
- Added `Repo.set_default_branch(ado_client, <new_default_branch_name>)`, which sets the default branch name for a repo.
- Added a new context manager, `TemporaryResource`, which takes a class and the same arguments as the class to create and delete after it's done.

Changed

- PullRequests.get_all() now returns 1000 results, instead of 100.
- PullRequestComment now has a `.to_json()` and a `from_json()` method.

---

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.