diff --git a/src/context.ts b/src/context.ts new file mode 100644 index 0000000..4b6aaa9 --- /dev/null +++ b/src/context.ts @@ -0,0 +1,13 @@ +import * as github from "@actions/github"; +import * as core from "@actions/core"; +import type { Context } from "./types"; + +export function buildContext(): Context { + core.info("Building context from payload..."); + + const payload = github.context.payload; + + core.debug(`Payload:\n${JSON.stringify(payload, null, 2)}`); + + return {}; +} diff --git a/src/main.ts b/src/main.ts index 255b2b6..083d76d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,12 @@ import * as core from "@actions/core"; import { getSettings } from "./settings.ts"; +import { buildContext } from "./context.ts"; export async function run(): Promise { try { const settings = getSettings(); + + const context = buildContext(); } catch (error: unknown) { if (error instanceof Error) { core.setFailed(error.message);