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

provider/github: add repository_webhook resource #12924

Merged
merged 2 commits into from
Mar 23, 2017

Conversation

nicolai86
Copy link
Contributor

@nicolai86 nicolai86 commented Mar 21, 2017

github_repository_webhook can be used to manage webhooks for repositories.
It is currently limited to organization repositories only.

github_organization_webhook can be used to manage webhooks for an organization.

The changeset includes both documentation and tests.
The tests are green:

make testacc TEST=./builtin/providers/github
TESTARGS='-run=TestAccGithubRepositoryWebhook_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/21 16:20:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/github -v
-run=TestAccGithubRepositoryWebhook_basic -timeout 120m
=== RUN   TestAccGithubRepositoryWebhook_basic
--- PASS: TestAccGithubRepositoryWebhook_basic (5.10s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/github    5.113s
make testacc TEST=./builtin/providers/github
TESTARGS='-run=TestAccGithubOrganizationWebhook'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/21 17:23:33 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/github -v
-run=TestAccGithubOrganizationWebhook -timeout 120m
=== RUN   TestAccGithubOrganizationWebhook_basic
--- PASS: TestAccGithubOrganizationWebhook_basic (2.09s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/github    2.109s

I did not incorporate validation of either events or name as both are likely to change.
Also, webhooks are not importable at the moment.

when merged, closes #10838

@nicolai86 nicolai86 force-pushed the provider/github-webhook-resource branch 2 times, most recently from 9f2a990 to a3be049 Compare March 21, 2017 15:51
`repository_webhook` can be used to manage webhooks for repositories.
It is currently limited to organization repositories only.

The changeset includes both documentation and tests.
The tests are green:

```
make testacc TEST=./builtin/providers/github
TESTARGS='-run=TestAccGithubRepositoryWebhook_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/21 16:20:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/github -v
-run=TestAccGithubRepositoryWebhook_basic -timeout 120m
=== RUN   TestAccGithubRepositoryWebhook_basic
--- PASS: TestAccGithubRepositoryWebhook_basic (5.10s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/github    5.113s
```
@nicolai86 nicolai86 force-pushed the provider/github-webhook-resource branch from a3be049 to d4de143 Compare March 21, 2017 16:21
the `github_organization_webhook` resource is similar to the
`github_repository_webhook` resource, but it manages webhooks for an
organization.

the tests are green:

```
make testacc TEST=./builtin/providers/github
TESTARGS='-run=TestAccGithubOrganizationWebhook'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/21 17:23:33 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/github -v
-run=TestAccGithubOrganizationWebhook -timeout 120m
=== RUN   TestAccGithubOrganizationWebhook_basic
--- PASS: TestAccGithubOrganizationWebhook_basic (2.09s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/github    2.109s
```
@nicolai86 nicolai86 force-pushed the provider/github-webhook-resource branch from 336466a to a0bd5a9 Compare March 21, 2017 21:10
@nicolai86
Copy link
Contributor Author

\cc @josephholsten PTAL :)

Copy link
Contributor

@josephholsten josephholsten left a comment

Choose a reason for hiding this comment

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

🌮

@nicolai86
Copy link
Contributor Author

❤️ @josephholsten PTAL @stack72 =)

@stack72
Copy link
Contributor

stack72 commented Mar 23, 2017

@nicolai86 I'm happy if @josephholsten is :)

LGTM!

@stack72 stack72 merged commit 6991ceb into master Mar 23, 2017
@stack72 stack72 deleted the provider/github-webhook-resource branch March 23, 2017 09:21
mbfrahry pushed a commit that referenced this pull request Mar 28, 2017
* provider/github: add repository_webhook resource

`repository_webhook` can be used to manage webhooks for repositories.
It is currently limited to organization repositories only.

The changeset includes both documentation and tests.
The tests are green:

```
make testacc TEST=./builtin/providers/github
TESTARGS='-run=TestAccGithubRepositoryWebhook_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/21 16:20:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/github -v
-run=TestAccGithubRepositoryWebhook_basic -timeout 120m
=== RUN   TestAccGithubRepositoryWebhook_basic
--- PASS: TestAccGithubRepositoryWebhook_basic (5.10s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/github    5.113s
```

* provider/github: add github_organization_webhook

the `github_organization_webhook` resource is similar to the
`github_repository_webhook` resource, but it manages webhooks for an
organization.

the tests are green:

```
make testacc TEST=./builtin/providers/github
TESTARGS='-run=TestAccGithubOrganizationWebhook'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/21 17:23:33 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/github -v
-run=TestAccGithubOrganizationWebhook -timeout 120m
=== RUN   TestAccGithubOrganizationWebhook_basic
--- PASS: TestAccGithubOrganizationWebhook_basic (2.09s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/github    2.109s
```
jennyd added a commit to jennyd/terraform that referenced this pull request Apr 12, 2017
These resources and their documentation were added in
hashicorp#12924. Add sidebar links to the
docs pages to make them easier to find.
apparentlymart pushed a commit that referenced this pull request Apr 12, 2017
These resources and their documentation were added in
#12924. Add sidebar links to the
docs pages to make them easier to find.
@ghost
Copy link

ghost commented Apr 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Github webhooks
3 participants