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: support parameter handling for dynamic URL paths #35

Merged
merged 2 commits into from
Oct 5, 2024
Merged

Conversation

appleboy
Copy link
Owner

@appleboy appleboy commented Oct 5, 2024

  • Comment out unused form data encoding in post method
  • Remove redundant error logging in post method
  • Add conditional URL path selection in trigger method based on parameters
  • Add parameter flag to CLI options in main.go
  • Include parameter in the run function configuration
  • Import net/url package in plugin.go
  • Add Parameter field to plugin.go struct
  • Parse and add parameters to URL values in Exec method
  • Pass parsed parameters to trigger method in Exec function

fix #27
fix #22

Add parameter handling for dynamic URL paths
```

- Comment out unused form data encoding in `post` method
- Remove redundant error logging in `post` method
- Add conditional URL path selection in `trigger` method based on parameters
- Add `parameter` flag to CLI options in `main.go`
- Include `parameter` in the `run` function configuration
- Import `net/url` package in `plugin.go`
- Add `Parameter` field to `plugin.go` struct
- Parse and add parameters to URL values in `Exec` method
- Pass parsed parameters to `trigger` method in `Exec` function

Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Simplify the condition to check if `params` is empty in the `trigger` function.

Signed-off-by: appleboy <appleboy.tw@gmail.com>
@appleboy appleboy merged commit a7c6b81 into master Oct 5, 2024
5 of 9 checks passed
@appleboy appleboy deleted the parameter branch October 5, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jenkins Job params
1 participant