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

feat(merge-versions): display link to target version #380

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

bblancha
Copy link
Contributor

@bblancha bblancha commented Feb 6, 2024

As a user of the octobot version page, I often want to copy a link
to the project version I have just created, in order to paste that
link into other work tracking tools.

This change adds a link to the newly-created version in the success
message, or adds a link to the previously-existing version if it already
existed.

Also: we were previously showing the "Success: ..." message even when
the merge-versions request failed. Now we do not transition to the success
message in error cases.

Copy link
Collaborator

@rcorre rcorre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, aside from the warning about the unnecessary return.

@rcorre
Copy link
Collaborator

rcorre commented Feb 6, 2024

Just a thought -- I use a bash script to hit the octobot API from the CLI.
Instead of returning the version ID from the API and building the URL in JS, returning the version URL from the API would help me out as well.

Admittedly my use is probably weird/not supported (and it wouldn't be hard for me to do the same url building)

@trevershick
Copy link
Contributor

Just a thought -- I use a bash script to hit the octobot API from the CLI. Instead of returning the version ID from the API and building the URL in JS, returning the version URL from the API would help me out as well.

Admittedly my use is probably weird/not supported (and it wouldn't be hard for me to do the same url building)

Share CLI please @rcorre . I'd love to not have to go into the web UI

trevershick
trevershick previously approved these changes Feb 6, 2024
@bblancha
Copy link
Contributor Author

bblancha commented Feb 6, 2024

on building the URLs in the service or not:
I was imitating the way it did it for the links to the issues.

It makes sense to me to return the whole link, but would like to understand first if there was a hard and fast reason that the issue links were built in the client.

@matthauck do you happen to remember if it matters whether the Issue links are built in the client or on the server side?

matthauck
matthauck previously approved these changes Feb 6, 2024
Copy link
Collaborator

@matthauck matthauck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure about the case where the version already exists. otherwise, lgtm!

@matthauck
Copy link
Collaborator

@matthauck do you happen to remember if it matters whether the Issue links are built in the client or on the server side?

I could go either way. Constructing the whole URL in the service rather than the front-end might be nice, but since jiraBase, etc. is already there, this way works too.

@matthauck
Copy link
Collaborator

also: @rcorre's comment about better support for CLI support is a good reason also to move the url construction into the service. Less code in the front-end -> more extensibility? 🎉

@bblancha
Copy link
Contributor Author

bblancha commented Feb 6, 2024

Screenshot 2024-02-05 at 9 15 28 PM

octobot/src/server/admin.rs Outdated Show resolved Hide resolved
@bblancha bblancha merged commit bc8d332 into main Feb 7, 2024
1 check passed
@bblancha bblancha deleted the display_new_version_link branch February 7, 2024 22:20
@bblancha
Copy link
Contributor Author

bblancha commented Feb 8, 2024

fixes #378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants