@forsakringskassan/docs-generator 1.30.1 → 1.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -2159,7 +2159,12 @@ async function getGitBranch() {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
2161
2161
|
function getPullRequestID() {
|
|
2162
|
-
|
|
2162
|
+
if (process.env.JOB_BASE_NAME) {
|
|
2163
|
+
const name = process.env.JOB_BASE_NAME;
|
|
2164
|
+
const match = name.match(/PR-(\d+)/);
|
|
2165
|
+
return match ? match[1] : void 0;
|
|
2166
|
+
}
|
|
2167
|
+
return void 0;
|
|
2163
2168
|
}
|
|
2164
2169
|
async function getSCMData(pkg, options) {
|
|
2165
2170
|
const commitHash = await run(`git rev-parse HEAD`);
|
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
{% if scm.pr %}<a href="{{ scm.prUrl }}">PR {{ scm.pr }}</a>{% endif %}
|
|
3
|
-
{{ scm.branch }} (<a href="{{ scm.commitUrl }}">{{ scm.commitShort }}</a>)<br />
|
|
4
|
-
{{ build.date }} {{ build.time }}
|
|
5
|
-
{%- endmacro -%}
|
|
1
|
+
{% from "macro/scm-info.njk.html" import scmInfo -%}
|
|
6
2
|
|
|
7
3
|
<div class="toolbar__item">
|
|
8
4
|
<span class="version">
|
|
9
5
|
{% if scm -%}
|
|
10
|
-
{{ scmInfo(scm) }}
|
|
6
|
+
{{ scmInfo(build, scm) }}
|
|
11
7
|
{%- else -%}
|
|
12
8
|
{{ pkg.version }}
|
|
13
9
|
{%- endif %}
|