probot / smee-client

🔴 Receives payloads then sends them to your local server
https://smee.io
ISC License
427 stars 134 forks source link

Feature Request: Allow appending a suffix to the URL #203

Open dhs-rec opened 2 years ago

dhs-rec commented 2 years ago

Currently, the text provided after the Smee token in a request is appended to the path given in the -P/--path option. This is working fine for us so far to trigger a Git repository scan in Jenkins using GitLab webhooks. However, the Jenkins Git plugin is changing the rules as newer versions expect an access token to be passed in with the URL, as &token=theToken. This would require us to change ALL webhooks in ALL GitLab repositories that need to trigger a build in Jenkins when we update to a version of the Git plugin that requires the token and, of course, every time we change that token.

An easier way to handle this would be to simply add the token parameter to the URL forwarded to Jenkins by Smee, so here's the request:

Please add a new parameter to Smee client (maybe -s/--suffix) which allows to append additional text to the constructed URL.

dhs-rec commented 2 years ago

OK, by reading the code I found that I can simply add my own query to the path given with -P/--path, like

... --path /the/path?token=theToken ...

However, it would be nice to have this properly documented somewhere.