mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-01-11 22:41:45 +01:00
Fix update repository webhooks (#41)
Co-authored-by: Raul Barreto <raul.barreto@redbull.com>
This commit is contained in:
committed by
GitHub
parent
4a6cb44484
commit
bee3f62908
@@ -82,11 +82,15 @@ func resourceRepositoryWebhookUpdate(d *schema.ResourceData, m interface{}) erro
|
||||
|
||||
project := d.Get("project").(string)
|
||||
repository := d.Get("repository").(string)
|
||||
id := d.Get("id").(int)
|
||||
id := d.Get("webhook_id").(int)
|
||||
webhook := newWebhookFromResource(d)
|
||||
|
||||
request, err := json.Marshal(webhook)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = client.Put(fmt.Sprintf("/rest/api/1.0/projects/%s/repos/%s/webhooks/%d",
|
||||
project,
|
||||
repository,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Resource: bitbucketserver_repository_webhook
|
||||
|
||||
Manage a repository level hook. Extends what Bitbucket does every time a repository changes, for example when code is pushed or a pull request is merged.
|
||||
Manage a repository level webhook. Extends what Bitbucket does every time a repository changes, for example when code is pushed or a pull request is merged.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user