Skip to content

Commit

Permalink
I think this is how to update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Kuchin committed Sep 14, 2021
1 parent 9b77ced commit 950fbbf
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
51 changes: 51 additions & 0 deletions website/docs/d/repository_file.html.markdown
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions website/github.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<li>
<a href="/docs/providers/github/d/repository.html">github_repository</a>
</li>
<li>
<a href="/docs/providers/github/d/repository_file.html">github_repository_file</a>
</li>
<li>
<a href="/docs/providers/github/d/repository_milestone.html">github_repository_milestone</a>
</li>
Expand Down

0 comments on commit 950fbbf

Please sign in to comment.