Ado-wrapper

Latest version: v1.24.0

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

Scan your dependencies

Page 2 of 4

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.

---

1.15.0

Added

- The ability to fetch `Assigned to my teams` PullRequest list using `PullRequest.get_my_pull_requests()`
- Can be altered permantly using `PullRequest.set_my_pull_requests_included_teams()`
- The ability to get the permission set by the provider PAT, e.g. Git Repo -> Contribute. using `Permission.get_by_project()`
- Started work on a feature to decorate functions with `required_perms()` which will pre-emptively warn the user for which perm they need.

Changed

- Unmarking a PR as draft now works properly (previously it would try to re-mark as draft)
- Slightly improved the error message when the API raises a 401 (raises an InvalidPermissionsError)

---

1.14.0

Added

- When creating/fetching `Run`s, you can now see the `Run`s `Build Definition` id.
- More tests for `Search`es.
- `Run.get_run_stage_results` to get a list of each job's status/result

Changed

- Ran Flake8 over the codebase, many non-code but formatting changes
- `Search` is now called `CodeSearch` (to allow for other search types in the future)

---

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.