feature: Dynamic parameter and improve GitHub actions - #3
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements dynamic parameter resolution functionality for configuration files and adds GitHub Actions workflows for better CI/CD support. The main purpose is to enable template-based configuration where dynamic values (like timestamps, UUIDs, random numbers, etc.) can be resolved at runtime with visual highlighting in the web interface.
Key changes include:
- Dynamic parameter resolution system supporting datetime, random values, UUIDs, and environment variables
- Visual highlighting of resolved parameters in the web interface
- Enhanced GitHub Actions workflows with environment variable support
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/common/params.go | Core parameter resolver implementation with support for various dynamic parameter types |
| internal/configure/config.go | Integration of parameter resolution into configuration loading |
| templates/report.html | Updated HTML template to display highlighted parameter segments |
| static/style.css | Added CSS styling for parameter highlighting |
| internal/types/structures/configure/configure.go | Added fields to store original template values |
| internal/types/structures/reporter/reporter.go | Added display URL and highlight segments fields |
| internal/types/structures/checker/checker.go | Added display URL and highlight segments fields |
| internal/types/types/highlight/highlight.go | New type definition for text highlighting segments |
| internal/checker/endpoints.go | Integration of parameter highlighting in endpoint checking |
| internal/reporter/report.go | Propagation of display URL and highlight data to reports |
| .github/workflows/pr-build.yml | New GitHub Actions workflow for PR builds with environment variable setup |
| .github/workflows/deploy.yml | Enhanced deployment workflow with environment variable support |
| README.md | Documentation for new parameter features |
| README_CN.md | Chinese documentation for new parameter features |
| go.mod | Added UUID dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| } | ||
|
|
||
| // If value looks like a token/key (long alphanumeric string), mask it | ||
| if len(value) > 20 && regexp.MustCompile(`^[a-zA-Z0-9+/=-]+$`).MatchString(value) { |
There was a problem hiding this comment.
The regular expression is compiled on every function call. Consider declaring it as a package-level variable or using regexp.MustCompile once during initialization to improve performance.
Description
Fixes #6
Type of change
Please delete options that are not relevant.
Checklist