From 7fc9872e9fd059b4d97502d93ba62f90ff50598e Mon Sep 17 00:00:00 2001 From: Michael Cristina Date: Fri, 26 Jul 2019 11:09:37 -0500 Subject: [PATCH 1/2] remove blob_href from check annotations --- github/checks.go | 1 - github/checks_test.go | 3 --- github/github-accessors.go | 8 -------- 3 files changed, 12 deletions(-) diff --git a/github/checks.go b/github/checks.go index 342915085e4..94d562d249a 100644 --- a/github/checks.go +++ b/github/checks.go @@ -51,7 +51,6 @@ type CheckRunOutput struct { // CheckRunAnnotation represents an annotation object for a CheckRun output. type CheckRunAnnotation struct { Path *string `json:"path,omitempty"` - BlobHRef *string `json:"blob_href,omitempty"` StartLine *int `json:"start_line,omitempty"` EndLine *int `json:"end_line,omitempty"` AnnotationLevel *string `json:"annotation_level,omitempty"` diff --git a/github/checks_test.go b/github/checks_test.go index 0bdc09651d2..173c3f323fc 100644 --- a/github/checks_test.go +++ b/github/checks_test.go @@ -148,7 +148,6 @@ func TestChecksService_ListCheckRunAnnotations(t *testing.T) { }) fmt.Fprint(w, `[{ "path": "README.md", - "blob_href": "https://github.com/octocat/Hello-World/blob/837db83be4137ca555d9a5598d0a1ea2987ecfee/README.md", "start_line": 2, "end_line": 2, "annotation_level": "warning", @@ -165,7 +164,6 @@ func TestChecksService_ListCheckRunAnnotations(t *testing.T) { want := []*CheckRunAnnotation{{ Path: String("README.md"), - BlobHRef: String("https://github.com/octocat/Hello-World/blob/837db83be4137ca555d9a5598d0a1ea2987ecfee/README.md"), StartLine: Int(2), EndLine: Int(2), AnnotationLevel: String("warning"), @@ -502,7 +500,6 @@ func Test_CheckRunMarshal(t *testing.T) { Annotations: []*CheckRunAnnotation{ { AnnotationLevel: String("a"), - BlobHRef: String("b"), EndLine: Int(1), Message: String("m"), Path: String("p"), diff --git a/github/github-accessors.go b/github/github-accessors.go index 13e60abb843..71d93f0aa5b 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -636,14 +636,6 @@ func (c *CheckRunAnnotation) GetAnnotationLevel() string { return *c.AnnotationLevel } -// GetBlobHRef returns the BlobHRef field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetBlobHRef() string { - if c == nil || c.BlobHRef == nil { - return "" - } - return *c.BlobHRef -} - // GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. func (c *CheckRunAnnotation) GetEndLine() int { if c == nil || c.EndLine == nil { From b53221498568bde9383462c28a637cbd7519caca Mon Sep 17 00:00:00 2001 From: Michael Cristina Date: Sat, 27 Jul 2019 11:58:30 -0500 Subject: [PATCH 2/2] fix test case --- github/checks_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/github/checks_test.go b/github/checks_test.go index 173c3f323fc..a4b0b42cef4 100644 --- a/github/checks_test.go +++ b/github/checks_test.go @@ -591,7 +591,6 @@ func Test_CheckRunMarshal(t *testing.T) { "annotations": [ { "path": "p", - "blob_href": "b", "start_line": 1, "end_line": 1, "annotation_level": "a",