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
Add support for tag-based environment deployment branch policy #2050
base: main
Are you sure you want to change the base?
Conversation
The Type field is only necessary when creating a deployment branch policy. When updating a deployment branch policy, the Type field is not needed and is therefore set to nil. Resources: - https://docs.github.com/en/rest/deployments/branch-policies?apiVersion=2022-11-28
…ry_environment_deployment_policy resource
…nt_policy" This reverts commit 88b1369.
…_policy resource" This reverts commit a534219.
…repository_environment_deployment_policy resource" This reverts commit 029960b.
This reverts commit af308a1.
All other files in the module use v55 instead of v52. Furthermore, attempting to build (i.e. `make build`) with v52 results in the following error: ```console ==> Checking that code complies with gofmt requirements... go build ./... github/resource_github_issue_labels.go:79:69: cannot use options (variable of type *"github.com/google/go-github/v52/github".ListOptions) as *"github.com/google/go-github/v55/github".ListOptions value in argument to client.Issues.ListLabels github/resource_github_issue_labels.go:147:71: cannot use &github.Label{…} (value of type *"github.com/google/go-github/v52/github".Label) as *"github.com/google/go-github/v55/github".Label value in argument to client.Issues.CreateLabel github/resource_github_issue_labels.go:183:76: cannot use &github.Label{…} (value of type *"github.com/google/go-github/v52/github".Label) as *"github.com/google/go-github/v55/github".Label value in argument to client.Issues.EditLabel make: *** [GNUmakefile:13: build] Error 1 ```
I switched from a |
@kfcampbell, is there anything I can do to help move this along? |
website/docs/r/repository_environment_deployment_policy.html.markdown
Outdated
Show resolved
Hide resolved
Does repository need to be updated as well? github_repository_environment Does it also need custom_tag_policies boolean? |
I don't think so. The GitHub docs only lists two fields within the |
@mcevoypeter Sorry about the delay; it's been slow with holidays. Thank you for the contribution! When running the newly-added tests, I get the following error that fails them:
Can you reproduce this? Do they succeed for you? |
Hi there! We're currently a bit blocked by this missing. Anything we could help with moving this forward? |
@boredland you're certainly welcome to take this code as it is, resolve the issues/conflicts, and submit as another PR! I'd be happy to review it should you decide to do so. |
@boredland, go for it. I've been swamped since the beginning of January and can't get to this for the forseeable future. Let me know if there's anything I can do to help with hand-off. |
Didn't find any time yet :( |
@kfcampbell I took a stab at reworking this in #2165. |
Resolves #1974
Before the change?
github_repository_environment_deployment_policy
only supported branch-based policies even though the GitHub API has support for both branch-based and tag-based policies.After the change?
tag_pattern
attribute has been added to thegithub_repository_environment_deployment_policy
resource.Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!