Skip to content

Commit

Permalink
Fix asserts_url typo (integrations#1194)
Browse files Browse the repository at this point in the history
* Fix assets_url typo

* Add deprecation message

* Follow instructions more closely

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
  • Loading branch information
2 people authored and kazaker committed Dec 28, 2022
1 parent 9801fe5 commit f0b2cd0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/release/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "github_release_assets_url" {
description = "Asset URL of a GitHub release"
value = data.github_release.by_tag.asserts_url
value = data.github_release.by_tag.assets_url
}
10 changes: 8 additions & 2 deletions github/data_source_github_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ func dataSourceGithubRelease() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"asserts_url": {
"assets_url": {
Type: schema.TypeString,
Computed: true,
},
"asserts_url": {
Type: schema.TypeString,
Computed: true,
Deprecated: "use assets_url instead",
},
"upload_url": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -192,7 +197,8 @@ func dataSourceGithubReleaseRead(d *schema.ResourceData, meta interface{}) error
d.Set("published_at", release.GetPublishedAt())
d.Set("url", release.GetURL())
d.Set("html_url", release.GetHTMLURL())
d.Set("asserts_url", release.GetAssetsURL())
d.Set("assets_url", release.GetAssetsURL())
d.Set("asserts_url", release.GetAssetsURL()) // Deprecated, original version of assets_url
d.Set("upload_url", release.GetUploadURL())
d.Set("zipball_url", release.GetZipballURL())
d.Set("tarball_url", release.GetTarballURL())
Expand Down
3 changes: 2 additions & 1 deletion website/docs/d/release.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ data "github_release" "example" {
* `published_at` - Date of release publishing
* `url` - Base URL of the release
* `html_url` - URL directing to detailed information on the release
* `asserts_url` - URL of any associated assets with the release
* `assets_url` - URL of any associated assets with the release
* `asserts_url` - **Deprecated**: Use `assets_url` resource instead
* `upload_url` - URL that can be used to upload Assets to the release
* `zipball_url` - Download URL of a specific release in `zip` format
* `tarball_url` - Download URL of a specific release in `tar.gz` format
Expand Down

0 comments on commit f0b2cd0

Please sign in to comment.