Skip to content

Commit

Permalink
Build the action
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Jul 19, 2022
1 parent 835ec16 commit 6c8ab93
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -367,10 +370,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -337,10 +340,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -566,10 +569,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/getPullRequestDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -408,10 +411,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/getReleaseBody/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -326,10 +329,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/isPullRequestMergeable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -358,10 +361,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/isStagingDeployLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -290,10 +293,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -459,10 +462,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/reopenIssueWithComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -301,10 +304,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/triggerWorkflowAndWait/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -470,10 +473,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/javascript/verifySignedCommits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ class GithubUtils {
);
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' ],
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] }
const internalQAPRMap = _.reduce(
_.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))),
(map, pr) => {
Expand All @@ -290,10 +293,11 @@ class GithubUtils {
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);
const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.difference(_.keys(internalQAPRMap))
.difference(internalQAPRsNumbers)
.unique()
.sortBy(GithubUtils.getPullRequestNumberFromURL)
.value();
Expand Down

0 comments on commit 6c8ab93

Please sign in to comment.