Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update changelog for Run Tasks API changes #390

Merged
merged 2 commits into from May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@

* Adds support for reading current state version outputs to StateVersionOutputs, which can be useful for reading outputs when users don't have the necessary permissions to read the entire state.
* Adds Variable Set methods for `ApplyToWorkspaces` and `RemoveFromWorkspaces` [#375](https://github.com/hashicorp/go-tfe/pull/375)
* Adds Run Tasks API support by @glennsarti [#381](https://github.com/hashicorp/go-tfe/pull/381), [#382](https://github.com/hashicorp/go-tfe/pull/382) and [#383](https://github.com/hashicorp/go-tfe/pull/383)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split this entry into 3 for each run task change you made:

* Add Run Task permissions field to `Organization` and `Workspace` by @glennsarti  [#383](https://github.com/hashicorp/go-tfe/pull/383)
* Add Run Task field to `Entitlement` struct  [#381](https://github.com/hashicorp/go-tfe/pull/381)
* Add `Enabled` field to `RunTask` struct [#382](https://github.com/hashicorp/go-tfe/pull/382)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't previously mentioned run tasks at all in the changelog.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be OK to just say "Run tasks!" and I'm in favor of keeping the original version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's listed in v0.26.0

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I was only looking in CHANGELOG. You're right. We did label it "beta" so this is still fine, I guess.


# v1.1.0

Expand Down
1 change: 1 addition & 0 deletions organization.go
Expand Up @@ -94,6 +94,7 @@ type Entitlements struct {
CostEstimation bool `jsonapi:"attr,cost-estimation"`
Operations bool `jsonapi:"attr,operations"`
PrivateModuleRegistry bool `jsonapi:"attr,private-module-registry"`
RunTasks bool `jsonapi:"attr,run-tasks"`
SSO bool `jsonapi:"attr,sso"`
Sentinel bool `jsonapi:"attr,sentinel"`
StateStorage bool `jsonapi:"attr,state-storage"`
Expand Down
20 changes: 20 additions & 0 deletions organization_integration_test.go
Expand Up @@ -481,3 +481,23 @@ func TestOrganizationsReadRunTasksPermission(t *testing.T) {
})
})
}

func TestOrganizationsReadRunTasksEntitlement(t *testing.T) {
skipIfEnterprise(t)
skipIfFreeOnly(t)
skipIfBeta(t)

client := testClient(t)
ctx := context.Background()

orgTest, orgTestCleanup := createOrganization(t, client)
defer orgTestCleanup()

t.Run("when the org exists", func(t *testing.T) {
entitlements, err := client.Organizations.ReadEntitlements(ctx, orgTest.Name)
require.NoError(t, err)

assert.NotEmpty(t, entitlements.ID)
assert.True(t, entitlements.RunTasks)
})
}