Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions github/data_source_github_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,38 @@ import (

func dataSourceGithubRelease() *schema.Resource {
return &schema.Resource{
Read: dataSourceGithubReleaseRead,

Read: dataSourceGithubReleaseRead,
Description: "Use this data source to retrieve information about a GitHub release in a specific repository.",
Schema: map[string]*schema.Schema{
"repository": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Name of the repository to retrieve the release from.",
},
"owner": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Owner of the repository.",
},
"retrieve_by": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Describes how to fetch the release. Valid values are `id`, `tag`, `latest`.",
ValidateDiagFunc: toDiagFunc(validation.StringInSlice([]string{
"latest",
"id",
"tag",
}, false), "retrieve_by"),
},
"release_tag": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: "ID of the release to retrieve. Must be specified when `retrieve_by` = `tag`.",
},
"release_id": {
Type: schema.TypeInt,
Optional: true,
Type: schema.TypeInt,
Optional: true,
Description: "ID of the release to retrieve. Must be specified when `retrieve_by` = `id`.",
},
"target_commitish": {
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions website/docs/d/release.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data "github_release" "example" {
}
```

To retrieve a specific release from a repository based on it's ID:
To retrieve a specific release from a repository based on its ID:

```hcl
data "github_release" "example" {
Expand All @@ -31,7 +31,7 @@ data "github_release" "example" {
}
```

Finally, to retrieve a release based on it's tag:
Finally, to retrieve a release based on its tag:

```hcl
data "github_release" "example" {
Expand Down