Open ryboe opened 5 years ago
I don't see anything wrong in that snippet. Having to create a local variable when optional fields have constant enum values is unfortunate (and maybe should be improved, in a separate issue), but the way you've done it is fine and should produce expected results.
The problem may be elsewhere. Was there any more detail included in the error message?
MergeMethod
is a*PullRequestMergeMethod
. The values forPullRequestMergeMethod
are all constants. I passedgithubv4.PullRequestMergeMethodSquash
the only way I know how, by copying the constant to a variable and then passing a pointer to the variable, but I got the error you see above. Am I doing something wrong?I double-checked the GitHub settings for this repo and they do allow squash merging.