#This seems like it works in Go, but I'm

1 messages · Page 1 of 1 (latest)

obtuse quartz
#

✔ github(
│ │ githubToken: secret(uri: "env://GITHUB_TOKEN"): Secret!
│ │ repo: $ Directory.withDirectory(
│ │ │ directory: GitRef.tree: Directory!
│ │ │ path: "/"
│ │ ): Directory! 0.0s CACHED
│ ): Github! 5.1s
✘ .pullRequest: GithubPullRequest! 1.8s
┃ Error: Cannot convert undefined or null to object
#

I'm trying to define a fluent API such that you start with github() .. do some base configuration and then say ok now I want to interact with pull rquests so .pullRequest() and now you've got methods on a PR type

#

cc: @main terrace have you tried this pattern in TS?

obtuse quartz
languid sand
#

Does the GitHub class have a container function that was omitted in the snippet? Or should it be github._container?

obtuse quartz
#

@languid sand there’s a container function

obtuse quartz
#

Ok.. I cleaned this up/simplified and the pattern works so it’s something else blowing up. I was able to return my PullRequest object from a method of Github

obtuse quartz
#

ok.. so the issue is this._gh.container() ? ┃ Error: this._gh.container(...).withExec is not a function