terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

[FEAT]: github_repository_file should support automatic branch creation if the ref does not exist

Open wparr-circle opened this issue 1 year ago • 1 comments

Describe the need

The resource github_repository_file does not currently support automatic branch creation. For example, a potential use case is rather than directly writing changes to a long lived branch such as master/main writing to a short lived ephemeral branch to ultimately be reviewed and merged via a pull request. It's not possible to do this gracefully without supporting automatic branch creation given if we leveraged the github_branch resource, terraform would continue to recreate the branch after it's deleted in Github (either on deletion of stale branches, or immediate deletion of the branch following a merged pull request).

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

wparr-circle avatar Jan 15 '24 13:01 wparr-circle

Hey @wparr-circle thanks for letting us know about this need! ❤️ Let us know if you'd be interested coming up with a way to address it and then submitting a PR to be reviewed. For now I have labeled this as "Up For Grabs" so that the community knows that it's available as well.

nickfloyd avatar Jan 19 '24 16:01 nickfloyd