in modules/core/src/main/scala/org/scalasteward/core/forge/gitea/GiteaApiAlg.scala [156:187]
override def createFork(repo: Repo): F[RepoOut] =
client
.postWithBody[Repository, CreateForkOption](
url.forks(repo),
CreateForkOption(name = none, organization = none),
modify
)
.map(repoOut(_))
override def createPullRequest(repo: Repo, data: NewPullRequestData): F[PullRequestOut] =
for {
_ <- F.whenA(data.assignees.nonEmpty)(warnIfAssigneesAreUsed)
_ <- F.whenA(data.reviewers.nonEmpty)(warnIfReviewersAreUsed)
labels <- getOrCreateLabel(repo, data.labels.toVector)
create = CreatePullRequestOption(
assignee = none,
assignees = none,
base = data.base.name.some,
body = data.body.some,
due_date = none,
head = data.head.some,
labels = labels.some,
milestone = none,
title = data.title.some
)
resp <- client
.postWithBody[PullRequestResp, CreatePullRequestOption](
url.pulls(repo),
create,
modify
)
} yield pullRequestOut(resp)