Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Variable with package url for webhook
-
Hi,
is there a variable that contains either the base url to the webinterface or the full url to a package that can be used in webhooks?
I've created a message card with a clickable link like shown below. The only thing that I currently have to hardcode is the base url to the ProGet webinterface.
Is there a better way to do this?
{ "@type": "MessageCard", "@context": "http://schema.org/extensions", "title": "$FeedType $PackageId $PackageVersion was $WebhookEvent", "summary": "summary", "sections": [{ "facts": [{ "name": "User:", "value": "$UserName" }, { "name": "Link:", "value": "[$PackageId $PackageVersion](http://192.168.0.1:8624/feeds/$FeedName/$PackageId/$PackageVersion)" }, { "name": "Feed:", "value": "$FeedName" }], "markdown": true }] } -
Hi @lm,
We currently do not have a variable for the base URL. Unfortunately, this is not a trivial thing to implement either. The best solution is to hard code your base URL as you are currently doing in your webhook.
Thanks,
Dan -
For my specific use case an URL to the package would already be sufficient. Could that be made available easier? The code that executes these hooks already must have some context of the package (Id, Version, etc.)?
-
Hi @lm,
Unfortunately it's not trivial to get a reliable URL for the package within the webhook module/code now, so it's not something that's easy to add on our end. The URL you have works for NuGet, but for other formats (Ruby, Debian, etc.) you need to include more information I believe.
After v2023, where we plan to centralize a lot of this, it might be easier to reconsider this. But for now, what you have is the best/easiest solution.
Cheers,
Steve -
Ok, thanks for the information.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login