Skip to content

Commit f3b49e6

Browse files
authored
feat: support webhooks in project resource (#134)
* chore: support title and reason * feat: support webhooks in project resource * fix: lint * chore: update * fix: lint
1 parent 42b65da commit f3b49e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+847
-324
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8.3
1+
3.8.4

api/client.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package api
33
import (
44
"context"
55

6-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
6+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
77
v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
88
)
99

@@ -113,6 +113,12 @@ type Client interface {
113113
GetProjectIAMPolicy(ctx context.Context, projectName string) (*v1pb.IamPolicy, error)
114114
// SetProjectIAMPolicy sets the project IAM policy.
115115
SetProjectIAMPolicy(ctx context.Context, projectName string, update *v1pb.SetIamPolicyRequest) (*v1pb.IamPolicy, error)
116+
// CreateProjectWebhook creates the webhook in the project.
117+
CreateProjectWebhook(ctx context.Context, projectName string, webhook *v1pb.Webhook) (*v1pb.Webhook, error)
118+
// UpdateProjectWebhook updates the webhook.
119+
UpdateProjectWebhook(ctx context.Context, patch *v1pb.Webhook, updateMasks []string) (*v1pb.Webhook, error)
120+
// DeleteProjectWebhook deletes the webhook.
121+
DeleteProjectWebhook(ctx context.Context, webhookName string) error
116122

117123
// Setting
118124
// ListSettings lists all settings.

client/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/pkg/errors"
99
"google.golang.org/protobuf/encoding/protojson"
1010

11-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
11+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
1212
)
1313

1414
// Login will login the user and get the response.

client/cel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"strings"
88

9-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
9+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
1010
"github.com/pkg/errors"
1111
v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
1212
"google.golang.org/protobuf/encoding/protojson"

client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/pkg/errors"
1111

12-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
12+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
1313

1414
"github.com/bytebase/terraform-provider-bytebase/api"
1515
)

client/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99
"time"
1010

11-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
11+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
1212
"github.com/hashicorp/terraform-plugin-log/tflog"
1313
"google.golang.org/protobuf/encoding/protojson"
1414

client/database_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"strings"
88

9-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
9+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
1010
"google.golang.org/protobuf/encoding/protojson"
1111
)
1212

client/group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"net/url"
88
"strings"
99

10-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
10+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
1111
"google.golang.org/protobuf/encoding/protojson"
1212
)
1313

client/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99
"time"
1010

11-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
11+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
1212
"github.com/hashicorp/terraform-plugin-log/tflog"
1313
"google.golang.org/protobuf/encoding/protojson"
1414

client/policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"net/http"
77

8-
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
8+
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
99
)
1010

1111
// ListPolicies lists policies in a specific resource.

0 commit comments

Comments
 (0)