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

Feature: add the Stage link to the Pull Request Promotion created PR #1825

Open
wanghong230 opened this issue Apr 11, 2024 · 5 comments
Open

Comments

@wanghong230
Copy link
Contributor

Pull Request Promotion should add the Kargo stage link to the description also.

@webstradev
Copy link
Contributor

I can pick this up if needed

@webstradev
Copy link
Contributor

I'm assuming with Stage Link we referring to the URL for a stage so as to navigate from a PR to the Kargo Dashboard?

@webstradev
Copy link
Contributor

@krancour I'm not entirely sure on how to accomplish this, since the code that is creating the pull request is a few levels down and this code doesn't know anything about where it is deployed. Unless I'm missing something overly obvious.

@krancour
Copy link
Member

@webstradev I hadn't looked at this one too carefully just yet, but your initial assessment of things sounds correct. The code that opens PRs doesn't have any existing awareness of where the API server / UI is deployed (if it's even deployed at all).

I think you might be able to get project and stage name easily enough, so then it's just a question of how to turn those two bits of information into a URL...

I suspect that this won't be the last time we need to do something of this nature, so I think we might want to consider building some kind of utility that globally yields easy access to API server proto + hostname.

@krancour krancour modified the milestones: v0.6.0, v0.7.0 Apr 30, 2024
@webstradev
Copy link
Contributor

@webstradev I hadn't looked at this one too carefully just yet, but your initial assessment of things sounds correct. The code that opens PRs doesn't have any existing awareness of where the API server / UI is deployed (if it's even deployed at all).

I think you might be able to get project and stage name easily enough, so then it's just a question of how to turn those two bits of information into a URL...

I suspect that this won't be the last time we need to do something of this nature, so I think we might want to consider building some kind of utility that globally yields easy access to API server proto + hostname.

This makes sense to me and I was thinking about something similar, though I'm not entirely certain how to accomplish it, as I suspect using os.Hostname() isn't enough because that would give an interal hostname within the cluster not something exposed externally that a user could access right?

@krancour krancour modified the milestones: v0.7.0, v0.8.0 May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants