diff options
Diffstat (limited to 'vendor/github.com/google/go-github/github/github-accessors.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/github-accessors.go | 244 |
1 files changed, 238 insertions, 6 deletions
diff --git a/vendor/github.com/google/go-github/github/github-accessors.go b/vendor/github.com/google/go-github/github/github-accessors.go index c74c025..6da009b 100644 --- a/vendor/github.com/google/go-github/github/github-accessors.go +++ b/vendor/github.com/google/go-github/github/github-accessors.go @@ -20,6 +20,14 @@ func (a *AbuseRateLimitError) GetRetryAfter() time.Duration { return *a.RetryAfter } +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (a *AdminEnforcement) GetURL() string { + if a == nil || a.URL == nil { + return "" + } + return *a.URL +} + // GetVerifiablePasswordAuthentication returns the VerifiablePasswordAuthentication field if it's non-nil, zero value otherwise. func (a *APIMeta) GetVerifiablePasswordAuthentication() bool { if a == nil || a.VerifiablePasswordAuthentication == nil { @@ -92,12 +100,12 @@ func (a *Authorization) GetTokenLastEight() string { return *a.TokenLastEight } -// GetUpdateAt returns the UpdateAt field if it's non-nil, zero value otherwise. -func (a *Authorization) GetUpdateAt() Timestamp { - if a == nil || a.UpdateAt == nil { +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (a *Authorization) GetUpdatedAt() Timestamp { + if a == nil || a.UpdatedAt == nil { return Timestamp{} } - return *a.UpdateAt + return *a.UpdatedAt } // GetURL returns the URL field if it's non-nil, zero value otherwise. @@ -252,6 +260,38 @@ func (b *Branch) GetProtected() bool { return *b.Protected } +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (c *CodeOfConduct) GetBody() string { + if c == nil || c.Body == nil { + return "" + } + return *c.Body +} + +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (c *CodeOfConduct) GetKey() string { + if c == nil || c.Key == nil { + return "" + } + return *c.Key +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CodeOfConduct) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *CodeOfConduct) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (c *CodeResult) GetHTMLURL() string { if c == nil || c.HTMLURL == nil { @@ -556,6 +596,38 @@ func (c *CommitsComparison) GetBehindBy() int { return *c.BehindBy } +// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetDiffURL() string { + if c == nil || c.DiffURL == nil { + return "" + } + return *c.DiffURL +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetHTMLURL() string { + if c == nil || c.HTMLURL == nil { + return "" + } + return *c.HTMLURL +} + +// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetPatchURL() string { + if c == nil || c.PatchURL == nil { + return "" + } + return *c.PatchURL +} + +// GetPermalinkURL returns the PermalinkURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetPermalinkURL() string { + if c == nil || c.PermalinkURL == nil { + return "" + } + return *c.PermalinkURL +} + // GetStatus returns the Status field if it's non-nil, zero value otherwise. func (c *CommitsComparison) GetStatus() string { if c == nil || c.Status == nil { @@ -572,6 +644,14 @@ func (c *CommitsComparison) GetTotalCommits() int { return *c.TotalCommits } +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + // GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. func (c *CommitsSearchResult) GetIncompleteResults() bool { if c == nil || c.IncompleteResults == nil { @@ -612,6 +692,22 @@ func (c *CommitStats) GetTotal() int { return *c.Total } +// GetHealthPercentage returns the HealthPercentage field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetHealthPercentage() int { + if c == nil || c.HealthPercentage == nil { + return 0 + } + return *c.HealthPercentage +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetUpdatedAt() time.Time { + if c == nil || c.UpdatedAt == nil { + return time.Time{} + } + return *c.UpdatedAt +} + // GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. func (c *Contributor) GetAvatarURL() string { if c == nil || c.AvatarURL == nil { @@ -1917,7 +2013,7 @@ func (i *Installation) GetRepositoriesURL() string { } // GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *IntegrationInstallationEvent) GetAction() string { +func (i *InstallationEvent) GetAction() string { if i == nil || i.Action == nil { return "" } @@ -1925,13 +2021,21 @@ func (i *IntegrationInstallationEvent) GetAction() string { } // GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *IntegrationInstallationRepositoriesEvent) GetAction() string { +func (i *InstallationRepositoriesEvent) GetAction() string { if i == nil || i.Action == nil { return "" } return *i.Action } +// GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. +func (i *InstallationRepositoriesEvent) GetRepositorySelection() string { + if i == nil || i.RepositorySelection == nil { + return "" + } + return *i.RepositorySelection +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (i *Invitation) GetCreatedAt() time.Time { if i == nil || i.CreatedAt == nil { @@ -1996,6 +2100,14 @@ func (i *Issue) GetComments() int { return *i.Comments } +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetCommentsURL() string { + if i == nil || i.CommentsURL == nil { + return "" + } + return *i.CommentsURL +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (i *Issue) GetCreatedAt() time.Time { if i == nil || i.CreatedAt == nil { @@ -2004,6 +2116,14 @@ func (i *Issue) GetCreatedAt() time.Time { return *i.CreatedAt } +// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetEventsURL() string { + if i == nil || i.EventsURL == nil { + return "" + } + return *i.EventsURL +} + // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (i *Issue) GetHTMLURL() string { if i == nil || i.HTMLURL == nil { @@ -2020,6 +2140,14 @@ func (i *Issue) GetID() int { return *i.ID } +// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetLabelsURL() string { + if i == nil || i.LabelsURL == nil { + return "" + } + return *i.LabelsURL +} + // GetLocked returns the Locked field if it's non-nil, zero value otherwise. func (i *Issue) GetLocked() bool { if i == nil || i.Locked == nil { @@ -2036,6 +2164,14 @@ func (i *Issue) GetNumber() int { return *i.Number } +// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetRepositoryURL() string { + if i == nil || i.RepositoryURL == nil { + return "" + } + return *i.RepositoryURL +} + // GetState returns the State field if it's non-nil, zero value otherwise. func (i *Issue) GetState() string { if i == nil || i.State == nil { @@ -2548,6 +2684,38 @@ func (m *MembershipEvent) GetScope() string { return *m.Scope } +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (m *Metric) GetHTMLURL() string { + if m == nil || m.HTMLURL == nil { + return "" + } + return *m.HTMLURL +} + +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (m *Metric) GetKey() string { + if m == nil || m.Key == nil { + return "" + } + return *m.Key +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (m *Metric) GetName() string { + if m == nil || m.Name == nil { + return "" + } + return *m.Name +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (m *Metric) GetURL() string { + if m == nil || m.URL == nil { + return "" + } + return *m.URL +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (m *Migration) GetCreatedAt() string { if m == nil || m.CreatedAt == nil { @@ -3109,6 +3277,14 @@ func (o *OrganizationEvent) GetAction() string { } // GetAction returns the Action field if it's non-nil, zero value otherwise. +func (o *OrgBlockEvent) GetAction() string { + if o == nil || o.Action == nil { + return "" + } + return *o.Action +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. func (p *Page) GetAction() string { if p == nil || p.Action == nil { return "" @@ -3372,6 +3548,14 @@ func (p *Project) GetURL() string { return *p.URL } +// GetColumnID returns the ColumnID field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetColumnID() int { + if p == nil || p.ColumnID == nil { + return 0 + } + return *p.ColumnID +} + // GetColumnURL returns the ColumnURL field if it's non-nil, zero value otherwise. func (p *ProjectCard) GetColumnURL() string { if p == nil || p.ColumnURL == nil { @@ -3420,6 +3604,14 @@ func (p *ProjectCard) GetUpdatedAt() Timestamp { return *p.UpdatedAt } +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetURL() string { + if p == nil || p.URL == nil { + return "" + } + return *p.URL +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (p *ProjectCardEvent) GetAction() string { if p == nil || p.Action == nil { @@ -3612,6 +3804,14 @@ func (p *PullRequest) GetMergeable() bool { return *p.Mergeable } +// GetMergeCommitSHA returns the MergeCommitSHA field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMergeCommitSHA() string { + if p == nil || p.MergeCommitSHA == nil { + return "" + } + return *p.MergeCommitSHA +} + // GetMerged returns the Merged field if it's non-nil, zero value otherwise. func (p *PullRequest) GetMerged() bool { if p == nil || p.Merged == nil { @@ -3996,6 +4196,14 @@ func (p *PullRequestReviewRequest) GetBody() string { return *p.Body } +// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewRequest) GetCommitID() string { + if p == nil || p.CommitID == nil { + return "" + } + return *p.CommitID +} + // GetEvent returns the Event field if it's non-nil, zero value otherwise. func (p *PullRequestReviewRequest) GetEvent() string { if p == nil || p.Event == nil { @@ -4004,6 +4212,14 @@ func (p *PullRequestReviewRequest) GetEvent() string { return *p.Event } +// GetDismissStaleReviews returns the DismissStaleReviews field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementUpdate) GetDismissStaleReviews() bool { + if p == nil || p.DismissStaleReviews == nil { + return false + } + return *p.DismissStaleReviews +} + // GetBase returns the Base field if it's non-nil, zero value otherwise. func (p *pullRequestUpdate) GetBase() string { if p == nil || p.Base == nil { @@ -6292,6 +6508,14 @@ func (t *Team) GetURL() string { return *t.URL } +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (t *TeamEvent) GetAction() string { + if t == nil || t.Action == nil { + return "" + } + return *t.Action +} + // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (t *TeamLDAPMapping) GetDescription() string { if t == nil || t.Description == nil { @@ -6620,6 +6844,14 @@ func (t *TreeEntry) GetType() string { return *t.Type } +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (t *TreeEntry) GetURL() string { + if t == nil || t.URL == nil { + return "" + } + return *t.URL +} + // GetForce returns the Force field if it's non-nil, zero value otherwise. func (u *updateRefRequest) GetForce() bool { if u == nil || u.Force == nil { |