From 950fbbf898c9d8ca2744cd7ed03c19a1010be171 Mon Sep 17 00:00:00 2001 From: Chris Kuchin Date: Thu, 2 Sep 2021 13:30:19 -0600 Subject: [PATCH] I think this is how to update docs --- website/docs/d/repository_file.html.markdown | 51 ++++++++++++++++++++ website/github.erb | 3 ++ 2 files changed, 54 insertions(+) create mode 100644 website/docs/d/repository_file.html.markdown diff --git a/website/docs/d/repository_file.html.markdown b/website/docs/d/repository_file.html.markdown new file mode 100644 index 0000000000..069c11dcb4 --- /dev/null +++ b/website/docs/d/repository_file.html.markdown @@ -0,0 +1,51 @@ +--- +layout: "github" +page_title: "GitHub: github_repository_file" +description: |- + Reads files within a GitHub repository +--- + +# github_repository_file + +This data source allows you to read files within a +GitHub repository. + + +## Example Usage + +```hcl +data "github_repository_file" "foo" { + repository = github_repository.foo.name + branch = "main" + file = ".gitignore" +} + +``` + + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The repository to create the file in. + +* `file` - (Required) The path of the file to manage. + +* `branch` - (Optional) Git branch (defaults to `main`). + The branch must already exist, it will not be created if it does not already exist. + +## Attributes Reference + +The following additional attributes are exported: + +* `content` - The file content. + +* `commit_sha` - The SHA of the commit that modified the file. + +* `sha` - The SHA blob of the file. + +* `commit_author` - Committer author name. + +* `commit_email` - Committer email address. + +* `commit_message` - Commit message when file was last updated. diff --git a/website/github.erb b/website/github.erb index 36b9420ecd..a4ed9f7dd5 100644 --- a/website/github.erb +++ b/website/github.erb @@ -46,6 +46,9 @@
  • github_repository
  • +
  • + github_repository_file +
  • github_repository_milestone