Skip to content

Commit

Permalink
Merge branch 'main' into dangrous-refactorupdatepolicyconnectionconfig1
Browse files Browse the repository at this point in the history
  • Loading branch information
dangrous committed Aug 5, 2024
2 parents 81e6b69 + 412fc60 commit a93c1f5
Show file tree
Hide file tree
Showing 550 changed files with 29,728 additions and 8,183 deletions.
1 change: 1 addition & 0 deletions .github/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ module.exports = {
'@lwc/lwc/no-async-await': 'off',
'no-await-in-loop': 'off',
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
'no-continue': 'off',
},
};
20 changes: 20 additions & 0 deletions .github/actions/composite/buildAndroidE2EAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ inputs:
EXPENSIFY_PARTNER_PASSWORD_EMAIL:
description: The email address of the Expensify partner to use for the build
required: true
SLACK_WEBHOOK_URL:
description: 'URL of the slack webhook'
required: true

runs:
using: composite
Expand Down Expand Up @@ -75,6 +78,23 @@ runs:
env:
RUBYOPT: '-rostruct'

- name: Announce failed workflow in Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: custom
custom_payload: |
{
channel: '#e2e-announce',
attachments: [{
color: 'danger',
text: `🚧 ${process.env.AS_REPO} E2E APK build run failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 🚧`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}

- name: Upload APK
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ runs:

- name: Install root project node packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: nick-fields/retry@v2
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847
with:
timeout_minutes: 30
max_attempts: 3
command: npm ci

- name: Install node packages for desktop submodule
if: steps.cache-desktop-node-modules.outputs.cache-hit != 'true'
uses: nick-fields/retry@v2
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847
with:
timeout_minutes: 30
max_attempts: 3
Expand Down
23 changes: 17 additions & 6 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17016,14 +17016,31 @@ const CONST = {
STAGING_DEPLOY: 'StagingDeployCash',
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
},
ACTIONS: {
CREATED: 'created',
EDIT: 'edited',
},
EVENTS: {
ISSUE_COMMENT: 'issue_comment',
},
OPENAI_ROLES: {
USER: 'user',
ASSISTANT: 'assistant',
},
PROPOSAL_KEYWORD: 'Proposal',
OPENAI_THREAD_COMPLETED: 'completed',
DATE_FORMAT_STRING: 'yyyy-MM-dd',
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`),
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`),
POLL_RATE: 10000,
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
NO_ACTION: 'NO_ACTION',
OPENAI_POLL_RATE: 1500,
OPENAI_POLL_TIMEOUT: 90000,
};
exports["default"] = CONST;

Expand Down Expand Up @@ -17400,12 +17417,6 @@ class GithubUtils {
})
.then((response) => response.data.workflow_runs[0]?.id);
}
/**
* Generate the well-formatted body of a production release.
*/
static getReleaseBody(pullRequests) {
return pullRequests.map((number) => `- ${this.getPullRequestURLFromNumber(number)}`).join('\r\n');
}
/**
* Generate the URL of an New Expensify pull request given the PR number.
*/
Expand Down
23 changes: 17 additions & 6 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12257,14 +12257,31 @@ const CONST = {
STAGING_DEPLOY: 'StagingDeployCash',
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
},
ACTIONS: {
CREATED: 'created',
EDIT: 'edited',
},
EVENTS: {
ISSUE_COMMENT: 'issue_comment',
},
OPENAI_ROLES: {
USER: 'user',
ASSISTANT: 'assistant',
},
PROPOSAL_KEYWORD: 'Proposal',
OPENAI_THREAD_COMPLETED: 'completed',
DATE_FORMAT_STRING: 'yyyy-MM-dd',
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`),
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`),
POLL_RATE: 10000,
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
NO_ACTION: 'NO_ACTION',
OPENAI_POLL_RATE: 1500,
OPENAI_POLL_TIMEOUT: 90000,
};
exports["default"] = CONST;

