Skip to content

Commit 0599634

Browse files
committed
Update the spec to v0.1.2
Update the spec to v0.1.2 and align the SDK to produce v0.1.2 events. Signed-off-by: Andrea Frittoli <[email protected]>
1 parent 27c813b commit 0599634

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+181
-181
lines changed

Diff for: pkg/api/artifactpackaged.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var (
3232
ArtifactPackagedEventV1 CDEventType = CDEventType{
3333
Subject: "artifact",
3434
Predicate: "packaged",
35-
Version: "0.1.1",
35+
Version: "0.1.0",
3636
}
3737
)
3838

Diff for: pkg/api/bindings_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ var (
107107

108108
eventJsonCustomDataTemplate = `{
109109
"context": {
110-
"version": "0.1.1",
110+
"version": "0.1.2",
111111
"id": "%s",
112112
"source": "TestAsCloudEvent",
113-
"type": "dev.cdevents.artifact.packaged.0.1.1",
113+
"type": "dev.cdevents.artifact.packaged.0.1.0",
114114
"timestamp": "%s"
115115
},
116116
"subject": {
@@ -134,10 +134,10 @@ var (
134134

135135
eventImplicitJsonCustomDataTemplate = `{
136136
"context": {
137-
"version": "0.1.1",
137+
"version": "0.1.2",
138138
"id": "%s",
139139
"source": "TestAsCloudEvent",
140-
"type": "dev.cdevents.artifact.packaged.0.1.1",
140+
"type": "dev.cdevents.artifact.packaged.0.1.0",
141141
"timestamp": "%s"
142142
},
143143
"subject": {
@@ -161,10 +161,10 @@ var (
161161

162162
eventNonJsonCustomDataTemplate = `{
163163
"context": {
164-
"version": "0.1.1",
164+
"version": "0.1.2",
165165
"id": "%s",
166166
"source": "TestAsCloudEvent",
167-
"type": "dev.cdevents.artifact.packaged.0.1.1",
167+
"type": "dev.cdevents.artifact.packaged.0.1.0",
168168
"timestamp": "%s"
169169
},
170170
"subject": {
@@ -1130,7 +1130,7 @@ func TestNewFromJsonBytes(t *testing.T) {
11301130
}{{
11311131
testFile: "future_event_major_version",
11321132
description: "A newer major version in the event is backward incompatible and cannot be parsed",
1133-
wantError: "sdk event version 0.1.1 not compatible with 999.0.0",
1133+
wantError: "sdk event version 0.1.0 not compatible with 999.0.0",
11341134
}, {
11351135
testFile: "future_event_minor_version",
11361136
description: "A newer minor version in the event is compatible and can be parsed, data is lost",

Diff for: pkg/api/branchcreated.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
var branchcreatedschema string
2929

3030
var (
31-
// BranchCreated event v0.1.0
31+
// BranchCreated event v0.1.1
3232
BranchCreatedEventV1 CDEventType = CDEventType{
3333
Subject: "branch",
3434
Predicate: "created",
35-
Version: "0.1.0",
35+
Version: "0.1.1",
3636
}
3737
)
3838

Diff for: pkg/api/branchdeleted.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
var branchdeletedschema string
2929

3030
var (
31-
// BranchDeleted event v0.1.0
31+
// BranchDeleted event v0.1.1
3232
BranchDeletedEventV1 CDEventType = CDEventType{
3333
Subject: "branch",
3434
Predicate: "deleted",
35-
Version: "0.1.0",
35+
Version: "0.1.1",
3636
}
3737
)
3838

Diff for: pkg/api/changeabandoned.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
var changeabandonedschema string
2929

3030
var (
31-
// ChangeAbandoned event v0.1.0
31+
// ChangeAbandoned event v0.1.1
3232
ChangeAbandonedEventV1 CDEventType = CDEventType{
3333
Subject: "change",
3434
Predicate: "abandoned",
35-
Version: "0.1.0",
35+
Version: "0.1.1",
3636
}
3737
)
3838

Diff for: pkg/api/changecreated.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
var changecreatedschema string
2929

3030
var (
31-
// ChangeCreated event v0.1.0
31+
// ChangeCreated event v0.1.1
3232
ChangeCreatedEventV1 CDEventType = CDEventType{
3333
Subject: "change",
3434
Predicate: "created",
35-
Version: "0.1.0",
35+
Version: "0.1.1",
3636
}
3737
)
3838

Diff for: pkg/api/changemerged.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
var changemergedschema string
2929

3030
var (
31-
// ChangeMerged event v0.1.0
31+
// ChangeMerged event v0.1.1
3232
ChangeMergedEventV1 CDEventType = CDEventType{
3333
Subject: "change",
3434
Predicate: "merged",
35-
Version: "0.1.0",
35+
Version: "0.1.1",
3636
}
3737
)
3838

Diff for: pkg/api/changereviewed.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
var changereviewedschema string
2929

3030
var (
31-
// ChangeReviewed event v0.1.0
31+
// ChangeReviewed event v0.1.1
3232
ChangeReviewedEventV1 CDEventType = CDEventType{
3333
Subject: "change",
3434
Predicate: "reviewed",
35-
Version: "0.1.0",
35+
Version: "0.1.1",
3636
}
3737
)
3838

Diff for: pkg/api/changeupdated.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
var changeupdatedschema string
2929

3030
var (
31-
// ChangeUpdated event v0.1.0
31+
// ChangeUpdated event v0.1.1
3232
ChangeUpdatedEventV1 CDEventType = CDEventType{
3333
Subject: "change",
3434
Predicate: "updated",
35-
Version: "0.1.0",
35+
Version: "0.1.1",
3636
}
3737
)
3838

Diff for: pkg/api/tests/artifact_packaged.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"context": {
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
55
"source": "TestAsCloudEvent",
6-
"type": "dev.cdevents.artifact.packaged.0.1.1",
6+
"type": "dev.cdevents.artifact.packaged.0.1.0",
77
"timestamp": "2023-03-20T14:27:05.315384Z"
88
},
99
"subject": {

Diff for: pkg/api/tests/artifact_published.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"context": {
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
55
"source": "TestAsCloudEvent",
66
"type": "dev.cdevents.artifact.published.0.1.0",

Diff for: pkg/api/tests/branch_created.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"context": {
3-
"version": "0.1.1",
4-
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5-
"source": "TestAsCloudEvent",
6-
"type": "dev.cdevents.branch.created.0.1.0",
7-
"timestamp": "2023-03-20T14:27:05.315384Z"
8-
},
9-
"subject": {
10-
"id": "mySubject123",
11-
"source": "TestAsCloudEvent",
12-
"type": "branch",
13-
"content": {
14-
"repository": {
15-
"id": "TestRepo/TestOrg",
16-
"source": "https://example.org"
17-
}
18-
}
19-
}
2+
"context": {
3+
"version": "0.1.2",
4+
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5+
"source": "TestAsCloudEvent",
6+
"type": "dev.cdevents.branch.created.0.1.1",
7+
"timestamp": "2023-03-20T14:27:05.315384Z"
8+
},
9+
"subject": {
10+
"id": "mySubject123",
11+
"source": "TestAsCloudEvent",
12+
"type": "branch",
13+
"content": {
14+
"repository": {
15+
"id": "TestRepo/TestOrg",
16+
"source": "https://example.org"
17+
}
18+
}
19+
}
2020
}

Diff for: pkg/api/tests/branch_deleted.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"context": {
3-
"version": "0.1.1",
4-
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5-
"source": "TestAsCloudEvent",
6-
"type": "dev.cdevents.branch.deleted.0.1.0",
7-
"timestamp": "2023-03-20T14:27:05.315384Z"
8-
},
9-
"subject": {
10-
"id": "mySubject123",
11-
"source": "TestAsCloudEvent",
12-
"type": "branch",
13-
"content": {
14-
"repository": {
15-
"id": "TestRepo/TestOrg",
16-
"source": "https://example.org"
17-
}
18-
}
19-
}
2+
"context": {
3+
"version": "0.1.2",
4+
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5+
"source": "TestAsCloudEvent",
6+
"type": "dev.cdevents.branch.deleted.0.1.1",
7+
"timestamp": "2023-03-20T14:27:05.315384Z"
8+
},
9+
"subject": {
10+
"id": "mySubject123",
11+
"source": "TestAsCloudEvent",
12+
"type": "branch",
13+
"content": {
14+
"repository": {
15+
"id": "TestRepo/TestOrg",
16+
"source": "https://example.org"
17+
}
18+
}
19+
}
2020
}

Diff for: pkg/api/tests/build_finished.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"context": {
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
55
"source": "TestAsCloudEvent",
66
"type": "dev.cdevents.build.finished.0.1.0",

Diff for: pkg/api/tests/build_queued.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"context": {
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
55
"source": "TestAsCloudEvent",
66
"type": "dev.cdevents.build.queued.0.1.0",

Diff for: pkg/api/tests/build_started.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"context": {
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
55
"source": "TestAsCloudEvent",
66
"type": "dev.cdevents.build.started.0.1.0",

Diff for: pkg/api/tests/change_abandoned.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"context": {
3-
"version": "0.1.1",
4-
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5-
"source": "TestAsCloudEvent",
6-
"type": "dev.cdevents.change.abandoned.0.1.0",
7-
"timestamp": "2023-03-20T14:27:05.315384Z"
8-
},
9-
"subject": {
10-
"id": "mySubject123",
11-
"source": "TestAsCloudEvent",
12-
"type": "change",
13-
"content": {
14-
"repository": {
15-
"id": "TestRepo/TestOrg",
16-
"source": "https://example.org"
17-
}
18-
}
19-
}
2+
"context": {
3+
"version": "0.1.2",
4+
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5+
"source": "TestAsCloudEvent",
6+
"type": "dev.cdevents.change.abandoned.0.1.1",
7+
"timestamp": "2023-03-20T14:27:05.315384Z"
8+
},
9+
"subject": {
10+
"id": "mySubject123",
11+
"source": "TestAsCloudEvent",
12+
"type": "change",
13+
"content": {
14+
"repository": {
15+
"id": "TestRepo/TestOrg",
16+
"source": "https://example.org"
17+
}
18+
}
19+
}
2020
}

Diff for: pkg/api/tests/change_created.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"context": {
3-
"version": "0.1.1",
4-
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5-
"source": "TestAsCloudEvent",
6-
"type": "dev.cdevents.change.created.0.1.0",
7-
"timestamp": "2023-03-20T14:27:05.315384Z"
8-
},
9-
"subject": {
10-
"id": "mySubject123",
11-
"source": "TestAsCloudEvent",
12-
"type": "change",
13-
"content": {
14-
"repository": {
15-
"id": "TestRepo/TestOrg",
16-
"source": "https://example.org"
17-
}
18-
}
19-
}
2+
"context": {
3+
"version": "0.1.2",
4+
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
5+
"source": "TestAsCloudEvent",
6+
"type": "dev.cdevents.change.created.0.1.1",
7+
"timestamp": "2023-03-20T14:27:05.315384Z"
8+
},
9+
"subject": {
10+
"id": "mySubject123",
11+
"source": "TestAsCloudEvent",
12+
"type": "change",
13+
"content": {
14+
"repository": {
15+
"id": "TestRepo/TestOrg",
16+
"source": "https://example.org"
17+
}
18+
}
19+
}
2020
}

0 commit comments

Comments
 (0)