From 8f8de9c95ab4903ac9a7531b27fac146cd57758e Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 10:23:47 -0700 Subject: [PATCH 1/2] Fetch all tags in GitUtils --- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 6 ++++-- .../actions/javascript/getDeployPullRequestList/index.js | 6 ++++-- .github/libs/GitUtils.js | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index a4ebf20428fe..9ded6880be82 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -249,8 +249,10 @@ function fetchTagIfNeeded(tag) { * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromTag, toTag) { - fetchTagIfNeeded(fromTag); - fetchTagIfNeeded(toTag); + // fetchTagIfNeeded(fromTag); + // fetchTagIfNeeded(toTag); + // Note: this is a temporary measure until we can figure out a faster way to fetch only what's needed + execSync('git fetch --all --tags'); console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index ba7ddfb49054..233662be47d5 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -183,8 +183,10 @@ function fetchTagIfNeeded(tag) { * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromTag, toTag) { - fetchTagIfNeeded(fromTag); - fetchTagIfNeeded(toTag); + // fetchTagIfNeeded(fromTag); + // fetchTagIfNeeded(toTag); + // Note: this is a temporary measure until we can figure out a faster way to fetch only what's needed + execSync('git fetch --all --tags'); console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index e7b062dd5df6..13f45ac290d2 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -35,8 +35,10 @@ function fetchTagIfNeeded(tag) { * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromTag, toTag) { - fetchTagIfNeeded(fromTag); - fetchTagIfNeeded(toTag); + // fetchTagIfNeeded(fromTag); + // fetchTagIfNeeded(toTag); + // Note: this is a temporary measure until we can figure out a faster way to fetch only what's needed + execSync('git fetch --all --tags'); console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { From 23975168390625785f9949adf4eb6e8ed264163f Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 10:45:08 -0700 Subject: [PATCH 2/2] Suppress lint failure --- .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 1 + .github/actions/javascript/getDeployPullRequestList/index.js | 1 + .github/libs/GitUtils.js | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 9ded6880be82..5fcd41200f47 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -220,6 +220,7 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); /** * @param {String} tag */ +// eslint-disable-next-line no-unused-vars function fetchTagIfNeeded(tag) { try { console.log(`Checking if tag ${tag} exists locally`); diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 233662be47d5..2d3b51f58f2e 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -154,6 +154,7 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); /** * @param {String} tag */ +// eslint-disable-next-line no-unused-vars function fetchTagIfNeeded(tag) { try { console.log(`Checking if tag ${tag} exists locally`); diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 13f45ac290d2..af76465e5b1e 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -6,6 +6,7 @@ const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); /** * @param {String} tag */ +// eslint-disable-next-line no-unused-vars function fetchTagIfNeeded(tag) { try { console.log(`Checking if tag ${tag} exists locally`);