Expand Down Expand Up @@ -12641,12 +12658,6 @@ class GithubUtils {
})
.then((response) => response.data.workflow_runs[0]?.id);
}
/**
* Generate the well-formatted body of a production release.
*/
static getReleaseBody(pullRequests) {
return pullRequests.map((number) => `- ${this.getPullRequestURLFromNumber(number)}`).join('\r\n');
}
/**
* Generate the URL of an New Expensify pull request given the PR number.
*/
Expand Down
23 changes: 17 additions & 6 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11540,14 +11540,31 @@ const CONST = {
STAGING_DEPLOY: 'StagingDeployCash',
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
},
ACTIONS: {
CREATED: 'created',
EDIT: 'edited',
},
EVENTS: {
ISSUE_COMMENT: 'issue_comment',
},
OPENAI_ROLES: {
USER: 'user',
ASSISTANT: 'assistant',
},
PROPOSAL_KEYWORD: 'Proposal',
OPENAI_THREAD_COMPLETED: 'completed',
DATE_FORMAT_STRING: 'yyyy-MM-dd',
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`),
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`),
POLL_RATE: 10000,
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
NO_ACTION: 'NO_ACTION',
OPENAI_POLL_RATE: 1500,
OPENAI_POLL_TIMEOUT: 90000,
};
exports["default"] = CONST;

Expand Down Expand Up @@ -11924,12 +11941,6 @@ class GithubUtils {
})
.then((response) => response.data.workflow_runs[0]?.id);
}
/**
* Generate the well-formatted body of a production release.
*/
static getReleaseBody(pullRequests) {
return pullRequests.map((number) => `- ${this.getPullRequestURLFromNumber(number)}`).join('\r\n');
}
/**
* Generate the URL of an New Expensify pull request given the PR number.
*/
Expand Down
23 changes: 17 additions & 6 deletions .github/actions/javascript/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14352,14 +14352,31 @@ const CONST = {
STAGING_DEPLOY: 'StagingDeployCash',
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
},
ACTIONS: {
CREATED: 'created',
EDIT: 'edited',
},
EVENTS: {
ISSUE_COMMENT: 'issue_comment',
},
OPENAI_ROLES: {
USER: 'user',
ASSISTANT: 'assistant',
},
PROPOSAL_KEYWORD: 'Proposal',
OPENAI_THREAD_COMPLETED: 'completed',
DATE_FORMAT_STRING: 'yyyy-MM-dd',
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`),
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`),
POLL_RATE: 10000,
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
NO_ACTION: 'NO_ACTION',
OPENAI_POLL_RATE: 1500,
OPENAI_POLL_TIMEOUT: 90000,
};
exports["default"] = CONST;

Expand Down Expand Up @@ -14954,12 +14971,6 @@ class GithubUtils {
})
.then((response) => response.data.workflow_runs[0]?.id);
}
/**
* Generate the well-formatted body of a production release.
*/
static getReleaseBody(pullRequests) {
return pullRequests.map((number) => `- ${this.getPullRequestURLFromNumber(number)}`).join('\r\n');
}
/**
* Generate the URL of an New Expensify pull request given the PR number.
*/
Expand Down
23 changes: 17 additions & 6 deletions .github/actions/javascript/getArtifactInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11501,14 +11501,31 @@ const CONST = {
STAGING_DEPLOY: 'StagingDeployCash',
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
},
ACTIONS: {
CREATED: 'created',
EDIT: 'edited',
},
EVENTS: {
ISSUE_COMMENT: 'issue_comment',
},
OPENAI_ROLES: {
USER: 'user',
ASSISTANT: 'assistant',
},
PROPOSAL_KEYWORD: 'Proposal',
OPENAI_THREAD_COMPLETED: 'completed',
DATE_FORMAT_STRING: 'yyyy-MM-dd',
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`),
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`),
POLL_RATE: 10000,
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
NO_ACTION: 'NO_ACTION',
OPENAI_POLL_RATE: 1500,
OPENAI_POLL_TIMEOUT: 90000,
};
exports["default"] = CONST;

