Skip to content

Commit

Permalink
Merge pull request #21458 from Expensify/Rory-RemoveAutomatedPRChecks
Browse files Browse the repository at this point in the history
[No QA] Remove automated pr checks
  • Loading branch information
roryabraham authored Jun 23, 2023
2 parents 67f627d + f16da28 commit 8affbe1
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 279 deletions.
17 changes: 2 additions & 15 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -366,7 +363,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -423,7 +420,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -603,16 +600,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -404,7 +401,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -461,7 +458,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -641,16 +638,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -371,7 +368,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -428,7 +425,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -608,16 +605,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/javascript/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -603,7 +600,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -660,7 +657,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -840,16 +837,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -537,7 +534,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -594,7 +591,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -774,16 +771,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/javascript/getPullRequestDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -416,7 +413,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -473,7 +470,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -653,16 +650,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/javascript/getReleaseBody/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -358,7 +355,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -415,7 +412,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -595,16 +592,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/javascript/isStagingDeployLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,6 @@ class GithubUtils {
) {
return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL))
.then((data) => {
const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url');
console.log('Filtering out the following automated pull requests:', automatedPRs);

// The format of this map is following:
// {
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
Expand All @@ -322,7 +319,7 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);

const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value();
const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL);

// Tag version and comparison URL
Expand Down Expand Up @@ -379,7 +376,7 @@ class GithubUtils {
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
})
.catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err));
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
}

/**
Expand Down Expand Up @@ -559,16 +556,6 @@ class GithubUtils {
return Number.parseInt(matches[1], 10);
}

/**
* Determine if a given pull request is an automated PR.
*
* @param {Object} pullRequest
* @returns {Boolean}
*/
static isAutomatedPullRequest(pullRequest) {
return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY);
}

/**
* Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string.
*
Expand Down
Loading

0 comments on commit 8affbe1

Please sign in to comment.