CI: warn about external links to local pages rather than abort with an error (#2497)
This commit is contained in:
parent
6a4b374c2e
commit
e94c9d6fae
|
|
@ -1,10 +1,10 @@
|
|||
{{ $isExternal := hasPrefix .Destination "http" -}}
|
||||
{{ if $isExternal -}}
|
||||
{{ if findRE "^https://opentelemetry.io/\\w" .Destination -}}
|
||||
{{ errorf "%s: use a local path, not an external URL, for the following reference to a site local page: %s"
|
||||
{{ warnf "%s: use a local path, not an external URL, for the following reference to a site local page: %s"
|
||||
.Page.File.Path .Destination -}}
|
||||
{{ else if findRE "^https://github.com/open-telemetry/opentelemetry-specification/(blob|tree)/main/specification/\\w" .Destination -}}
|
||||
{{ errorf "%s: use a local path, not an external URL, for the following reference to a local specification page: %s"
|
||||
{{ warnf "%s: use a local path, not an external URL, for the following reference to a local specification page: %s"
|
||||
.Page.File.Path .Destination -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue