Skip to content
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

fix: Added support for update section in DoTransitionWithPayload struct #423

Merged
merged 4 commits into from
Feb 19, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,26 @@ type TransitionField struct {

// CreateTransitionPayload is used for creating new issue transitions
type CreateTransitionPayload struct {
Update TransitionPayloadUpdate `json:"update" structs:"update"`
Transition TransitionPayload `json:"transition" structs:"transition"`
Fields TransitionPayloadFields `json:"fields" structs:"fields"`
}

// TransitionPayloadUpdate represents the updates of Transition calls like DoTransition
type TransitionPayloadUpdate struct {
Comment []TransitionPayloadComment `json:"comment" structs:"comment"`
}

// TransitionPayloadComment represents comment in Transition payload
type TransitionPayloadComment struct {
Add TransitionPayloadCommentBody `json:"add" structs:"add"`
}

// TransitionPayloadCommentBody represents body of comment in payload
type TransitionPayloadCommentBody struct {
Body string `json:"body"`
}

// TransitionPayload represents the request payload of Transition calls like DoTransition
type TransitionPayload struct {
ID string `json:"id" structs:"id"`
Expand Down