Skip to content

Commit c1204c2

Browse files
authored
Fix timestamp attribute mapping for deployment runs (#1199)
* fix naming * Update CHANGELOG.md * Update CHANGELOG.md
1 parent 8444912 commit c1204c2

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Unreleased
22

3+
## Bug Fixes
4+
5+
* Fixes timestamp attribute mapping for deployment runs to use correct API field names (`created-at`/`updated-at` instead of `started-at`/`completed-at`) by @shwetamurali [#1199](https://github.com/hashicorp/go-tfe/pull/1199)
6+
37
# v1.91.0
48

59
## Enhancements

stack_deployment_runs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ var _ StackDeploymentRuns = &stackDeploymentRuns{}
2929

3030
// StackDeploymentRun represents a stack deployment run.
3131
type StackDeploymentRun struct {
32-
ID string `jsonapi:"primary,stack-deployment-runs"`
33-
Status string `jsonapi:"attr,status"`
34-
StartedAt time.Time `jsonapi:"attr,started-at,iso8601"`
35-
CompletedAt time.Time `jsonapi:"attr,completed-at,iso8601"`
32+
ID string `jsonapi:"primary,stack-deployment-runs"`
33+
Status string `jsonapi:"attr,status"`
34+
CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
35+
UpdatedAt time.Time `jsonapi:"attr,updated-at,iso8601"`
3636

3737
// Relationships
3838
StackDeploymentGroup *StackDeploymentGroup `jsonapi:"relation,stack-deployment-group"`

stack_deployment_steps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type StackDeploymentStep struct {
2929
ID string `jsonapi:"primary,stack-deployment-steps"`
3030
Status string `jsonapi:"attr,status"`
3131
CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
32-
UpdatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
32+
UpdatedAt time.Time `jsonapi:"attr,updated-at,iso8601"`
3333

3434
// Links
3535
Links map[string]interface{} `jsonapi:"links,omitempty"`

0 commit comments

Comments
 (0)