-
Notifications
You must be signed in to change notification settings - Fork 0
jira feat: обновление структуры подсказок, новые методы поиска, обновления и создания задач #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ления и создания задач
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- На 27 строке MarshalJSON должен быть не указателем. На 35 у тебя уже правильно сделано
- формат времени можно в констатнту вынести
| } | ||
| all = append(all, resp.Issues...) | ||
| offset += len(resp.Issues) | ||
| if len(resp.Issues) == 0 || offset >= resp.Total { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ИМХО, чуть читаемее было бы сравнивать len(all) с resp.total и offset в конце обновлять
jira/jira.go
Outdated
| availableStatuses[t.To.ID] = t.To.Name | ||
| if t.To.ID == targetStatusId { | ||
| targetTransitionID = t.ID | ||
| break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Не вижу смысла каждый раз делать мапу для ошибки. Более того в функцию formatAvailableStatuses без проблем можно передать слайс и сильно там логика не поменяется
- тут вместо break можно вызывать сразу return j.TransitionIssue(ctx, issueKey, targetTransitionID)
- В ИИ эти измненения строил и функция получается намного читаемее
jira/templates.go
Outdated
| }, | ||
| } | ||
| } | ||
| var Issue = newIssueSug() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Приписку Sug к названиям переменных нужно убрать везде
jira/templates.go
Outdated
| EventType EventType // Тип события | ||
| } | ||
| type Issue struct { | ||
| type IssueSug struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
все внктренние структуры тут я бы от греха сделал неэкспортируемыми
No description provided.