From cbe31070f7450fcef0f4786d882e6c7fe800705b Mon Sep 17 00:00:00 2001 From: Katy DeCorah Date: Sat, 16 Dec 2023 18:56:28 -0500 Subject: [PATCH] Included authors in nowReading output --- action.yml | 2 +- dist/index.js | 8 +++++++- src/__tests__/index.test.ts | 3 +++ src/index.ts | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 9aca22c4..6e3f0b48 100644 --- a/action.yml +++ b/action.yml @@ -27,4 +27,4 @@ inputs: description: The width of the thumbnail image (for books sourced from Google Books). The default size is 128. outputs: nowReading: - description: "When a new book is started this output will contain an object with the book's: title, description, thumbnail, and isbn." + description: "When a new book is started this output will contain an object with the book's: title, description, thumbnail, authors, and isbn." diff --git a/dist/index.js b/dist/index.js index 6161343c..a827c011 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35666,7 +35666,13 @@ async function read() { library.push(newBook); (0,core.exportVariable)(`BookTitle`, newBook.title); if (bookStatus === "started") { - (0,core.setOutput)("nowReading", newBook); + (0,core.setOutput)("nowReading", { + title: newBook.title, + authors: newBook.authors, + description: newBook.description, + isbn: newBook.isbn, + thumbnail: newBook.thumbnail, + }); } if (newBook.thumbnail) { (0,core.exportVariable)(`BookThumbOutput`, `book-${newBook.isbn}.png`); diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index cf27152c..415fb8f5 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -108,6 +108,9 @@ describe("index", () => { [ "nowReading", { + "authors": [ + "Raven Leilani", + ], "description": "NEW YORK TIMES BESTSELLER Winner of the 2020 Center for Fiction First Novel Prize Winner of the 2020 National Book Critics Circle's John Leonard Prize for Best First Book Winner of the 2020 Kirkus Prize for Fiction Winner of the 2021 Dylan Thomas Prize Finalist for the 2021 PEN/Hemingway Award for Best First Novel Longlisted for the 2021 Andrew Carnegie Medal for Excellence in Fiction Longlisted for the 2021 PEN/Jean Stein Book Award Longlisted for the 2021 Women's Prize for Fiction A New York Times Notable Book of the Year Named Best Book of the Year by O: the Oprah Magazine, Vanity Fair, Los Angeles Times, Town and Country, Amazon, Indigo, NPR, Harper’s Bazaar, Kirkus Reviews, Marie Claire, Good Housekeeping Sharp, comic, disruptive, and tender, Luster sees a young Black woman fall into art and someone else's open marriage. Edie is stumbling her way through her twenties—sharing a subpar apartment in Bushwick, clocking in and out of her admin job, making a series of inappropriate sexual choices. She's also, secretly, haltingly, figuring her way into life as an artist. And then she meets Eric, a digital archivist with a family in New Jersey, including an autopsist wife who has agreed to an open marriage—with rules. As if navigating the constantly shifting landscapes of contemporary sexual manners and racial politics weren't hard enough, Edie finds herself unemployed and falling into Eric's family life, his home. She becomes a hesitant friend to his wife and a de facto role model to his adopted daughter. Edie is the only Black woman who young Akila knows. Razor-sharp, darkly comic, sexually charged, socially disruptive, Luster is a portrait of a young woman trying to make sense of her life in a tumultuous era. It is also a haunting, aching description of how hard it is to believe in your own talent and the unexpected influences that bring us into ourselves along the way.", "isbn": "9780385696005", "thumbnail": "https://books.google.com/books/content?id=NFeTEAAAQBAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api", diff --git a/src/index.ts b/src/index.ts index cde3da2a..75d15f85 100644 --- a/src/index.ts +++ b/src/index.ts @@ -107,6 +107,7 @@ export async function read() { if (bookStatus === "started") { setOutput("nowReading", { title: newBook.title, + authors: newBook.authors, description: newBook.description, isbn: newBook.isbn, thumbnail: newBook.thumbnail,