diff --git a/runbot/static/src/js/fields/fields.js b/runbot/static/src/js/fields/fields.js index b54bc4a7..8b833bf3 100644 --- a/runbot/static/src/js/fields/fields.js +++ b/runbot/static/src/js/fields/fields.js @@ -14,6 +14,7 @@ import { useRef, xml, Component } from "@odoo/owl"; import { useAutoresize } from "@web/core/utils/autoresize"; import { getFormattedValue } from "@web/views/utils"; +import { UrlField } from "@web/views/fields/url/url_field"; function stringify(obj) { return JSON.stringify(obj, null, '\t') @@ -135,6 +136,29 @@ registry.category("fields").add("char_frontend_url", { component: FieldCharFrontendUrl, }); + +// Pull Request URL Widget +class PullRequestUrlField extends UrlField { + static template = xml` + + `; + static components = { UrlField } + setup() { + if (!this.props.readonly) { + throw new Error("This widget works only on readonly fields"); + } + } +} + +PullRequestUrlField.supportedTypes = ["char"]; + + +registry.category("fields").add("pull_request_url", { + supportedTypes: ["char"], + component: PullRequestUrlField, +}); + + //export class GithubTeamWidget extends CharField { //this.value.split(',').forEach((value) => { diff --git a/runbot/views/build_error_views.xml b/runbot/views/build_error_views.xml index 0c2d49ec..30321fc6 100644 --- a/runbot/views/build_error_views.xml +++ b/runbot/views/build_error_views.xml @@ -33,7 +33,7 @@ - + @@ -236,7 +236,7 @@ - +