Skip to content

Commit

Permalink
Merge branch 'main' into feat-48189-3
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed Feb 11, 2025
2 parents 13133ec + 48520ec commit e62d2c5
Show file tree
Hide file tree
Showing 196 changed files with 3,278 additions and 1,586 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ENVIRONMENT=development
NEW_EXPENSIFY_URL=https://new.expensify.com/
SECURE_EXPENSIFY_URL=https://secure.expensify.com.dev/
EXPENSIFY_URL=https://www.expensify.com.dev/
Expand Down
10 changes: 9 additions & 1 deletion .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ self-hosted-runner:
- ubuntu-latest-xl
- macos-15-large
- macos-15-xlarge
- ubuntu-latest-reassure-tests
- macos-12
- ubuntu-20.04-v4

paths:
'**/*':
ignore:
# This is meant to be a temporary workaround for a bug in actionslint. Upstream:
# - issue: https://github.com/rhysd/actionlint/issues/511
# - PR: https://github.com/rhysd/actionlint/pull/513
- '"env" is not allowed in "runs" section because .* is a Composite action.*'
45 changes: 45 additions & 0 deletions .github/actions/composite/validateActor/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Validate actor
description: Validate the the current actor has the permissions they need. By default, it validates that the user has write permissions.

inputs:
# If `REQUIRE_APP_DEPLOYER` is true, we check that they're an app deployer. If not, we just check that they have write access.
REQUIRE_APP_DEPLOYER:
description: Should this action require the actor to be an app deployer?
required: false
default: 'true'
OS_BOTIFY_TOKEN:
description: OSBotify token. Needed to access certain API endpoints the regular github.token can't
required: true

runs:
using: composite
steps:
- name: Get user permissions
if: ${{ !fromJSON(inputs.REQUIRE_APP_DEPLOYER) }}
id: getUserPermissions
shell: bash
run: |
PERMISSION=$(gh api /repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission | jq -r '.permission')
if [[ "$PERMISSION" == 'write' || "$PERMISSION" == 'admin' ]]; then
echo "::notice::✅ Actor ${{ github.actor }} has write permission"
else
echo "::error::❌ Actor ${{ github.actor }} does not have write permission"
exit 1
fi
env:
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }}

- name: Check if user is deployer
id: isUserDeployer
if: fromJSON(inputs.REQUIRE_APP_DEPLOYER)
shell: bash
run: |
if [[ "${{ github.actor }}" == "OSBotify" || "${{ github.actor }}" == "os-botify[bot]" ]] || \
gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ github.actor }} --silent; then
echo "::notice::✅ Actor ${{ github.actor }} is an app deployer"
else
echo "::error::❌ Actor ${{ github.actor }} is not an app deployer"
exit 1
fi
env:
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }}
6 changes: 3 additions & 3 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17242,8 +17242,8 @@ exports["default"] = newComponentCategory;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -17532,7 +17532,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12246,8 +12246,8 @@ exports.getStringInput = getStringInput;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -12536,7 +12536,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/checkAndroidStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -736639,8 +736639,8 @@ checkAndroidStatus()
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -736929,7 +736929,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11529,8 +11529,8 @@ exports["default"] = run;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -11819,7 +11819,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11592,8 +11592,8 @@ exports["default"] = run;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -12101,7 +12101,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/getArtifactInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11490,8 +11490,8 @@ exports["default"] = run;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -11780,7 +11780,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11633,8 +11633,8 @@ exports.getStringInput = getStringInput;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -12142,7 +12142,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2757,8 +2757,8 @@ exports["default"] = run;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/getPullRequestDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11593,8 +11593,8 @@ exports.getStringInput = getStringInput;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -11883,7 +11883,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/isStagingDeployLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11490,8 +11490,8 @@ exports["default"] = run;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -11780,7 +11780,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12889,8 +12889,8 @@ exports.getStringInput = getStringInput;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -13179,7 +13179,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/postTestBuildComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11596,8 +11596,8 @@ exports["default"] = run;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -11886,7 +11886,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/proposalPoliceComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18073,8 +18073,8 @@ run().catch((error) => {
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -18363,7 +18363,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/javascript/reopenIssueWithComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11500,8 +11500,8 @@ reopenIssueWithComment()
Object.defineProperty(exports, "__esModule", ({ value: true }));
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const GIT_CONST = {
GITHUB_OWNER: 'Expensify',
APP_REPO: 'App',
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
};
const CONST = {
...GIT_CONST,
Expand Down Expand Up @@ -11790,7 +11790,7 @@ class GithubUtils {
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
// PR list
if (sortedPRList.length > 0) {
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
Expand Down
Loading

0 comments on commit e62d2c5

Please sign in to comment.