forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Expensify:main' into perf/attach-accountid-to-firebase-…
…sessions
- Loading branch information
Showing
73 changed files
with
27,742 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
|
@@ -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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
|
@@ -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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
|
@@ -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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
|
@@ -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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
|
@@ -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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11635,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; | ||
|
||
|
@@ -12237,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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11603,14 +11603,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; | ||
|
||
|
@@ -11987,12 +12004,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. | ||
*/ | ||
|
26 changes: 23 additions & 3 deletions
26
.github/actions/javascript/getReleaseBody/getReleaseBody.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
import * as core from '@actions/core'; | ||
import type {components as OctokitComponents} from '@octokit/openapi-types'; | ||
import * as ActionUtils from '@github/libs/ActionUtils'; | ||
import GithubUtils from '@github/libs/GithubUtils'; | ||
|
||
type GitHubPR = OctokitComponents['schemas']['pull-request-simple']; | ||
|
||
// Parse the stringified JSON array of PR numbers, and cast each from String -> Number | ||
const PRList = ActionUtils.getJSONInput('PR_LIST', {required: true}) as number[]; | ||
console.log('Got PR list: ', String(PRList)); | ||
|
||
const releaseBody = GithubUtils.getReleaseBody(PRList); | ||
console.log(`Generated release body: ${releaseBody}`); | ||
/** | ||
* Generate the well-formatted body of a production release. | ||
*/ | ||
function getReleaseBody(pullRequests: GitHubPR[]): string { | ||
return pullRequests.map((pr) => `- ${pr.title} by ${pr.user?.login ?? 'unknown'} in ${pr.html_url}`).join('\r\n'); | ||
} | ||
|
||
async function run() { | ||
const allPRs = await GithubUtils.fetchAllPullRequests(PRList); | ||
if (!allPRs) { | ||
core.setFailed(`something went wrong getting PRList ${JSON.stringify(PRList)}`); | ||
return; | ||
} | ||
const releaseBody = getReleaseBody(allPRs); | ||
console.log(`Generated release body: ${releaseBody}`); | ||
core.setOutput('RELEASE_BODY', releaseBody); | ||
} | ||
|
||
core.setOutput('RELEASE_BODY', releaseBody); | ||
if (require.main === module) { | ||
run(); | ||
} |
Oops, something went wrong.