Skip to content

expose a way to build a url for a given resource #4585

@voidlily

Description

@voidlily

Checklist

  • I've searched the issue queue to verify this is not a duplicate feature request.
  • I've pasted the output of kargo version, if applicable.
  • I've pasted logs, if applicable.

Proposed Feature

Expose a way to build a URL for a given resource, such as exposing ctx.UIBaseURL, or a url_for expr function

Motivation

I want to build slack messages for deployment notification and include links without having to hardcode the url host in the message.

Example uses:

"Freight ${{ ctx.targetFreight.name }} is being promoted to Stage <${{ ctx.UIBaseURL }}/project/${{ ctx.project }}/stage/${{ ctx.stage }}|${{ ctx.stage }}>"

"Freight ${{ ctx.targetFreight.name }} is being promoted to Stage <${{ url_for(ctx.stage) }}|${{ ctx.stage }}>" (possibly stage_url_for if they need to be differentiated by type to work properly in expr?)

Metadata

Metadata

Assignees

Labels

area/controllerAffects the (main) controllergood first issueGood issue for a new contributor to handlehacktoberfestIssue is eligible for Hacktoberfest -- https://hacktoberfest.com/kind/enhancementAn entirely new featurepriority/normalThis is the priority for most worksize/small

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions