Skip to content

Commit

Permalink
Update the spec to v0.1.2
Browse files Browse the repository at this point in the history
Update the spec to v0.1.2 and align the SDK to produce
v0.1.2 events.

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
  • Loading branch information
afrittoli committed Mar 20, 2023
1 parent 27c813b commit 0599634
Show file tree
Hide file tree
Showing 48 changed files with 181 additions and 181 deletions.
2 changes: 1 addition & 1 deletion pkg/api/artifactpackaged.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
ArtifactPackagedEventV1 CDEventType = CDEventType{
Subject: "artifact",
Predicate: "packaged",
Version: "0.1.1",
Version: "0.1.0",
}
)

Expand Down
14 changes: 7 additions & 7 deletions pkg/api/bindings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ var (

eventJsonCustomDataTemplate = `{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "%s",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.artifact.packaged.0.1.1",
"type": "dev.cdevents.artifact.packaged.0.1.0",
"timestamp": "%s"
},
"subject": {
Expand All @@ -134,10 +134,10 @@ var (

eventImplicitJsonCustomDataTemplate = `{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "%s",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.artifact.packaged.0.1.1",
"type": "dev.cdevents.artifact.packaged.0.1.0",
"timestamp": "%s"
},
"subject": {
Expand All @@ -161,10 +161,10 @@ var (

eventNonJsonCustomDataTemplate = `{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "%s",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.artifact.packaged.0.1.1",
"type": "dev.cdevents.artifact.packaged.0.1.0",
"timestamp": "%s"
},
"subject": {
Expand Down Expand Up @@ -1130,7 +1130,7 @@ func TestNewFromJsonBytes(t *testing.T) {
}{{
testFile: "future_event_major_version",
description: "A newer major version in the event is backward incompatible and cannot be parsed",
wantError: "sdk event version 0.1.1 not compatible with 999.0.0",
wantError: "sdk event version 0.1.0 not compatible with 999.0.0",
}, {
testFile: "future_event_minor_version",
description: "A newer minor version in the event is compatible and can be parsed, data is lost",
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/branchcreated.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
var branchcreatedschema string

var (
// BranchCreated event v0.1.0
// BranchCreated event v0.1.1
BranchCreatedEventV1 CDEventType = CDEventType{
Subject: "branch",
Predicate: "created",
Version: "0.1.0",
Version: "0.1.1",
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/branchdeleted.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
var branchdeletedschema string

var (
// BranchDeleted event v0.1.0
// BranchDeleted event v0.1.1
BranchDeletedEventV1 CDEventType = CDEventType{
Subject: "branch",
Predicate: "deleted",
Version: "0.1.0",
Version: "0.1.1",
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/changeabandoned.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
var changeabandonedschema string

var (
// ChangeAbandoned event v0.1.0
// ChangeAbandoned event v0.1.1
ChangeAbandonedEventV1 CDEventType = CDEventType{
Subject: "change",
Predicate: "abandoned",
Version: "0.1.0",
Version: "0.1.1",
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/changecreated.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
var changecreatedschema string

var (
// ChangeCreated event v0.1.0
// ChangeCreated event v0.1.1
ChangeCreatedEventV1 CDEventType = CDEventType{
Subject: "change",
Predicate: "created",
Version: "0.1.0",
Version: "0.1.1",
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/changemerged.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
var changemergedschema string

var (
// ChangeMerged event v0.1.0
// ChangeMerged event v0.1.1
ChangeMergedEventV1 CDEventType = CDEventType{
Subject: "change",
Predicate: "merged",
Version: "0.1.0",
Version: "0.1.1",
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/changereviewed.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
var changereviewedschema string

var (
// ChangeReviewed event v0.1.0
// ChangeReviewed event v0.1.1
ChangeReviewedEventV1 CDEventType = CDEventType{
Subject: "change",
Predicate: "reviewed",
Version: "0.1.0",
Version: "0.1.1",
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/changeupdated.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
var changeupdatedschema string

var (
// ChangeUpdated event v0.1.0
// ChangeUpdated event v0.1.1
ChangeUpdatedEventV1 CDEventType = CDEventType{
Subject: "change",
Predicate: "updated",
Version: "0.1.0",
Version: "0.1.1",
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/tests/artifact_packaged.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.artifact.packaged.0.1.1",
"type": "dev.cdevents.artifact.packaged.0.1.0",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/tests/artifact_published.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.artifact.published.0.1.0",
Expand Down
36 changes: 18 additions & 18 deletions pkg/api/tests/branch_created.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"context": {
"version": "0.1.1",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.branch.created.0.1.0",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "branch",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
"context": {
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.branch.created.0.1.1",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "branch",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
}
36 changes: 18 additions & 18 deletions pkg/api/tests/branch_deleted.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"context": {
"version": "0.1.1",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.branch.deleted.0.1.0",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "branch",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
"context": {
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.branch.deleted.0.1.1",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "branch",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
}
2 changes: 1 addition & 1 deletion pkg/api/tests/build_finished.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.build.finished.0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/tests/build_queued.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.build.queued.0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/tests/build_started.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"context": {
"version": "0.1.1",
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.build.started.0.1.0",
Expand Down
36 changes: 18 additions & 18 deletions pkg/api/tests/change_abandoned.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"context": {
"version": "0.1.1",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.change.abandoned.0.1.0",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "change",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
"context": {
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.change.abandoned.0.1.1",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "change",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
}
36 changes: 18 additions & 18 deletions pkg/api/tests/change_created.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"context": {
"version": "0.1.1",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.change.created.0.1.0",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "change",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
"context": {
"version": "0.1.2",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "TestAsCloudEvent",
"type": "dev.cdevents.change.created.0.1.1",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
"id": "mySubject123",
"source": "TestAsCloudEvent",
"type": "change",
"content": {
"repository": {
"id": "TestRepo/TestOrg",
"source": "https://example.org"
}
}
}
}
Loading

0 comments on commit 0599634

Please sign in to comment.