[FEAT]: Support Fetching Files from Specific Commit SHA in github_repository_file Data Source #2227
Labels
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Feature
New feature or request
Describe the need
I am seeking to enhance the github_repository_file data source by introducing the ability to fetch files from a specific commit SHA, in addition to the current capability of fetching from the tip of a branch. This functionality is aimed at solving the problem of fetching versions of files that exists at a specific point in the repository's history.
The introduction of direct commit SHA specification for file retrieval would significantly improve configuration management within Terraform workflows, especially in CI/CD processes where specific versions of files are critical.
This feature not only enhances precision and reliability but also aligns with best practices in automation and version control. Considering the GitHub API already supports file retrieval at specific commits, incorporating this feature into the Terraform GitHub provider appears both practical and highly beneficial.
something like:
SDK Version
This feature suggestion does not apply to a specific SDK version.
API Version
this feature would leverage the existing capabilities of the GitHub REST API, which already supports fetching file contents at a specific commit SHA through the ref parameter.
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: