-
Notifications
You must be signed in to change notification settings - Fork 0
1.0-beta #66
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
base: master
Are you sure you want to change the base?
Conversation
…actions/create-release@v1 with softprops/action-gh-release@v2 - Replace multiple actions/upload-release-asset@v1 steps with single release action - Eliminates set-output deprecation warnings - Simplifies workflow while maintaining same functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces several new features for version 1.0-beta including Go template processing for payloads, enhanced form data handling (supporting both URL-encoded and multipart forms), and Basic Auth support. Key changes include:
- Adding functions for parsing and processing Go templates.
- Implementing form data processing with support for file uploads via multipart encoding.
- Enhancing client configuration and request creation to support both client certificate and Basic Auth.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| template/template.go | Introduces Go templating functions and CLI variable parsing for payload processing. |
| output/output_test.go & output.go | Adds tests and new functionality for printing version and update information. |
| form/form.go | Implements form data parsing and conversion to both URL-encoded and multipart formats. |
| examples/* | Provides sample templates and payloads demonstrating the new templating and form data formats. |
| config/config.go & config_test.go | Updates configuration structures and error handling to include basic auth and field trimming. |
| client/* | Modifies client request creation, TLS configuration, and adds Basic Auth handling. |
| .github/workflows/main.yml | Upgrades GitHub Actions versions for creating releases and uploading assets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for Basic Auth, form data handling (URL‐encoded and multipart), Go templating in payloads, and version update notifications.
- Implements
ParseTemplateVarsandProcessTemplatefor Go‐templating files and stdin - Adds
FormDataparsing/encoding inform/form.goandProcessFormData - Extends
configandclientto include Basic Auth, updatesCreateRequest/BuildClientAuthfor credentials - Introduces
PrintVersionWithUpdatesand update‐check logic inclient/updates.go
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| template/template.go | New functions for parsing CLI vars and processing Go templates |
| form/form.go | Parsing and encoding of form fields and file uploads |
| output/output.go | Adds PrintVersionWithUpdates |
| output/output_test.go | Updates version tests to cover new behavior |
| config/config.go | Adds Username/Password fields, UseBasicAuth, and cleanup |
| config/config_test.go | Tests for Basic Auth loading and trimming whitespace |
| client/client.go | Updates CreateRequest, TLS setup, and BuildClientAuth |
| client/client_test.go | Updates tests for new BuildClientAuth signature and Basic Auth |
| client/updates.go | New GitHub update‐check implementation |
| .github/workflows/main.yml | Bumps GitHub Actions versions for release creation/upload |
Comments suppressed due to low confidence (5)
form/form.go:21
- Consider adding unit tests for
ParseFormData,ToURLEncoded,ToMultipart, andProcessFormDatato ensure correct parsing and encoding of both fields and file uploads.
func ParseFormData(data []byte) (*FormData, error) {
template/template.go:17
- Add tests for
ParseTemplateVarsandProcessTemplateto verify variable parsing and correct template rendering, including edge cases (e.g., missing=or undefined vars).
func ParseTemplateVars(vars []string) map[string]string {
client/updates.go:43
- [nitpick] The local variable
urlshadows the commonurlpackage and is generic; consider renaming toapiURLorendpointto improve clarity.
url := "https://api.github.com/repos/thoom/gulp/releases/latest"
client/client.go:195
- [nitpick] The
BuildClientAuthsignature has many positional parameters which can be confusing. Consider refactoring to use a struct or functional options for clearer caller intent.
func BuildClientAuth(clientCert, clientCertKey, clientCA, basicAuthUser, basicAuthPass string, clientCertConfig config.ClientAuth) config.ClientAuth {
config/config.go:144
- The example YAML shows two separate
client_authsections (one for certs and one for Basic Auth), which is invalid YAML. Combine all authentication fields under a singleclient_authblock to avoid confusion.
client_auth:
…ui`. Right now this provides access to any of the new yml configurations and any variables that have been created in those configs.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the 1.0-beta release, adding support for HTTP Basic Auth, form and multipart form data, and Go templating in payloads across the CLI and UI.
- Add Basic Auth configuration and parsing
- Support form data and multipart form requests
- Integrate Go templating in request payloads
Reviewed Changes
Copilot reviewed 56 out of 59 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ui/server.go | New HTTP server endpoints for templates and execution |
| ui/server_test.go | Tests covering server routes and output parsing |
| ui/frontend/**/* | New React-based UI (TS, components, styles, API client) |
| template/template.go & .yaml tests | Go templating engine for payload files and stdin |
| output/output.go & tests | Enhanced colored block output with terminal width logic |
| sonar-project.properties | Updated SonarQube inclusions/exclusions |
| scripts/build.sh, deploy.sh | Removed legacy build/deploy scripts |
Comments suppressed due to low confidence (4)
ui/server.go:269
- The single-template endpoint currently expects a
?path=query parameter, but the front-end uses a path parameter (e.g.,/api/template/<path>). Consider parsingr.URL.Pathin the handler or changing the client to include?path=so both sides match.
http.HandleFunc("/api/template/", s.handleTemplate)
output/output.go:62
- [nitpick] There's a placeholder comment (
// do something) left inPrintBlock. Remove or replace it with a meaningful note to keep the code clean.
for _, v := range pieces {
sonar-project.properties:6
- [nitpick] The inclusion/exclusion patterns overlap heavily and may inadvertently include non-Go files in analysis. Simplify the rules to clearly include only
.gofiles and exclude frontend assets in one place.
# Only analyze Go files
|
@gemini-code-assist review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This is a massive and impressive update that modernizes the tool significantly. The introduction of a proper CLI framework with cobra, a structured Makefile, and powerful features like templating, form data handling, and a web UI are excellent additions. The code has been substantially refactored for better modularity and readability, especially in the client and config packages. The documentation is also greatly improved with detailed guides and examples. I've found a couple of critical issues in the new Makefile and the ui server backend that would prevent parts of the new functionality from working, but they should be straightforward to fix. Overall, this is a fantastic leap forward for the project.
| build: frontend | ||
| @echo "Building $(BINARY_NAME)..." | ||
| @mkdir -p $(BUILD_DIR) | ||
| CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME) $(MAIN_PATH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build target uses a variable $(MAIN_PATH) which is not defined in this Makefile. This will cause the make build command to fail. Based on the other build targets, it seems you intend to build the main package in the current directory. You can simply remove this undefined variable.
CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)
| // Load configuration | ||
| loadedConfig, err := config.LoadConfiguration(configFile) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| gulpConfig = loadedConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arguments being passed to the gulp binary from the UI server are incorrect according to the new CLI structure defined in main.go using cobra. Specifically:
- The
-pflag for the template path is not defined. You should use--template. - The
-uflag for the URL is not defined. You should use--url. - The
--json-outputflag is not defined. To get the structured JSON for the UI, you should use--output ui.
I've provided a suggestion to fix the argument construction.
| // Load configuration | |
| loadedConfig, err := config.LoadConfiguration(configFile) | |
| if err != nil { | |
| return err | |
| } | |
| gulpConfig = loadedConfig | |
| args := []string{ | |
| "--template", templateFullPath, | |
| "--url", req.URL, | |
| "--method", req.Method, | |
| "--output", "ui", | |
| } |



Adding several big features: