Skip to content

Commit 9686ff0

Browse files
mcristina422gmlewis
authored andcommitted
Add start and end column to Annotation (google#1241)
1 parent eaf0d7d commit 9686ff0

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

github/checks.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ type CheckRunAnnotation struct {
5454
BlobHRef *string `json:"blob_href,omitempty"`
5555
StartLine *int `json:"start_line,omitempty"`
5656
EndLine *int `json:"end_line,omitempty"`
57+
StartColumn *int `json:"start_column,omitempty"`
58+
EndColumn *int `json:"end_column,omitempty"`
5759
AnnotationLevel *string `json:"annotation_level,omitempty"`
5860
Message *string `json:"message,omitempty"`
5961
Title *string `json:"title,omitempty"`

github/checks_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ func TestChecksService_ListCheckRunAnnotations(t *testing.T) {
151151
"blob_href": "https://github.com/octocat/Hello-World/blob/837db83be4137ca555d9a5598d0a1ea2987ecfee/README.md",
152152
"start_line": 2,
153153
"end_line": 2,
154+
"start_column": 1,
155+
"end_column": 5,
154156
"annotation_level": "warning",
155157
"message": "Check your spelling for 'banaas'.",
156158
"title": "Spell check",
@@ -168,10 +170,12 @@ func TestChecksService_ListCheckRunAnnotations(t *testing.T) {
168170
BlobHRef: String("https://github.com/octocat/Hello-World/blob/837db83be4137ca555d9a5598d0a1ea2987ecfee/README.md"),
169171
StartLine: Int(2),
170172
EndLine: Int(2),
173+
StartColumn: Int(1),
174+
EndColumn: Int(5),
171175
AnnotationLevel: String("warning"),
172176
Message: String("Check your spelling for 'banaas'."),
173-
RawDetails: String("Do you mean 'bananas' or 'banana'?"),
174177
Title: String("Spell check"),
178+
RawDetails: String("Do you mean 'bananas' or 'banana'?"),
175179
}}
176180

177181
if !reflect.DeepEqual(checkRunAnnotations, want) {

github/github-accessors.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)