From 2866f4b8740b41476fd882ecaafdb121b7586235 Mon Sep 17 00:00:00 2001 From: Lawrence Jones Date: Tue, 4 Jun 2024 15:40:12 +0100 Subject: [PATCH] Allow overriding the command passed to Expo You may want to call into the command action using a provided command string rather than what comes from the GitHub Action. This is useful if you want to write an action that listens for a specific shortcut (e.g. `#release production`) which then calls the expo/eas command supported by the official action. Then you benefit from the nice shortcut, remove the possibility of misconfiguration, while keeping the official GHA's behaviour like posting builds back to the PR or responding to the original comment. --- build/command/index.js | 8 +++++++- bun.lockb | Bin 393116 -> 392868 bytes command/action.yml | 3 +++ src/actions/command.ts | 9 ++++++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/build/command/index.js b/build/command/index.js index 68307fb5..9799c1eb 100644 --- a/build/command/index.js +++ b/build/command/index.js @@ -38583,6 +38583,7 @@ function commandInput() { return { reaction: '+1', githubToken: (0, core_1.getInput)('github-token'), + commandOverride: (0, core_1.getInput)('command-override'), }; } exports.commandInput = commandInput; @@ -38592,7 +38593,12 @@ async function commandAction(input = commandInput()) { if (!comment) { return; } - const command = (0, expo_1.parseCommand)(comment); + let commandSource = comment; + if (input.commandOverride) { + (0, core_1.info)(`Overriding command with: ${input.commandOverride}`); + commandSource = input.commandOverride; + } + const command = (0, expo_1.parseCommand)(commandSource); if (!command) { (0, core_1.info)("Comment didn't contain a valid expo/eas command"); return; diff --git a/bun.lockb b/bun.lockb index 71221f0ce337cb872f026154b37d5a643c23d96c..7ba74eded829148d98c6313df3785faf646fd5ca 100755 GIT binary patch delta 10832 zcmXZf3A|f#-pBE@x55;`FtLrGDl?eI9($}!F+^>#$5ts?Y0<{k$*nE6ilv%ssn~-e z_S_m|teLSzYl&ru@yy5=Or9A`n3+dB-{1H9JFoul`+q+ECpY(;lXI`dKdycE4{KkW z8oSou!l_SA9dl21%$SjWcFYkVHJwz&K%`G)tcl=h+{=i%2%XND6%7%d!I%?G5t+%D z7cCJzgRvmmB9>z;ijIiSVl0WSNX%v|i=IfH$ygD6k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