All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codacy.client.stash.PullRequestComment.scala Maven / Gradle / Ivy

package com.codacy.client.stash

import org.joda.time.DateTime
import play.api.libs.functional.syntax._
import play.api.libs.json._

case class PullRequestComment(id: Long, author: User, content: String, createdDate: DateTime)

object PullRequestComment {
  implicit val reader: Reads[PullRequestComment] = (
    (__ \ "id").read[Long] and
      (__ \ "author").read[User] and
      (__ \ "text").read[String] and
      (__ \ "createdDate").read[Long].map(millis => new DateTime(millis))
    ) (PullRequestComment.apply _)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy