Skip to content

feature: Dynamic parameter and improve GitHub actions - #3

Merged
WCY-dt merged 4 commits into
mainfrom
feature/url_param
Sep 22, 2025
Merged

feature: Dynamic parameter and improve GitHub actions#3
WCY-dt merged 4 commits into
mainfrom
feature/url_param

Conversation

@WCY-dt

@WCY-dt WCY-dt commented Sep 22, 2025

Copy link
Copy Markdown
Member

Description

  • implement dynamic parameter resolution and highlighting in configuration
  • add GitHub Actions workflows for PR builds and environment variable setup

Fixes #6

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@WCY-dt
WCY-dt requested a review from Copilot September 22, 2025 10:56
@WCY-dt WCY-dt added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 22, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread README.md Outdated
WCY-dt and others added 2 commits September 22, 2025 18:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@WCY-dt
WCY-dt requested a review from Copilot September 22, 2025 11:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread internal/common/params.go
}

// If value looks like a token/key (long alphanumeric string), mask it
if len(value) > 20 && regexp.MustCompile(`^[a-zA-Z0-9+/=-]+$`).MatchString(value) {

Copilot AI Sep 22, 2025

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@WCY-dt
WCY-dt merged commit 0125d30 into main Sep 22, 2025
1 check passed
@WCY-dt
WCY-dt deleted the feature/url_param branch September 22, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

支持动态 url

2 participants