Skip to content

Commit

Permalink
Merge pull request #13 from SerjNikitin/action_issue_resolved
Browse files Browse the repository at this point in the history
added action issue_resolved
  • Loading branch information
trifonovmixail authored Aug 16, 2022
2 parents 55f77b8 + e4f4281 commit ac0048d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ const (
issueMovedAction = action("issue_moved")

issueClosedAction = action("issue_closed")

issueResolvedAction = action("issue_resolved")
)
6 changes: 6 additions & 0 deletions jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ func parsing(hook *hook, payload []byte) (interface{}, error) {
return pl, nil
}
return nil, ErrParsingPayload
case issueResolvedAction:
var pl IssueResolvedPayload
if err := unmarshalJson(payload, &pl); err == nil {
return pl, nil
}
return nil, ErrParsingPayload
}
case IssueDeletedEvent:
var pl IssueDeletedPayload
Expand Down
8 changes: 8 additions & 0 deletions payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ type issueCommentPayload struct {
Comment *objects.Comment `json:"comment"`
}

type issueResolvedPayload struct {
Time objects.Timestamp `json:"timestamp"`
User *objects.User `json:"user"`
Issue *objects.Issue `json:"issue"`
ChangeLog *objects.ChangeLog `json:"changelog"`
}

type IssueCreatedPayload issuePayload
type IssueDeletedPayload issuePayload

Expand All @@ -71,6 +78,7 @@ type IssueWorkLogDeletedPayload issueUpdatedPayload
type IssueMovedPayload issueUpdatedPayload

type IssueClosedPayload issueUpdatedPayload
type IssueResolvedPayload issueResolvedPayload

// WorkLogs

Expand Down

0 comments on commit ac0048d

Please sign in to comment.