diff --git a/go.mod b/go.mod index 36c6c14..4c546f6 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/bmatcuk/doublestar/v3 v3.0.0 - github.com/pulumi/pulumi-github/sdk/v5 v5.26.0 + github.com/pulumi/pulumi-github/sdk/v6 v6.2.0 github.com/pulumi/pulumi/sdk/v3 v3.112.0 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index bd77007..4f3a027 100644 --- a/go.sum +++ b/go.sum @@ -155,8 +155,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi-github/sdk/v5 v5.26.0 h1:EfBWHimefvHfgyucGfiN1T0x2MR1jf1513IPzLMi+xM= -github.com/pulumi/pulumi-github/sdk/v5 v5.26.0/go.mod h1:6711hFgixjeEkcP2mV5HuXAJ5Pw55kEymLZ/PdeldbI= +github.com/pulumi/pulumi-github/sdk/v6 v6.2.0 h1:jfQf9GnPu2vzW3VWMWuCKSsTxrBoXp3coDpFo2PaRe4= +github.com/pulumi/pulumi-github/sdk/v6 v6.2.0/go.mod h1:sTr8XntpeXnOgJXIppqWTAVvEmHHJWK4sqTQRPKtfRk= github.com/pulumi/pulumi/sdk/v3 v3.112.0 h1:cq2x5N6iuYhSLdeOdRs+LIq0EneB0Cb54WOlD/VaX3E= github.com/pulumi/pulumi/sdk/v3 v3.112.0/go.mod h1:JWSzKBoHd8rlncC1DhXLf7YdV+Bk/Qf+hSZOOQh0WwQ= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -181,9 +181,8 @@ github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= diff --git a/main.go b/main.go index 3379bf9..6af5277 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,7 @@ import ( "path" "strings" - github "github.com/pulumi/pulumi-github/sdk/v5/go/github" + github "github.com/pulumi/pulumi-github/sdk/v6/go/github" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" @@ -235,7 +235,11 @@ func main() { RequireLastPushApproval: pulumi.Bool(protection.RequireLastPushApproval), }, }, - PushRestrictions: pulumi.ToStringArray(pushRestrictionsID), + RestrictPushes: github.BranchProtectionRestrictPushArray{ + &github.BranchProtectionRestrictPushArgs{ + PushAllowances: pulumi.ToStringArray(pushRestrictionsID), + }, + }, }) if err != nil { return err