-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: providing some actions with issues, queues and users from API (#8)
- Loading branch information
Showing
33 changed files
with
1,312 additions
and
118 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: 'v0.0.287' | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
# ya_tracker_client | ||
Async Yandex Tracker Client | ||
# Yandex Tracker Client (or Yet Another Tracker Client) | ||
|
||
Async Yandex Tracker Client based on aiohttp and pydantic (v2) | ||
|
||
# Current library capabilities | ||
|
||
- Working with queues | ||
- Getting information about issues, priorities and transitions | ||
- Working with issue relationships | ||
- Getting user information | ||
|
||
# TBD | ||
|
||
## Issues | ||
|
||
- [ ] Перенести задачу в другую очередь | ||
- [ ] Узнать количество задач | ||
- [ ] Найти задачи | ||
- [ ] Освободить ресурсы просмотра прокрутки | ||
- [ ] Выполнить переход в статус | ||
- [ ] Получить историю изменений задачи | ||
|
||
## Queues - automation | ||
|
||
- [ ] Создать автодействие | ||
- [ ] Получить параметры автодействия | ||
- [ ] Создать триггер | ||
- [ ] Получить параметры триггера | ||
|
||
# TBD in a long run | ||
|
||
- Checklists | ||
- Projects | ||
- Comments | ||
- Macros | ||
- Internal links | ||
- Attachments | ||
- Tables of tasks | ||
- Components | ||
- Import | ||
- Package operations | ||
- Time scoring | ||
- Issues fields | ||
- Users |
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from datetime import datetime | ||
from enum import Enum | ||
|
||
from pydantic import AliasChoices, Field | ||
|
||
from ya_tracker_client.domain.entities.base import AbstractEntity | ||
from ya_tracker_client.domain.entities.issue import IssueShort | ||
from ya_tracker_client.domain.entities.issue_status import IssueStatus | ||
from ya_tracker_client.domain.entities.user import UserShort | ||
|
||
|
||
class IssueRelationshipTypeEnum(str, Enum): | ||
RELATES = "relates" | ||
IS_DEPENDENT_BY = "is dependent by" | ||
DEPENDS_ON = "depends on" | ||
IS_SUBTASK_FOR = "is subtask for" | ||
IS_PARENT_TASK_FOR = "is parent task for" | ||
DUPLICATES = "duplicates" | ||
IS_DUPLICATED_BY = "is duplicated by" | ||
IS_EPIC_OF = "is epic of" | ||
HAS_EPIC = "has epic" | ||
|
||
|
||
class IssueRelationshipType(AbstractEntity): | ||
url: str = Field(validation_alias=AliasChoices("self", "url")) | ||
id: str | ||
inward: str | ||
outward: str | ||
|
||
|
||
class IssueRelationship(AbstractEntity): | ||
url: str = Field(validation_alias=AliasChoices("self", "url")) | ||
id: int | ||
type: IssueRelationshipType | ||
direction: str | ||
object: IssueShort | ||
created_at: datetime = Field(validation_alias=AliasChoices("createdAt", "created_at")) | ||
updated_at: datetime = Field(validation_alias=AliasChoices("updatedAt", "updated_at")) | ||
created_by: UserShort = Field(validation_alias=AliasChoices("createdBy", "created_by")) | ||
updated_by: UserShort = Field(validation_alias=AliasChoices("updatedBy", "updated_by")) | ||
assignee: UserShort | None = None | ||
status: IssueStatus | ||
|
||
|
||
class IssueRelationshipCreate(AbstractEntity): | ||
issue: str | ||
relationship: IssueRelationshipTypeEnum |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from pydantic import AliasChoices, Field | ||
|
||
from ya_tracker_client.domain.entities.base import AbstractEntity | ||
|
||
|
||
class IssueStatus(AbstractEntity): | ||
url: str = Field(validation_alias=AliasChoices("self", "url")) | ||
id: str | ||
key: str | ||
display: str |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from pydantic import AliasChoices, Field | ||
|
||
from ya_tracker_client.domain.entities.base import AbstractEntity | ||
|
||
|
||
class IssueType(AbstractEntity): | ||
url: str = Field(validation_alias=AliasChoices("self", "url")) | ||
id: str | ||
key: str | ||
display: str |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from pydantic import AliasChoices, Field | ||
|
||
from ya_tracker_client.domain.entities.base import AbstractEntity | ||
from ya_tracker_client.domain.entities.issue_type import IssueType | ||
from ya_tracker_client.domain.entities.resolution import ResolutionShort | ||
from ya_tracker_client.domain.entities.workflow import WorkflowShort | ||
|
||
|
||
class IssueTypeConfig(AbstractEntity): | ||
issue_type: IssueType = Field(validation_alias=AliasChoices("issueType", "issue_type")) | ||
workflow: WorkflowShort | ||
resolutions: list[ResolutionShort] |
This file contains 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
Oops, something went wrong.