Skip to content

feat: Implement github_repository_dependabot_security_updates resource#1851

Merged
kfcampbell merged 3 commits intointegrations:mainfrom
grahamhar:dependabot-pr
Aug 24, 2023
Merged

feat: Implement github_repository_dependabot_security_updates resource#1851
kfcampbell merged 3 commits intointegrations:mainfrom
grahamhar:dependabot-pr

Conversation

@grahamhar
Copy link
Copy Markdown
Contributor

Resolves #1301


Before the change?

There is no resource to manage the Dependabot Security Updates.

After the change?

Adds a new resource github_repository_dependabot_security_updates to allow enabling and disabling the Dependabot Security Updates.

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?

Please see our docs on breaking changes to help!

  • Yes
  • No

TF_ACC=1 go test -v ./... -run ^TestAccGithubAutomatedSecurityFixes
?       github.com/integrations/terraform-provider-github/v5    [no test files]
=== RUN   TestAccGithubAutomatedSecurityFixes
=== RUN   TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error
=== RUN   TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error/with_an_anonymous_account
    resource_github_repository_automated_security_fixes_test.go:71: anonymous account not supported for this operation
=== RUN   TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error/with_an_individual_account
=== RUN   TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error/with_an_organization_account
=== RUN   TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error
=== RUN   TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error/with_an_anonymous_account
    resource_github_repository_automated_security_fixes_test.go:139: anonymous account not supported for this operation
=== RUN   TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error/with_an_individual_account
=== RUN   TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error/with_an_organization_account
=== RUN   TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error
=== RUN   TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error/with_an_anonymous_account
    resource_github_repository_automated_security_fixes_test.go:189: anonymous account not supported for this operation
=== RUN   TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error/with_an_individual_account
=== RUN   TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error/with_an_organization_account
--- PASS: TestAccGithubAutomatedSecurityFixes (89.73s)
    --- PASS: TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error (32.99s)
        --- SKIP: TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error/with_an_anonymous_account (0.00s)
        --- PASS: TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error/with_an_individual_account (17.24s)
        --- PASS: TestAccGithubAutomatedSecurityFixes/enables_automated_security_fixes_without_error/with_an_organization_account (15.75s)
    --- PASS: TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error (32.98s)
        --- SKIP: TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error/with_an_anonymous_account (0.00s)
        --- PASS: TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error/with_an_individual_account (16.19s)
        --- PASS: TestAccGithubAutomatedSecurityFixes/disables_automated_security_fixes_without_error/with_an_organization_account (16.79s)
    --- PASS: TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error (23.75s)
        --- SKIP: TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error/with_an_anonymous_account (0.00s)
        --- PASS: TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error/with_an_individual_account (12.08s)
        --- PASS: TestAccGithubAutomatedSecurityFixes/imports_automated_security_fixes_without_error/with_an_organization_account (11.67s)
PASS
ok      github.com/integrations/terraform-provider-github/v5/github     90.088s

Copy link
Copy Markdown
Contributor

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, and the included integration tests are passing for me locally. Thank you for contributing!

@kfcampbell kfcampbell merged commit d106f39 into integrations:main Aug 24, 2023
@grahamhar grahamhar deleted the dependabot-pr branch August 24, 2023 20:54
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
integrations#1851)

* feat: Implement github_repository_dependabot_security_updates resource

* Check return value of API call

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
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.

FEATURE REQUEST: Dependabot security updates flag for repositories

2 participants