Skip to content

Commit

Permalink
Merge pull request #459 from jenkins-x/pullrequestnull
Browse files Browse the repository at this point in the history
fix: pull request should be null for issues
  • Loading branch information
jenkins-x-bot authored Oct 11, 2024
2 parents 12239b8 + 635708f commit 357a1be
Show file tree
Hide file tree
Showing 61 changed files with 412 additions and 423 deletions.
4 changes: 2 additions & 2 deletions scm/driver/azure/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestContentFind(t *testing.T) {
raw, _ := os.ReadFile("testdata/content.json.golden")
_ = json.Unmarshal(raw, want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -165,7 +165,7 @@ func TestContentList(t *testing.T) {
raw, _ := os.ReadFile("testdata/content_list.json.golden")
_ = json.Unmarshal(raw, &want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
10 changes: 5 additions & 5 deletions scm/driver/azure/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestGitFindCommit(t *testing.T) {

_ = json.Unmarshal(raw, &want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -74,7 +74,7 @@ func TestGitCreateRef(t *testing.T) {
raw, _ := os.ReadFile("testdata/branch_create.json.golden")
_ = json.Unmarshal(raw, &want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand All @@ -101,7 +101,7 @@ func TestGitListCommits(t *testing.T) {
raw, _ := os.ReadFile("testdata/commits.json.golden")
_ = json.Unmarshal(raw, &want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand All @@ -127,7 +127,7 @@ func TestGitListBranches(t *testing.T) {
raw, _ := os.ReadFile("testdata/branches.json.golden")
_ = json.Unmarshal(raw, &want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand All @@ -153,7 +153,7 @@ func TestGitCompareCommits(t *testing.T) {
raw, _ := os.ReadFile("testdata/compare.json.golden")
_ = json.Unmarshal(raw, &want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
6 changes: 3 additions & 3 deletions scm/driver/azure/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestPullCreate(t *testing.T) {
raw, _ := os.ReadFile("testdata/pr_active.json.golden")
_ = json.Unmarshal(raw, want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand All @@ -69,7 +69,7 @@ func TestPullFind(t *testing.T) {
raw, _ := os.ReadFile("testdata/pr_active.json.golden")
_ = json.Unmarshal(raw, want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -166,7 +166,7 @@ func TestPullListCommits(t *testing.T) {
raw, _ := os.ReadFile("testdata/commits.json.golden")
_ = json.Unmarshal(raw, &want)

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
8 changes: 4 additions & 4 deletions scm/driver/azure/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestRepositoryListOrgAndProject(t *testing.T) {
t.Error(jsonErr)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -68,7 +68,7 @@ func TestRepositoryListOrgOnly(t *testing.T) {
t.Error(jsonErr)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -97,7 +97,7 @@ func TestRepositoryFind(t *testing.T) {
t.Error(jsonErr)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -136,7 +136,7 @@ func TestRepositoryCreate(t *testing.T) {
t.Error(jsonErr)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
2 changes: 1 addition & 1 deletion scm/driver/bitbucket/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestContentFind(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
16 changes: 8 additions & 8 deletions scm/driver/bitbucket/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestGitFindCommit(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestGitFindBranch(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -94,7 +94,7 @@ func TestGitFindTag(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -124,7 +124,7 @@ func TestGitListCommits(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestGitListBranches(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -188,7 +188,7 @@ func TestGitListTags(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -220,7 +220,7 @@ func TestGitListChanges(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -250,7 +250,7 @@ func TestGitCompareCommits(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
4 changes: 2 additions & 2 deletions scm/driver/bitbucket/org_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestOrganizationFind(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand All @@ -62,7 +62,7 @@ func TestOrganizationList(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
6 changes: 3 additions & 3 deletions scm/driver/bitbucket/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestPullList(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)

Expand Down Expand Up @@ -79,7 +79,7 @@ func TestPullListChanges(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestPullCreate(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
data, err := json.Marshal(got)
Expand Down
20 changes: 10 additions & 10 deletions scm/driver/bitbucket/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestRepositoryFind(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -88,7 +88,7 @@ func TestListCollaborators(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -117,7 +117,7 @@ func TestRepositoryPerms(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -170,7 +170,7 @@ func TestRepositoryList(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -204,7 +204,7 @@ func TestRepositoryListOrganisation(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -235,7 +235,7 @@ func TestStatusList(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -275,7 +275,7 @@ func TestStatusCreate(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -304,7 +304,7 @@ func TestRepositoryHookFind(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -335,7 +335,7 @@ func TestRepositoryHookList(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -378,7 +378,7 @@ func TestRepositoryHookCreate(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
4 changes: 2 additions & 2 deletions scm/driver/bitbucket/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestUserFind(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestUserLoginFind(t *testing.T) {
t.Error(err)
}

if diff := cmp.Diff(got, want); diff != "" {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
Expand Down
Loading

0 comments on commit 357a1be

Please sign in to comment.