@npmcli/template-oss 4.11.1 → 4.11.3
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/lib/content/CODEOWNERS
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*
|
|
1
|
+
* {{ codeowner }}
|
|
@@ -3,10 +3,30 @@ defaults:
|
|
|
3
3
|
run:
|
|
4
4
|
shell: bash
|
|
5
5
|
steps:
|
|
6
|
-
{{>
|
|
7
|
-
{{> stepNode }}
|
|
6
|
+
{{> stepNode lockfile=false }}
|
|
8
7
|
- name: View in Registry
|
|
9
8
|
run: |
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
EXIT_CODE=0
|
|
10
|
+
|
|
11
|
+
function is_published {
|
|
12
|
+
if npm view "$@" --loglevel=error > /dev/null; then
|
|
13
|
+
echo 0
|
|
14
|
+
else
|
|
15
|
+
echo 1
|
|
16
|
+
fi
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
for release in $(echo '$\{{ needs.release.outputs.releases }}' | jq -r '.[] | @base64'); do
|
|
20
|
+
name=$(echo "$release" | base64 --decode | jq -r .pkgName)
|
|
21
|
+
version=$(echo "$release" | base64 --decode | jq -r .version)
|
|
22
|
+
spec="$name@$version"
|
|
23
|
+
status=$(is_published "$spec")
|
|
24
|
+
if [[ "$status" -eq 1 ]]; then
|
|
25
|
+
echo "$spec ERROR"
|
|
26
|
+
EXIT_CODE=$status
|
|
27
|
+
else
|
|
28
|
+
echo "$spec OK"
|
|
29
|
+
fi
|
|
30
|
+
done
|
|
31
|
+
|
|
32
|
+
exit $EXIT_CODE
|
package/lib/content/index.js
CHANGED
|
@@ -15,8 +15,8 @@ jobs:
|
|
|
15
15
|
id: commit
|
|
16
16
|
continue-on-error: true
|
|
17
17
|
run: |
|
|
18
|
-
{{ rootNpxPath }} --offline commitlint -V --from origin/$\{{ github.base_ref }} --to $\{{ github.event.pull_request.head.sha }}
|
|
18
|
+
{{ rootNpxPath }} --offline commitlint -V --from 'origin/$\{{ github.base_ref }}' --to $\{{ github.event.pull_request.head.sha }}
|
|
19
19
|
- name: Run Commitlint on PR Title
|
|
20
20
|
if: steps.commit.outcome == 'failure'
|
|
21
21
|
run: |
|
|
22
|
-
echo $\{{ github.event.pull_request.title }} | {{ rootNpxPath }} --offline commitlint -V
|
|
22
|
+
echo '$\{{ github.event.pull_request.title }}' | {{ rootNpxPath }} --offline commitlint -V
|
package/lib/content/release.yml
CHANGED
|
@@ -189,11 +189,18 @@ jobs:
|
|
|
189
189
|
|
|
190
190
|
if (updateComment) {
|
|
191
191
|
console.log('Found comment to update:', JSON.stringify(updateComment, null, 2))
|
|
192
|
+
let body = updateComment.body.replace(/Workflow run: :[a-z_]+:/, `Workflow run: :${RESULT}:`)
|
|
193
|
+
if (RESULT === 'x') {
|
|
194
|
+
body += `\n\n:rotating_light:`
|
|
195
|
+
body += ` {{ codeowner }}: The post-release workflow failed for this release.`
|
|
196
|
+
body += ` Manual steps may need to be taken after examining the workflow output`
|
|
197
|
+
body += ` from the above workflow run. :rotating_light:`
|
|
198
|
+
}
|
|
192
199
|
await github.rest.issues.updateComment({
|
|
193
200
|
owner,
|
|
194
201
|
repo,
|
|
202
|
+
body,
|
|
195
203
|
comment_id: updateComment.id,
|
|
196
|
-
body: updateComment.body.replace(/Workflow run: :[a-z_]+:/, `Workflow run: :${RESULT}:`),
|
|
197
204
|
})
|
|
198
205
|
} else {
|
|
199
206
|
console.log('No matching comments found:', JSON.stringify(comments, null, 2))
|