Ado-wrapper

Latest version: v1.20.0

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

Scan your dependencies

Page 1 of 3

1.20.0

Added

- The `ado_wrapper.utils` import now contains multiple ansi colour codes for use with build logs.
- The ability to do `BuildTimeline.get_all_by_types()`, which returns multiple types (e.g. stages, jobs)
- The ability to do `Build.get_stages_jobs_tasks()`, which returns a nested dictionary of all the stages, jobs and tasks for a certain build.
- `Run.get_task_parents()`, which returns the ids and names of any pipeline run's task's parents (e.g. stage & job)

Changed

- Run's created off branches should now work again.
- `Build.get_build_log_content()` now requires stage, job and task, since previously you could have the same job and task (but different stage)
- The internal `_get_all_logs_ids` is now much more nicely coded, and doesn't rely on parsing HTML.
- `BuildDefinitionStage` has been renamed from `BuildDefinitionStep`, it has always reflected stages.

---

1.19.1

Changed

- `get_default_reviewers_by_repo_id` has been renamed to `get_default_reviewer_policy_by_repo_id` (and re-implemented)
- Added `MergeTypeRestrictionPolicy` to the __all__ so it can be imported easily

---

1.19.0

Added

- `Build.get_all()` now supports a limit, as well as a filter for build status (e.g. completed, failed, etc)
- `MergeTypeRestrictionPolicy`s can now be set for repos, disallowing non-squashes, fast-forwards, etc.
- Added `MergePolicies.get_all_repo_policies()` to fetch all the policies relating to a repo, e.g. required reviewers, allowed merge types, merge requirements, etc.

Changed

- The codebase is now covered by `Bandit`, a code analysis and security tool.
- Slightly more of the codebase is tested (which should mean slightly less library errors)

---

1.18.0

Added

- Build's now store the agent pool id, under `pool_id` (although it's sometimes `None`)
- Added `BuildTimeline`s, which contain a large amount of data of a build, each checkpoint, stage, step, phase, job, etc.
- Added the Ability to get a `BuildTimeline`s retries automatically, by passing in fetch_retries=True (although this is an expensive operation)
- Added `skipped` as another option to the `RunResult` literal (to align it more with the A.P.I.)

Changed

- How a lot of extracting and converting from json is for instance's `get_by_id` (and similar functions) to better respond to empty strings (now raises `UnknownError`)
- Added __all__ to better set exports for modules.
- Renamed `Artifacts` test class from `Build` to `BuildArtifact`
- Removed an eroneous print statement in `BuildArtifact`s

---

1.17.0

Added

- `Build.get_build_log_content()` to get the output from a build log terminal.
- `Run` has also got the same function (just aliased)
- Build Artifacts, and the ability to get them all, get individuals, and get the individual file contents.
- Trying to make resources with the same identifier (e.g. repos with the same name) now gives a `ResourceAlreadyExists` error.

Changed

- The predefined StateManager's classes typing has been massively improved to remove a lot of type: ignores
- All cases of from __future__ import annotations have been removed. All imported types are now wrapped in "strings"
- `PullRequestCommentThread`'s `create` now has the proper return type
- Some resources raise Configuration Error rather than use asserts (`AuditLog.get_all()`, `CodeSearch.get_by_search_string`, `ServiceEndpoint.create()`)
- Removed a lot of NotImplementedError functions, these now won't show up and then instantly error.

---

1.16.0

Added

- `typing_info.py`, which allows users to import types for type hinting in their scripts.
- Tests for Permissions
- `Organisation`s, specifically the ability to get an object by name (and hence extract `organisation_id`)
- The client now has `.ado_org_id` string, which is used when fetching personal access tokens.
- The ability to fetch Personal Access Tokens (to see when they'll expire, and what perms they have)

Changed

- Changed the return type of CodeSearch's `get_by_search_string` from Any to `list[CodeSearch]`
- Removed the "namespace_id" from the permissions as it was always it's parents namespace_id, use group_namespace_id instead
- Fixed TestRun/test_get_by_id from not removing an old run.
- The StateManager is less fussy about trying to remove resources from a state without that resource's key.
- Commit's `ChangeType` has been renamed to `CommitChangeType` for the same reason
- Permission's `ActionType` has been renamed to `PermissionActionType` so when importing for typing will be more specific
- Repo's `ActionType` & `PermissionType` have been renamed to `RepoPermsActionType` & `RepoPermissionType` respectively
- Internally, `ado_client.ado_org` has been remapped to `ado_client.ado_org_name`. For backwards compability reasons, `ado_client.ado_org` still exists but will soon be removed.
- `ado_client.ado_project` has been remapped to `ado_client.ado_project_name` (to better reflect what it is) and allow the project object to replace it in the future. For backwards compability reasons, `ado_client.ado_project` still exists but will soon be removed.

---

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.