Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Fetch all tags in GitUtils #21590

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down Expand Up @@ -249,8 +250,10 @@ function fetchTagIfNeeded(tag) {
* @returns {Promise<Array<Object<{commit: String, subject: String, authorName: String}>>>}
*/
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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down Expand Up @@ -183,8 +184,10 @@ function fetchTagIfNeeded(tag) {
* @returns {Promise<Array<Object<{commit: String, subject: String, authorName: String}>>>}
*/
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) => {
Expand Down
7 changes: 5 additions & 2 deletions .github/libs/GitUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down Expand Up @@ -35,8 +36,10 @@ function fetchTagIfNeeded(tag) {
* @returns {Promise<Array<Object<{commit: String, subject: String, authorName: String}>>>}
*/
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) => {
Expand Down