Skip to content

Commit

Permalink
update output
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjennings committed Feb 25, 2024
1 parent 2ec8e03 commit 9cb1d2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ outputs:
summary:
description: >-
The summary of the test result
shareLink:
link:
description: >-
The share link of Dashcam.io recording
markdown:
description: >-
A hotlinked image of the Dashcam.io recording
runs:
using: node16
main: ./dist/index.js
12 changes: 5 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import { v4 as uuidv4 } from "uuid";
const UZip = require("uzip");
const colors = require("colors");

function setOutput(summary, shareLink, conclusion) {
core.setOutput("summary", summary);
core.setOutput("share-link", shareLink);
core.setOutput("conclusion", conclusion);
}

function extractLink(markdownString) {
const regex = /\[.*?\]\((.*?)\)/g;
const urls = [];
Expand All @@ -35,8 +29,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));

const dispatchId = uuidv4();

console.log('TestDriver: "I can help ya test that!"'.green);
console.log('TestDriver: "Looking into it..."'.green);
console.log('TestDriver: "I can help ya test that!"'.green);

await octokit.request(
"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches",
Expand Down Expand Up @@ -217,4 +211,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));

console.log("TestDriver.ai Summary".yellow);
console.log(oiResult);

core.setOutput("summary", oiResult);
core.setOutput("link", extractLink(shareLink));
core.setOutput("markdown", shareLink);
})();

0 comments on commit 9cb1d2c

Please sign in to comment.