-
Notifications
You must be signed in to change notification settings - Fork 318
Add new options to project resource #72
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,11 +3,12 @@ package gitlab | |
| import ( | ||
| "fmt" | ||
|
|
||
| "github.com/hashicorp/terraform/helper/schema" | ||
| "github.com/xanzy/go-gitlab" | ||
| "regexp" | ||
| "strings" | ||
| "time" | ||
|
|
||
| "github.com/hashicorp/terraform/helper/schema" | ||
| "github.com/xanzy/go-gitlab" | ||
| ) | ||
|
|
||
| var accessLevelNameToValue = map[string]gitlab.AccessLevelValue{ | ||
|
|
@@ -71,6 +72,20 @@ func stringToVisibilityLevel(s string) *gitlab.VisibilityValue { | |
| return &value | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing whiteline
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think my VSCode tries to do something different than
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well you should run go fmt + add a blank line here :)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should be good now :) |
||
|
|
||
| func stringToMergeMethod(s string) *gitlab.MergeMethodValue { | ||
| lookup := map[string]gitlab.MergeMethodValue{ | ||
| "merge": gitlab.NoFastForwardMerge, | ||
| "ff": gitlab.FastForwardMerge, | ||
| "rebase_merge": gitlab.RebaseMerge, | ||
| } | ||
|
|
||
| value, ok := lookup[s] | ||
| if !ok { | ||
| return nil | ||
| } | ||
| return &value | ||
| } | ||
|
|
||
| func StringIsGitlabVariableName() schema.SchemaValidateFunc { | ||
| return func(v interface{}, k string) (s []string, es []error) { | ||
| value, ok := v.(string) | ||
|
|
||
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.
did you run go fmt?