mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-04-24 20:16:08 +02:00
debug
This commit is contained in:
parent
02b35dd9a1
commit
a5df11eaca
5
dist/index.js
vendored
5
dist/index.js
vendored
@ -395,7 +395,8 @@ class NextcloudArtifact {
|
|||||||
conclusion: 'failure',
|
conclusion: 'failure',
|
||||||
status: 'completed',
|
status: 'completed',
|
||||||
output: {
|
output: {
|
||||||
title: 'Nextcloud Artifacts'
|
title: 'Nextcloud Artifacts',
|
||||||
|
summary: 'Check failed.'
|
||||||
},
|
},
|
||||||
...github.context.repo
|
...github.context.repo
|
||||||
});
|
});
|
||||||
@ -630,8 +631,10 @@ class NextcloudClient {
|
|||||||
body: JSON.stringify(body)
|
body: JSON.stringify(body)
|
||||||
});
|
});
|
||||||
const result = await res.text();
|
const result = await res.text();
|
||||||
|
core.debug(`Share response: ${result}`);
|
||||||
const re = /<url>(?<share_url>.*)<\/url>/;
|
const re = /<url>(?<share_url>.*)<\/url>/;
|
||||||
const match = re.exec(result);
|
const match = re.exec(result);
|
||||||
|
core.debug(`Match groups:\n${JSON.stringify(match === null || match === void 0 ? void 0 : match.groups)}`);
|
||||||
const sharableUrl = ((match === null || match === void 0 ? void 0 : match.groups) || {})['share_url'];
|
const sharableUrl = ((match === null || match === void 0 ? void 0 : match.groups) || {})['share_url'];
|
||||||
if (!sharableUrl) {
|
if (!sharableUrl) {
|
||||||
throw new Error('Failed to parse sharable URL.');
|
throw new Error('Failed to parse sharable URL.');
|
||||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -108,7 +108,8 @@ export class NextcloudArtifact {
|
|||||||
conclusion: 'failure',
|
conclusion: 'failure',
|
||||||
status: 'completed',
|
status: 'completed',
|
||||||
output: {
|
output: {
|
||||||
title: 'Nextcloud Artifacts'
|
title: 'Nextcloud Artifacts',
|
||||||
|
summary: 'Check failed.'
|
||||||
},
|
},
|
||||||
...github.context.repo
|
...github.context.repo
|
||||||
})
|
})
|
||||||
|
@ -193,8 +193,10 @@ export class NextcloudClient {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const result = await res.text()
|
const result = await res.text()
|
||||||
|
core.debug(`Share response: ${result}`)
|
||||||
const re = /<url>(?<share_url>.*)<\/url>/
|
const re = /<url>(?<share_url>.*)<\/url>/
|
||||||
const match = re.exec(result)
|
const match = re.exec(result)
|
||||||
|
core.debug(`Match groups:\n${JSON.stringify(match?.groups)}`)
|
||||||
const sharableUrl = (match?.groups || {})['share_url']
|
const sharableUrl = (match?.groups || {})['share_url']
|
||||||
if (!sharableUrl) {
|
if (!sharableUrl) {
|
||||||
throw new Error('Failed to parse sharable URL.')
|
throw new Error('Failed to parse sharable URL.')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user