diff --git a/enum.go b/enum.go index 44594eb..dd0e1cf 100644 --- a/enum.go +++ b/enum.go @@ -1099,6 +1099,7 @@ const ( ProjectNextFieldTypeDate ProjectNextFieldType = "DATE" // Date. ProjectNextFieldTypeIteration ProjectNextFieldType = "ITERATION" // Iteration. ProjectNextFieldTypeTracks ProjectNextFieldType = "TRACKS" // Tracks. + ProjectNextFieldTypeTrackedBy ProjectNextFieldType = "TRACKED_BY" // Tracked by. ) // ProjectNextOrderField represents properties by which the return project can be ordered. @@ -1170,6 +1171,7 @@ const ( ProjectV2FieldTypeDate ProjectV2FieldType = "DATE" // Date. ProjectV2FieldTypeIteration ProjectV2FieldType = "ITERATION" // Iteration. ProjectV2FieldTypeTracks ProjectV2FieldType = "TRACKS" // Tracks. + ProjectV2FieldTypeTrackedBy ProjectV2FieldType = "TRACKED_BY" // Tracked by. ) // ProjectV2ItemFieldValueOrderField represents properties by which project v2 item field value connections can be ordered. diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..540989c --- /dev/null +++ b/go.mod @@ -0,0 +1,15 @@ +module github.com/shurcooL/githubv4 + +go 1.18 + +require ( + github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 + golang.org/x/oauth2 v0.1.0 +) + +require ( + github.com/golang/protobuf v1.5.2 // indirect + golang.org/x/net v0.1.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.28.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..de30497 --- /dev/null +++ b/go.sum @@ -0,0 +1,25 @@ +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 h1:B1PEwpArrNp4dkQrfxh/abbBAOZBVp0ds+fBEOUOqOc= +github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/input.go b/input.go index 7267933..b694a5d 100644 --- a/input.go +++ b/input.go @@ -658,6 +658,12 @@ type CreateBranchProtectionRuleInput struct { RequiredStatusChecks *[]RequiredStatusCheckInput `json:"requiredStatusChecks,omitempty"` // Are conversations required to be resolved before merging. (Optional.) RequiresConversationResolution *Boolean `json:"requiresConversationResolution,omitempty"` + // Whether someone other than the person who last pushed to the branch must approve this pull request. (Optional.) + RequireLastPushApproval *Boolean `json:"requireLastPushApproval,omitempty"` + // Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. (Optional.) + LockBranch *Boolean `json:"lockBranch,omitempty"` + // Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. (Optional.) + LockAllowsFetchAndMerge *Boolean `json:"lockAllowsFetchAndMerge,omitempty"` // A unique identifier for the client performing the mutation. (Optional.) ClientMutationID *String `json:"clientMutationId,omitempty"` } @@ -2413,6 +2419,12 @@ type UpdateBranchProtectionRuleInput struct { RequiredStatusChecks *[]RequiredStatusCheckInput `json:"requiredStatusChecks,omitempty"` // Are conversations required to be resolved before merging. (Optional.) RequiresConversationResolution *Boolean `json:"requiresConversationResolution,omitempty"` + // Whether someone other than the person who last pushed to the branch must approve this pull request. (Optional.) + RequireLastPushApproval *Boolean `json:"requireLastPushApproval,omitempty"` + // Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. (Optional.) + LockBranch *Boolean `json:"lockBranch,omitempty"` + // Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. (Optional.) + LockAllowsFetchAndMerge *Boolean `json:"lockAllowsFetchAndMerge,omitempty"` // A unique identifier for the client performing the mutation. (Optional.) ClientMutationID *String `json:"clientMutationId,omitempty"` } @@ -3051,6 +3063,8 @@ type UpdateRepositoryInput struct { HasIssuesEnabled *Boolean `json:"hasIssuesEnabled,omitempty"` // Indicates if the repository should have the project boards feature enabled. (Optional.) HasProjectsEnabled *Boolean `json:"hasProjectsEnabled,omitempty"` + // Indicates if the repository should have the discussions feature enabled. (Optional.) + HasDiscussionsEnabled *Boolean `json:"hasDiscussionsEnabled,omitempty"` // A unique identifier for the client performing the mutation. (Optional.) ClientMutationID *String `json:"clientMutationId,omitempty"` }