Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add github_release_asset data source #2514

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdb
Copy link
Contributor

@mdb mdb commented Dec 14, 2024

This addresses issue #2513 and adds support for a github_release_asset data source.

Example of passing acceptance tests:

GITHUB_ORGANIZATION=mterwill \
GITHUB_OWNER=mterwill \
TF_ACC=1 \
  go test -v ./... -run ^TestAccGithubReleaseAssetDataSource
?       github.com/integrations/terraform-provider-github/v6    [no test files]
=== RUN   TestAccGithubReleaseAssetDataSource
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_anonymous_account
    provider_utils.go:51: GITHUB_TOKEN environment variable should be empty
    provider_utils.go:74: Skipping TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_anonymous_account which requires anonymous mode
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_individual_account
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_organization_account
--- PASS: TestAccGithubReleaseAssetDataSource (11.65s)
    --- PASS: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID (11.65s)
        --- SKIP: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_anonymous_account (0.00s)
        --- PASS: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_individual_account (8.90s)
        --- PASS: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_organization_account (2.75s)
PASS
ok      github.com/integrations/terraform-provider-github/v6/github     12.434s

Resolves #2513


Before the change?

  • The provider did not support a github_release_asset data source

After the change?

  • The provider supports a github_release_asset data source

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

No.

Please see our docs on breaking changes to help!

  • Yes
  • No

This addresses issue integrations#2513 and adds support for a `github_release_asset`
data source.

Example of passing acceptance tests:

```
GITHUB_ORGANIZATION=mterwill \
GITHUB_OWNER=mterwill \
TF_ACC=1 \
  go test -v ./... -run ^TestAccGithubReleaseAssetDataSource
?       github.com/integrations/terraform-provider-github/v6    [no test files]
=== RUN   TestAccGithubReleaseAssetDataSource
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_anonymous_account
    provider_utils.go:51: GITHUB_TOKEN environment variable should be empty
    provider_utils.go:74: Skipping TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_anonymous_account which requires anonymous mode
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_individual_account
=== RUN   TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_organization_account
--- PASS: TestAccGithubReleaseAssetDataSource (11.65s)
    --- PASS: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID (11.65s)
        --- SKIP: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_anonymous_account (0.00s)
        --- PASS: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_individual_account (8.90s)
        --- PASS: TestAccGithubReleaseAssetDataSource/queries_specified_asset_ID/with_an_organization_account (2.75s)
PASS
ok      github.com/integrations/terraform-provider-github/v6/github     12.434s
```

Signed-off-by: Mike Ball <[email protected]>
@mdb mdb force-pushed the mdb/gh-release-asset branch from dac6b1b to 696957f Compare December 17, 2024 13:27
@mdb mdb marked this pull request as ready for review December 17, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Support github_release_asset data source
1 participant