-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: github app #360
Draft
ecrupper
wants to merge
5
commits into
main
Choose a base branch
from
hackathon/github_app
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: github app #360
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package library | ||
|
||
type Report struct { | ||
Title *string `json:"title,omitempty"` | ||
Summary *string `json:"summary,omitempty"` | ||
Text *string `json:"text,omitempty"` | ||
AnnotationsCount *int `json:"annotations_count,omitempty"` | ||
AnnotationsURL *string `json:"annotations_url,omitempty"` | ||
Annotations []*Annotation `json:"annotations,omitempty"` | ||
} | ||
|
||
type Annotation struct { | ||
Path *string `json:"path,omitempty"` | ||
StartLine *int `json:"start_line,omitempty"` | ||
EndLine *int `json:"end_line,omitempty"` | ||
StartColumn *int `json:"start_column,omitempty"` | ||
EndColumn *int `json:"end_column,omitempty"` | ||
AnnotationLevel *string `json:"annotation_level,omitempty"` | ||
Message *string `json:"message,omitempty"` | ||
Title *string `json:"title,omitempty"` | ||
RawDetails *string `json:"raw_details,omitempty"` | ||
} | ||
|
||
// GetTitle returns the Title field. | ||
// | ||
// When the provided Report type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (r *Report) GetTitle() string { | ||
// return zero value if Step type or ID field is nil | ||
if r == nil || r.Title == nil { | ||
return "" | ||
} | ||
|
||
return *r.Title | ||
} | ||
|
||
// GetSummary returns the Summary field. | ||
// | ||
// When the provided Report type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (r *Report) GetSummary() string { | ||
// return zero value if Step type or ID field is nil | ||
if r == nil || r.Summary == nil { | ||
return "" | ||
} | ||
|
||
return *r.Summary | ||
} | ||
|
||
// GetText returns the Text field. | ||
// | ||
// When the provided Report type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (r *Report) GetText() string { | ||
// return zero value if Step type or ID field is nil | ||
if r == nil || r.Text == nil { | ||
return "" | ||
} | ||
|
||
return *r.Text | ||
} | ||
|
||
// GetAnnotationsCount returns the AnnotationsCount field. | ||
// | ||
// When the provided Report type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (r *Report) GetAnnotationsCount() int { | ||
// return zero value if Step type or ID field is nil | ||
if r == nil || r.AnnotationsCount == nil { | ||
return 0 | ||
} | ||
|
||
return *r.AnnotationsCount | ||
} | ||
|
||
// GetAnnotationsURL returns the AnnotationsURL field. | ||
// | ||
// When the provided Report type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (r *Report) GetAnnotationsURL() string { | ||
// return zero value if Step type or ID field is nil | ||
if r == nil || r.AnnotationsURL == nil { | ||
return "" | ||
} | ||
|
||
return *r.AnnotationsURL | ||
} | ||
|
||
// GetAnnotations returns the Annotations field. | ||
// | ||
// When the provided Report type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (r *Report) GetAnnotations() []*Annotation { | ||
// return zero value if Step type or ID field is nil | ||
if r == nil || r.Annotations == nil { | ||
return []*Annotation{} | ||
} | ||
|
||
return r.Annotations | ||
} | ||
|
||
// GetPath returns the Path field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetPath() string { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.Path == nil { | ||
return "" | ||
} | ||
|
||
return *a.Path | ||
} | ||
|
||
// GetStartLine returns the StartLine field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetStartLine() int { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.StartLine == nil { | ||
return 0 | ||
} | ||
|
||
return *a.StartLine | ||
} | ||
|
||
// GetEndLine returns the EndLine field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetEndLine() int { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.EndLine == nil { | ||
return 0 | ||
} | ||
|
||
return *a.EndLine | ||
} | ||
|
||
// GetStartColumn returns the StartColumn field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetStartColumn() int { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.StartColumn == nil { | ||
return 0 | ||
} | ||
|
||
return *a.StartColumn | ||
} | ||
|
||
// GetEndColumn returns the EndColumn field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetEndColumn() int { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.EndColumn == nil { | ||
return 0 | ||
} | ||
|
||
return *a.EndColumn | ||
} | ||
|
||
// GetAnnotationLevel returns the AnnotationLevel field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetAnnotationLevel() string { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.AnnotationLevel == nil { | ||
return "" | ||
} | ||
|
||
return *a.AnnotationLevel | ||
} | ||
|
||
// GetMessage returns the Message field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetMessage() string { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.Message == nil { | ||
return "" | ||
} | ||
|
||
return *a.Message | ||
} | ||
|
||
// GetTitle returns the Title field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetTitle() string { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.Title == nil { | ||
return "" | ||
} | ||
|
||
return *a.Title | ||
} | ||
|
||
// GetRawDetails returns the RawDetails field. | ||
// | ||
// When the provided Annotation type is nil, or the field within | ||
// the type is nil, it returns the zero value for the field. | ||
func (a *Annotation) GetRawDetails() string { | ||
// return zero value if Step type or ID field is nil | ||
if a == nil || a.RawDetails == nil { | ||
return "" | ||
} | ||
|
||
return *a.RawDetails | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
GithubInstallID
? OrSCMMetadata
with a JSON field?