# Functions
ToActionTask convert a actions_model.ActionTask to an api.ActionTask.
ToAnnotatedTag convert git.Tag to api.AnnotatedTag.
ToAnnotatedTagObject convert a git.Commit to an api.AnnotatedTagObject.
ToAPIAttachment converts models.Attachment to api.Attachment for API usage.
ToAPIComment converts a issues_model.Comment to the api.Comment format for API usage.
ToAPIIssue converts an Issue to API format it assumes some fields assigned with values: Required - Poster, Labels, Optional - Milestone, Assignee, PullRequest.
ToAPIIssueList converts an IssueList to API format.
ToAPIMilestone converts Milestone into API Format.
ToAPIPullRequest assumes following fields have been assigned with valid values: Required - Issue Optional - Merger.
ToAPIRelease convert a repo_model.Release to api.Release.
ToAttachment converts models.Attachment to api.Attachment for API usage.
ToBranch convert a git.Commit and git.Branch to an api.Branch.
ToBranchProtection convert a ProtectedBranch to api.BranchProtection.
ToChangedFile convert a gitdiff.DiffFile to api.ChangedFile.
ToCombinedStatus converts List of CommitStatus to a CombinedStatus.
ToCommit convert a git.Commit to api.Commit.
ToCommitMeta convert a git.Tag to an api.CommitMeta.
ToCommitStatus converts git_model.CommitStatus to api.CommitStatus.
ToCommitUser convert a git.Signature to an api.CommitUser.
ToCorrectPageSize makes sure page size is in allowed range.
ToDeployKey convert asymkey_model.DeployKey to api.DeployKey.
ToEmail convert models.EmailAddress to api.Email.
ToEmail convert models.EmailAddress to api.Email.
ToGitHook convert git.Hook to api.GitHook.
ToGitServiceType return GitServiceType based on string.
ToGPGKey converts models.GPGKey to api.GPGKey.
ToGPGKeyEmail convert models.EmailAddress to api.GPGKeyEmail.
ToIssueList converts an IssueList to API format.
ToLabel converts Label to API format.
ToLabelList converts list of Label to API format.
ToLabelTemplate converts Label to API format.
ToLabelTemplateList converts list of Label to API format.
ToLFSLock convert a LFSLock to api.LFSLock.
ToNotifications convert list of Notification to api.NotificationThread list.
ToNotificationThread convert a Notification to api.NotificationThread.
ToOAuth2Application convert from auth.OAuth2Application to api.OAuth2Application.
ToOrganization convert user_model.User to api.Organization.
ToPackage convert a packages.PackageDescriptor to api.Package.
ToPackageFile converts packages.PackageFileDescriptor to api.PackageFile.
ToPayloadCommit convert a git.Commit to api.PayloadCommit.
ToPublicKey convert asymkey_model.PublicKey to api.PublicKey.
ToPullReview convert a review to api format.
ToPullReviewCommentList convert the CodeComments of an review to it's api format.
ToPullReviewList convert a list of review to it's api format.
ToPushMirror convert from repo_model.PushMirror and remoteAddress to api.TopicResponse.
ToRepo converts a Repository to api.Repository.
ToRepoTransfer convert a models.RepoTransfer to a structs.RepeTransfer.
ToSecret converts Secret to API format.
ToStopWatches convert Stopwatch list to api.StopWatches.
ToTag convert a git.Tag to an api.Tag.
ToTagProtection convert a git.ProtectedTag to an api.TagProtection.
ToTeam convert models.Team to api.Team.
ToTeams convert models.Team list to api.Team list.
ToTimelineComment converts a issues_model.Comment to the api.TimelineComment format.
ToTopicResponse convert from models.Topic to api.TopicResponse.
ToTrackedTime converts TrackedTime to API format.
ToTrackedTimeList converts TrackedTimeList to API format.
ToUser convert user_model.User to api.User if doer is set, private information is added if the doer has the permission to see it.
ToUserAndPermission return User and its collaboration permission for a repository.
ToUsers convert list of user_model.User to list of api.User.
ToUserWithAccessMode convert user_model.User to api.User AccessMode is not none show add some more information.
ToVerification convert a git.Commit.Signature to an api.PayloadCommitVerification.
ToWikiCommit convert a git commit into a WikiCommit.
ToWikiCommitList convert a list of git commits into a WikiCommitList.
User2UserSettings return UserSettings based on a user.