-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feat: stop requiring gitlab_project_id for gitlab templates #941
Conversation
default: | ||
return fmt.Errorf("unhandled type %s", putPayload.Type) | ||
} | ||
|
||
vcsCounter := 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed this because this may cause some issues. Not clear how to resolve.
Schema validation is a nice to have. Instead BE will error on this.
@@ -711,45 +707,6 @@ func TestUnitEnvironmentDiscoveryConfigurationResource(t *testing.T) { | |||
runUnitTest(t, testCase, func(mock *client.MockApiClientInterface) {}) | |||
}) | |||
|
|||
t.Run("error: no vcs set", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed relevant tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but please change the text
@@ -143,10 +142,10 @@ func resourceEnvironmentDiscoveryConfiguration() *schema.Resource { | |||
Optional: true, | |||
}, | |||
"gitlab_project_id": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
@@ -152,14 +153,13 @@ func getTemplateSchema(prefix string) map[string]*schema.Schema { | |||
Type: schema.TypeString, | |||
Description: "the git token id to be used", | |||
Optional: true, | |||
ConflictsWith: allVCSAttributesBut("token_id", "gitlab_project_id", "is_azure_devops", "path"), | |||
ConflictsWith: allVCSAttributesBut("token_id", "is_azure_devops", "path"), | |||
}, | |||
"gitlab_project_id": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
env0/configuration_template.go
Outdated
RequiredWith: []string{"token_id"}, | ||
Type: schema.TypeInt, | ||
Description: "the project id of the relevant repository (deprecated)", | ||
Deprecated: "'repository' is used instead", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text should be changed
We should use "project id is now auto-fetched from the repository URL"
Issue & Steps to Reproduce / Feature Request
fixes #940
Solution