gitea-github-proxy/api/convert_event.go

15 lines
395 B
Go
Raw Normal View History

package api
import (
"code.gitea.io/gitea/modules/structs"
"github.com/google/go-github/v59/github"
)
func convertPullRequestEvent(event *structs.PullRequestPayload) *github.PullRequestEvent {
return &github.PullRequestEvent{
Action: stringPtr(translatePrAction(event.Action)),
PullRequest: convertPullRequest(event.PullRequest),
Repo: convertRepo(event.Repository),
}
}