Expand Down Expand Up @@ -11885,12 +11902,6 @@ class GithubUtils {
})
.then((response) => response.data.workflow_runs[0]?.id);
}
/**
* Generate the well-formatted body of a production release.
*/
static getReleaseBody(pullRequests) {
return pullRequests.map((number) => `- ${this.getPullRequestURLFromNumber(number)}`).join('\r\n');
}
/**
* Generate the URL of an New Expensify pull request given the PR number.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ async function run() {
})
).data.jobs.some((job) => job.name.startsWith('Build and deploy') && job.conclusion === 'success')
) {
console.log(`Deploy was not a success: ${lastSuccessfulDeploy.html_url}, looking at the next one`);
lastSuccessfulDeploy = completedDeploys.shift();
}

const priorTag = completedDeploys[0].head_branch;
if (!lastSuccessfulDeploy) {
throw new Error('Could not find a prior successful deploy');
}

const priorTag = lastSuccessfulDeploy.head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils.getPullRequestsMergedBetween(priorTag ?? '', inputTag);
console.log('Found the pull request list: ', prList);
Expand Down
29 changes: 22 additions & 7 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11529,9 +11529,13 @@ async function run() {
run_id: lastSuccessfulDeploy.id,
filter: 'latest',
})).data.jobs.some((job) => job.name.startsWith('Build and deploy') && job.conclusion === 'success')) {
console.log(`Deploy was not a success: ${lastSuccessfulDeploy.html_url}, looking at the next one`);
lastSuccessfulDeploy = completedDeploys.shift();
}
const priorTag = completedDeploys[0].head_branch;
if (!lastSuccessfulDeploy) {
throw new Error('Could not find a prior successful deploy');
}
const priorTag = lastSuccessfulDeploy.head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils_1.default.getPullRequestsMergedBetween(priorTag ?? '', inputTag);
console.log('Found the pull request list: ', prList);
Expand Down Expand Up @@ -11631,14 +11635,31 @@ const CONST = {
STAGING_DEPLOY: 'StagingDeployCash',
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
},
ACTIONS: {
CREATED: 'created',
EDIT: 'edited',
},
EVENTS: {
ISSUE_COMMENT: 'issue_comment',
},
OPENAI_ROLES: {
USER: 'user',
ASSISTANT: 'assistant',
},
PROPOSAL_KEYWORD: 'Proposal',
OPENAI_THREAD_COMPLETED: 'completed',
DATE_FORMAT_STRING: 'yyyy-MM-dd',
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`),
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`),
POLL_RATE: 10000,
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
NO_ACTION: 'NO_ACTION',
OPENAI_POLL_RATE: 1500,
OPENAI_POLL_TIMEOUT: 90000,
};
exports["default"] = CONST;

Expand Down Expand Up @@ -12233,12 +12254,6 @@ class GithubUtils {
})
.then((response) => response.data.workflow_runs[0]?.id);
}
/**
* Generate the well-formatted body of a production release.
*/
static getReleaseBody(pullRequests) {
return pullRequests.map((number) => `- ${this.getPullRequestURLFromNumber(number)}`).join('\r\n');
}
/**
* Generate the URL of an New Expensify pull request given the PR number.
*/
Expand Down
17 changes: 17 additions & 0 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2768,14 +2768,31 @@ const CONST = {
STAGING_DEPLOY: 'StagingDeployCash',
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
},
ACTIONS: {
CREATED: 'created',
EDIT: 'edited',
},
EVENTS: {
ISSUE_COMMENT: 'issue_comment',
},
OPENAI_ROLES: {
USER: 'user',
ASSISTANT: 'assistant',
},
PROPOSAL_KEYWORD: 'Proposal',
OPENAI_THREAD_COMPLETED: 'completed',
DATE_FORMAT_STRING: 'yyyy-MM-dd',
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`),
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`),
POLL_RATE: 10000,
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
NO_ACTION: 'NO_ACTION',
OPENAI_POLL_RATE: 1500,
OPENAI_POLL_TIMEOUT: 90000,
};
exports["default"] = CONST;

Expand Down
Loading

0 comments on commit a93c1f5

Please sign in to comment.