kargo icon indicating copy to clipboard operation
kargo copied to clipboard

provide PR link in `git-open-pr` promotion step output

Open Marvin9 opened this issue 11 months ago • 4 comments

Checklist

  • [x] I've searched the issue queue to verify this is not a duplicate bug report.
  • [x] I've included steps to reproduce the bug.
  • [x] I've pasted the output of kargo version.
  • [ ] I've pasted logs, if applicable.

Description

Pull request deep links are not working - https://github.com/akuity/kargo/issues/3024#issuecomment-2639199830

With promotion steps, UI recently changed the way it structures Pull request deep link - https://github.com/akuity/kargo/issues/3024.

It constructs URL from git-open-pr step output and config values (repoURL from step config and prNumber from output). However when the spec contains expression language, it fails to generate URL because now repoURL is not raw value.

The solution is to provide as much as info in promotion steps output (in this case, repoURL), it can be either full URL or at the very least, values that will help UI to construct link.

Screenshots

https://github.com/akuity/kargo/issues/3024#issuecomment-2639199830

Steps to Reproduce

  • Create stage with promotion step git-open-pr and promote to that stage
  • check the promotion lists in stage details page and open the promotion step modal. Both won't have PR deep link

Version

dev

Marvin9 avatar Feb 06 '25 09:02 Marvin9

@Marvin9 just to clarify on this issue—do we only need to include repoURL in the Output? Would that be enough for the UI to construct the link?

The output would look like this:

{
  "prNumber": 6,
  "repoURL": "https://github.com/placeholder/placeholder.git"
}

fykaa avatar Apr 17 '25 16:04 fykaa

The benefit of a direct URL to the pull request instead of just the repository would be that we no longer have to reconstruct it in the UI.

hiddeco avatar Apr 17 '25 17:04 hiddeco

+1 to @hiddeco would be great to have direct PR link so UI don't have to reconstruct for different git providers

Marvin9 avatar Apr 17 '25 18:04 Marvin9

I will update the PR accordingly

fykaa avatar Apr 17 '25 18:04 fykaa

UI needs to use this new field

Marvin9 avatar May 15 '25 10:05 Marvin9