Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
katydecorah committed Jun 6, 2024
1 parent 739d88f commit d7242eb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import updateMain from "./write-file";
import { setFailed, exportVariable, getInput } from "@actions/core";
import { setFailed, exportVariable, getInput, info } from "@actions/core";
import listPlaylists from "./list-playlists";
import * as github from "@actions/github";

Expand All @@ -22,10 +22,17 @@ export type WorkflowPayload = {
export async function action() {
try {
const filename = getInput("filename");

const playlistName =
github?.context?.payload?.inputs?.payload?.["playlist-name"] ||
getInput("playlist-name");

info(
`payload: ${github?.context?.payload?.inputs?.payload?.["playlist-name"]}`
);
info(`action input: ${getInput("playlist-name")}`);
info(`playlistName: ${playlistName}`);

if (!playlistName) {
throw new Error("Playlist name is required");
}
Expand Down

0 comments on commit d7242eb

Please sign in to comment.