From f4764ab7fcbdd270044ffd7cc214d3e66f6cca76 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Thu, 17 Jun 2021 10:28:45 -0700 Subject: [PATCH 1/2] Add better logging for StagingDeployCash --- .../createOrUpdateStagingDeploy.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js index 64ac1dffd26b..9d86f098a168 100644 --- a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js +++ b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js @@ -40,6 +40,15 @@ const run = function () { // Look at the state of the most recent StagingDeployCash, // if it is open then we'll update the existing one, otherwise, we'll create a new one. shouldCreateNewStagingDeployCash = Boolean(stagingDeployResponse.data[0].state !== 'open'); + if (shouldCreateNewStagingDeployCash) { + console.log('Latest StagingDeployCash is closed, creating a new one.', stagingDeployResponse.data[0]); + } else { + console.log( + 'Latest StagingDeployCash is open, updating it instead of creating a new one.', + 'Current:', stagingDeployResponse.data[0], + 'Previous:', stagingDeployResponse.data[1], + ); + } // Parse the data from the previous StagingDeployCash // (newest if there are none open, otherwise second-newest) @@ -51,6 +60,10 @@ const run = function () { // Find the list of PRs merged between the last StagingDeployCash and the new version const mergedPRs = GitUtils.getPullRequestsMergedBetween(previousStagingDeployCashData.tag, newVersion); + console.log( + 'The following PRs have been merged between the previous StagingDeployCash and new version:', + mergedPRs, + ); if (shouldCreateNewStagingDeployCash) { // We're in the create flow, not update From 5be42dcf6dc7ef09334b52d465c9f70ec30cc545 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Thu, 17 Jun 2021 10:35:12 -0700 Subject: [PATCH 2/2] Rebuild GH actions --- .../actions/createOrUpdateStagingDeploy/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index dbe401cd1ab4..24b2023e8ebf 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -50,6 +50,15 @@ const run = function () { // Look at the state of the most recent StagingDeployCash, // if it is open then we'll update the existing one, otherwise, we'll create a new one. shouldCreateNewStagingDeployCash = Boolean(stagingDeployResponse.data[0].state !== 'open'); + if (shouldCreateNewStagingDeployCash) { + console.log('Latest StagingDeployCash is closed, creating a new one.', stagingDeployResponse.data[0]); + } else { + console.log( + 'Latest StagingDeployCash is open, updating it instead of creating a new one.', + 'Current:', stagingDeployResponse.data[0], + 'Previous:', stagingDeployResponse.data[1], + ); + } // Parse the data from the previous StagingDeployCash // (newest if there are none open, otherwise second-newest) @@ -61,6 +70,10 @@ const run = function () { // Find the list of PRs merged between the last StagingDeployCash and the new version const mergedPRs = GitUtils.getPullRequestsMergedBetween(previousStagingDeployCashData.tag, newVersion); + console.log( + 'The following PRs have been merged between the previous StagingDeployCash and new version:', + mergedPRs, + ); if (shouldCreateNewStagingDeployCash) { // We're in the create flow, not update