Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for tools from github enterprise. #534

Merged

Conversation

johnrengelman
Copy link
Contributor

@johnrengelman johnrengelman commented Jun 24, 2024

Adds support for using a private Github Enterprise instance to host internal gptscript tools.
Can be invoked in the following way: $ GH_ENTERPRISE_TOKEN=<personal access token> gptscript --github-enterprise-hostname mygitinstance.com <tool>

This is functional and I was able to resolve and use tools from a private instance.
I'm not super happy with the way the configuration is passed down (and that the loader/github package gets pull into the cli package). I considered using the context.Context instance that gets passed to the loader functions to then enable resolution to a GHE instance and would be happy to implement that or any other suggestions you have.

@johnrengelman johnrengelman force-pushed the github-enterprise-support branch 4 times, most recently from d92d23d to 9dbc119 Compare July 1, 2024 15:14
@johnrengelman
Copy link
Contributor Author

Updated this PR with changes from #578

@johnrengelman johnrengelman force-pushed the github-enterprise-support branch 2 times, most recently from 374632f to 3392ddd Compare July 7, 2024 19:20
@cjellick
Copy link
Contributor

cjellick commented Aug 6, 2024

ah, sorry for not reviewing this sooner. just noticed it

Copy link
Contributor

@thedadams thedadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

Just a few minor comments on the code style.

pkg/cli/gptscript.go Outdated Show resolved Hide resolved
pkg/loader/github/github.go Outdated Show resolved Hide resolved
pkg/types/tool.go Outdated Show resolved Hide resolved
@johnrengelman
Copy link
Contributor Author

Updated with latest main and review comments.

@thedadams
Copy link
Contributor

@johnrengelman Thanks for making those changes.

Based on the failures here, can you run go run tools/gendocs/main.go and include the corresponding changes here?

@johnrengelman
Copy link
Contributor Author

@thedadams updated with those changes.

@johnrengelman
Copy link
Contributor Author

pushed fixes for the linting errors (finally figured out how to get golangci-lint running on my Mac m1 (had to brew uninstall golangci-lint)

@thedadams
Copy link
Contributor

@johnrengelman Thanks for your work here!!

@thedadams thedadams merged commit 2bbe7bc into gptscript-ai:main Aug 9, 2024
10 checks passed
@johnrengelman johnrengelman deleted the github-enterprise-support branch August 9, 2024 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants