API to render links with RepositoryBrowser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

API to render links with RepositoryBrowser

Ulli Hafner
SCM plugins like the Git plugin show links to the changes in the hosted repositories (e.g. to GitHub changes).
Is there a generic API available to obtain those links so I can embed them in my plugin as well?
E.g., in the warnings plugin I’m showing the Git SHA of the commit that introduced a warning (currently as plain text).
It would be helpful if one could navigate to the GitHb source directly from that SHA.


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/130F9688-8F61-4FC8-A1C1-7457677F0C35%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: API to render links with RepositoryBrowser

Tim Jacomb

On Tue, 15 Sep 2020 at 21:56, Ullrich Hafner <[hidden email]> wrote:
SCM plugins like the Git plugin show links to the changes in the hosted repositories (e.g. to GitHub changes).

Is there a generic API available to obtain those links so I can embed them in my plugin as well?

E.g., in the warnings plugin I’m showing the Git SHA of the commit that introduced a warning (currently as plain text).

It would be helpful if one could navigate to the GitHb source directly from that SHA.





--

You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/130F9688-8F61-4FC8-A1C1-7457677F0C35%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3Bie76LvEqtAe8CZXhCpyDN6k0Kp4AtODpZh%2BH9fzJRkgxQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: API to render links with RepositoryBrowser

James Nord-2

there is also the  link for the URL in the changeling which is controlled by the RepositoryBrowser implementation.
https://javadoc.jenkins.io/hudson/scm/RepositoryBrowser.html. 

On Wednesday, 16 September 2020 at 06:28:45 UTC+1 [hidden email] wrote:

On Tue, 15 Sep 2020 at 21:56, Ullrich Hafner <[hidden email]> wrote:
SCM plugins like the Git plugin show links to the changes in the hosted repositories (e.g. to GitHub changes).

Is there a generic API available to obtain those links so I can embed them in my plugin as well?

E.g., in the warnings plugin I’m showing the Git SHA of the commit that introduced a warning (currently as plain text).

It would be helpful if one could navigate to the GitHb source directly from that SHA.





--

You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/130F9688-8F61-4FC8-A1C1-7457677F0C35%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8d5a12ab-11f6-4d8d-a066-c8605672219cn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: API to render links with RepositoryBrowser

Ulli Hafner
Seems there is a scm.getEffectiveBrowser() method which returns something useful (I tried scm.getBrowser() but this method returns null).

A repository browser operates on a ChangeSet. How can I create one from a simple git commit hash? 

Am 16.09.2020 um 22:38 schrieb James Nord <[hidden email]>:


there is also the  link for the URL in the changeling which is controlled by the RepositoryBrowser implementation.

On Wednesday, 16 September 2020 at 06:28:45 UTC+1 timja...@gmail.com wrote:

On Tue, 15 Sep 2020 at 21:56, Ullrich Hafner <ullrich...@...> wrote:
SCM plugins like the Git plugin show links to the changes in the hosted repositories (e.g. to GitHub changes).

Is there a generic API available to obtain those links so I can embed them in my plugin as well?

E.g., in the warnings plugin I’m showing the Git SHA of the commit that introduced a warning (currently as plain text).

It would be helpful if one could navigate to the GitHb source directly from that SHA.





--

You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@....

To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/130F9688-8F61-4FC8-A1C1-7457677F0C35%40gmail.com.


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8d5a12ab-11f6-4d8d-a066-c8605672219cn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/259CD123-60F5-4966-A800-8BB35B55BC53%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: API to render links with RepositoryBrowser

Jesse Glick-4
On Mon, Sep 21, 2020 at 6:18 PM Ullrich Hafner <[hidden email]> wrote:
> A repository browser operates on a ChangeSet. How can I create one from a simple git commit hash?

You do not. It would be added to a `Run` during `SCM.checkout`.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1JyHhsS%3DcQr_KVMXdwGWXXasCx82ch%2B5F0WLRL8CR1Ag%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: API to render links with RepositoryBrowser

Ulli Hafner
Hmm, but how do I get the link for a commit hash then? There is no API to obtain change sets from the builds, or am I missing something obvious?

> Am 22.09.2020 um 18:55 schrieb Jesse Glick <[hidden email]>:
>
> On Mon, Sep 21, 2020 at 6:18 PM Ullrich Hafner <[hidden email]> wrote:
>> A repository browser operates on a ChangeSet. How can I create one from a simple git commit hash?
>
> You do not. It would be added to a `Run` during `SCM.checkout`.
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1JyHhsS%3DcQr_KVMXdwGWXXasCx82ch%2B5F0WLRL8CR1Ag%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/D604C6FE-9D11-4C86-A90A-C05885069167%40gmail.com.