-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into enhance/yaml-parser-flag
- Loading branch information
Showing
21 changed files
with
112 additions
and
49 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,7 @@ func TestTypes_Build_Environment(t *testing.T) { | |
_pull.SetEvent("pull_request") | ||
_pull.SetEventAction("opened") | ||
_pull.SetRef("refs/pulls/1/head") | ||
_pull.SetFork(false) | ||
|
||
_tag := testBuild() | ||
_tag.SetEvent("tag") | ||
|
@@ -363,6 +364,7 @@ func TestTypes_Build_Environment(t *testing.T) { | |
"VELA_PULL_REQUEST": "1", | ||
"VELA_PULL_REQUEST_SOURCE": "changes", | ||
"VELA_PULL_REQUEST_TARGET": "", | ||
"VELA_PULL_REQUEST_FORK": "false", | ||
"BUILD_AUTHOR": "OctoKitty", | ||
"BUILD_AUTHOR_EMAIL": "[email protected]", | ||
"BUILD_BASE_REF": "", | ||
|
@@ -563,6 +565,14 @@ func TestTypes_Build_Getters(t *testing.T) { | |
t.Errorf("GetSender is %v, want %v", test.build.GetSender(), test.want.GetSender()) | ||
} | ||
|
||
if test.build.GetSenderSCMID() != test.want.GetSenderSCMID() { | ||
t.Errorf("GetSenderSCMID is %v, want %v", test.build.GetSenderSCMID(), test.want.GetSenderSCMID()) | ||
} | ||
|
||
if test.build.GetFork() != test.want.GetFork() { | ||
t.Errorf("GetFork is %v, want %v", test.build.GetFork(), test.want.GetFork()) | ||
} | ||
|
||
if test.build.GetAuthor() != test.want.GetAuthor() { | ||
t.Errorf("GetAuthor is %v, want %v", test.build.GetAuthor(), test.want.GetAuthor()) | ||
} | ||
|
@@ -657,6 +667,7 @@ func TestTypes_Build_Setters(t *testing.T) { | |
test.build.SetCommit(test.want.GetCommit()) | ||
test.build.SetSender(test.want.GetSender()) | ||
test.build.SetSenderSCMID(test.want.GetSenderSCMID()) | ||
test.build.SetFork(test.want.GetFork()) | ||
test.build.SetAuthor(test.want.GetAuthor()) | ||
test.build.SetEmail(test.want.GetEmail()) | ||
test.build.SetLink(test.want.GetLink()) | ||
|
@@ -762,6 +773,10 @@ func TestTypes_Build_Setters(t *testing.T) { | |
t.Errorf("SetSenderSCMID is %v, want %v", test.build.GetSenderSCMID(), test.want.GetSenderSCMID()) | ||
} | ||
|
||
if test.build.GetFork() != test.want.GetFork() { | ||
t.Errorf("SetFork is %v, want %v", test.build.GetFork(), test.want.GetFork()) | ||
} | ||
|
||
if test.build.GetAuthor() != test.want.GetAuthor() { | ||
t.Errorf("SetAuthor is %v, want %v", test.build.GetAuthor(), test.want.GetAuthor()) | ||
} | ||
|
@@ -835,6 +850,7 @@ func TestTypes_Build_String(t *testing.T) { | |
Event: %s, | ||
EventAction: %s, | ||
Finished: %d, | ||
Fork: %t, | ||
HeadRef: %s, | ||
Host: %s, | ||
ID: %d, | ||
|
@@ -871,6 +887,7 @@ func TestTypes_Build_String(t *testing.T) { | |
b.GetEvent(), | ||
b.GetEventAction(), | ||
b.GetFinished(), | ||
b.GetFork(), | ||
b.GetHeadRef(), | ||
b.GetHost(), | ||
b.GetID(), | ||
|
@@ -925,6 +942,7 @@ func testBuild() *Build { | |
b.SetCommit("48afb5bdc41ad69bf22588491333f7cf71135163") | ||
b.SetSender("OctoKitty") | ||
b.SetSenderSCMID("123") | ||
b.SetFork(false) | ||
b.SetAuthor("OctoKitty") | ||
b.SetEmail("[email protected]") | ||
b.SetLink("https://example.company.com/github/octocat/1") | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -2539,6 +2539,7 @@ func newResources() *Resources { | |
buildOne.SetCommit("48afb5bdc41ad69bf22588491333f7cf71135163") | ||
buildOne.SetSender("OctoKitty") | ||
buildOne.SetSenderSCMID("123") | ||
buildOne.SetFork(false) | ||
buildOne.SetAuthor("OctoKitty") | ||
buildOne.SetEmail("[email protected]") | ||
buildOne.SetLink("https://example.company.com/github/octocat/1") | ||
|
@@ -2576,6 +2577,7 @@ func newResources() *Resources { | |
buildTwo.SetCommit("48afb5bdc41ad69bf22588491333f7cf71135164") | ||
buildTwo.SetSender("OctoKitty") | ||
buildTwo.SetSenderSCMID("123") | ||
buildTwo.SetFork(false) | ||
buildTwo.SetAuthor("OctoKitty") | ||
buildTwo.SetEmail("[email protected]") | ||
buildTwo.SetLink("https://example.company.com/github/octocat/2") | ||
|
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 |
---|---|---|
|
@@ -66,6 +66,7 @@ func TestTypes_Build_Nullify(t *testing.T) { | |
Message: sql.NullString{String: "", Valid: false}, | ||
Commit: sql.NullString{String: "", Valid: false}, | ||
Sender: sql.NullString{String: "", Valid: false}, | ||
Fork: sql.NullBool{Bool: false, Valid: false}, | ||
Author: sql.NullString{String: "", Valid: false}, | ||
Email: sql.NullString{String: "", Valid: false}, | ||
Link: sql.NullString{String: "", Valid: false}, | ||
|
@@ -134,6 +135,7 @@ func TestTypes_Build_ToAPI(t *testing.T) { | |
want.SetCommit("48afb5bdc41ad69bf22588491333f7cf71135163") | ||
want.SetSender("OctoKitty") | ||
want.SetSenderSCMID("123") | ||
want.SetFork(false) | ||
want.SetAuthor("OctoKitty") | ||
want.SetEmail("[email protected]") | ||
want.SetLink("https://example.company.com/github/octocat/1") | ||
|
@@ -230,6 +232,7 @@ func TestTypes_Build_BuildFromAPI(t *testing.T) { | |
b.SetCommit("48afb5bdc41ad69bf22588491333f7cf71135163") | ||
b.SetSender("OctoKitty") | ||
b.SetSenderSCMID("123") | ||
b.SetFork(false) | ||
b.SetAuthor("OctoKitty") | ||
b.SetEmail("[email protected]") | ||
b.SetLink("https://example.company.com/github/octocat/1") | ||
|
@@ -294,6 +297,7 @@ func testBuild() *Build { | |
Commit: sql.NullString{String: "48afb5bdc41ad69bf22588491333f7cf71135163", Valid: true}, | ||
Sender: sql.NullString{String: "OctoKitty", Valid: true}, | ||
SenderSCMID: sql.NullString{String: "123", Valid: true}, | ||
Fork: sql.NullBool{Bool: false, Valid: true}, | ||
Author: sql.NullString{String: "OctoKitty", Valid: true}, | ||
Email: sql.NullString{String: "[email protected]", Valid: true}, | ||
Link: sql.NullString{String: "https://example.company.com/github/octocat/1", Valid: true}, | ||
|
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 |
---|---|---|
|
@@ -84,6 +84,7 @@ const ( | |
"commit": "48afb5bdc41ad69bf22588491333f7cf71135163", | ||
"sender": "OctoKitty", | ||
"sender_scm_id": "0", | ||
"fork": false, | ||
"author": "OctoKitty", | ||
"email": "[email protected]", | ||
"link": "https://vela.example.company.com/github/octocat/1", | ||
|
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
Oops, something went wrong.