From 3c6cbf0ab995fb752ff1ffab5c086186a8bb802d Mon Sep 17 00:00:00 2001
From: Jan Nowakowski <janeknowakowski9@gmail.com>
Date: Thu, 20 Feb 2025 13:37:16 +0100
Subject: [PATCH 1/5] Fix commenting on Mobile-Expensify

---
 .../postTestBuildComment/action.yml           |  8 +++++
 .../javascript/postTestBuildComment/index.js  |  9 +++---
 .../postTestBuildComment.ts                   | 10 ++++---
 .github/workflows/testBuildHybrid.yml         | 29 +++++++++++++++----
 4 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/.github/actions/javascript/postTestBuildComment/action.yml b/.github/actions/javascript/postTestBuildComment/action.yml
index d6c3391f3c26..fd78d63fa732 100644
--- a/.github/actions/javascript/postTestBuildComment/action.yml
+++ b/.github/actions/javascript/postTestBuildComment/action.yml
@@ -1,6 +1,14 @@
 name: "Mark Pull Requests as Deployed"
 description: "Mark pull requests as deployed on production or staging"
 inputs:
+    REPO:
+        description: "Repository to place a comment"
+        required: false
+        type: choice
+        options:
+            - App
+            - Mobile-Expensify
+        default: App
     PR_NUMBER:
         description: "Pull request number"
         required: false
diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js
index 78d5439fb66c..0356350ca7be 100644
--- a/.github/actions/javascript/postTestBuildComment/index.js
+++ b/.github/actions/javascript/postTestBuildComment/index.js
@@ -11542,10 +11542,10 @@ function getTestBuildMessage() {
     return message;
 }
 /** Comment on a single PR */
-async function commentPR(PR, message) {
+async function commentPR(repo, PR, message) {
     console.log(`Posting test build comment on #${PR}`);
     try {
-        await GithubUtils_1.default.createComment(github_1.context.repo.repo, PR, message);
+        await GithubUtils_1.default.createComment(repo, PR, message);
         console.log(`Comment created on #${PR} successfully 🎉`);
     }
     catch (err) {
@@ -11557,9 +11557,10 @@ async function commentPR(PR, message) {
 }
 async function run() {
     const PR_NUMBER = Number(core.getInput('PR_NUMBER', { required: true }));
+    const REPO = String(core.getInput('REPO', { required: true }));
     const comments = await GithubUtils_1.default.paginate(GithubUtils_1.default.octokit.issues.listComments, {
         owner: CONST_1.default.GITHUB_OWNER,
-        repo: CONST_1.default.APP_REPO,
+        repo: REPO,
         // eslint-disable-next-line @typescript-eslint/naming-convention
         issue_number: PR_NUMBER,
         // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -11578,7 +11579,7 @@ async function run() {
             }
         `);
     }
-    await commentPR(PR_NUMBER, getTestBuildMessage());
+    await commentPR(REPO, PR_NUMBER, getTestBuildMessage());
 }
 if (require.main === require.cache[eval('__filename')]) {
     run();
diff --git a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
index 813665f2dff5..bd86ad234c20 100644
--- a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
+++ b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
@@ -53,10 +53,10 @@ function getTestBuildMessage(): string {
 }
 
 /** Comment on a single PR */
-async function commentPR(PR: number, message: string) {
+async function commentPR(repo: string, PR: number, message: string) {
     console.log(`Posting test build comment on #${PR}`);
     try {
-        await GithubUtils.createComment(context.repo.repo, PR, message);
+        await GithubUtils.createComment(repo, PR, message);
         console.log(`Comment created on #${PR} successfully 🎉`);
     } catch (err) {
         console.log(`Unable to write comment on #${PR} 😞`);
@@ -69,11 +69,13 @@ async function commentPR(PR: number, message: string) {
 
 async function run() {
     const PR_NUMBER = Number(core.getInput('PR_NUMBER', {required: true}));
+    const REPO = String(core.getInput('REPO', {required: true}));
+
     const comments = await GithubUtils.paginate(
         GithubUtils.octokit.issues.listComments,
         {
             owner: CONST.GITHUB_OWNER,
-            repo: CONST.APP_REPO,
+            repo: REPO,
             // eslint-disable-next-line @typescript-eslint/naming-convention
             issue_number: PR_NUMBER,
             // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -94,7 +96,7 @@ async function run() {
             }
         `);
     }
-    await commentPR(PR_NUMBER, getTestBuildMessage());
+    await commentPR(REPO, PR_NUMBER, getTestBuildMessage());
 }
 
 if (require.main === module) {
diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml
index 63caf21797ff..b16ccb48e0d4 100644
--- a/.github/workflows/testBuildHybrid.yml
+++ b/.github/workflows/testBuildHybrid.yml
@@ -66,6 +66,8 @@ jobs:
           github-token: ${{ github.token }}
           result-encoding: string
           script: |
+            if ('${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER}}') return '${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER}}';
+
             if (!'${{ github.event.inputs.APP_PULL_REQUEST_NUMBER }}') return '';
 
             const pullRequest = await github.rest.pulls.get({
@@ -96,6 +98,7 @@ jobs:
             if [[ -z "${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER }}" && -z "${{ needs.getOldDotPR.outputs.OLD_DOT_PR }}" ]]; then
               echo "REF=" >> "$GITHUB_OUTPUT"
             else
+              echo "PR=${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER || needs.getOldDotPR.outputs.OLD_DOT_PR }}" >> "$GITHUB_OUTPUT"
               echo "REF=$(gh pr view ${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER || needs.getOldDotPR.outputs.OLD_DOT_PR }} -R Expensify/Mobile-Expensify --json headRefOid --jq '.headRefOid')" >> "$GITHUB_OUTPUT"
             fi
           env:
@@ -121,7 +124,7 @@ jobs:
             });
 
       - name: Add build start comment to OD PR
-        if: ${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER != '' || needs.getOldDotPR.outputs.OLD_DOT_PR != '' }}
+        if: ${{ needs.getOldDotPR.outputs.OLD_DOT_PR != '' }}
         uses: actions/github-script@v7
         with:
           github-token: ${{ secrets.OS_BOTIFY_TOKEN }}
@@ -130,7 +133,7 @@ jobs:
             github.rest.issues.createComment({
               owner: context.repo.owner,
               repo: 'Mobile-Expensify',
-              issue_number: ${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER || needs.getOldDotPR.outputs.OLD_DOT_PR }},
+              issue_number: ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }},
               body: `🚧 @${{ github.actor }} has triggered a test hybrid app build. You can view the [workflow run here](${workflowURL}).`
             });
 
@@ -163,7 +166,7 @@ jobs:
           cd Mobile-Expensify
           git fetch origin ${{ needs.getOldDotRef.outputs.OLD_DOT_REF }}
           git checkout ${{ needs.getOldDotRef.outputs.OLD_DOT_REF }}
-          echo "Building from https://github.com/Expensify/Mobile-Expensify/pull/${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER || needs.getOldDotPR.outputs.OLD_DOT_PR }}"
+          echo "Building from https://github.com/Expensify/Mobile-Expensify/pull/${{ needs.getOldDotPR.outputs.OLD_DOT_PR }}"
 
       - name: Configure MapBox SDK
         run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
@@ -278,7 +281,7 @@ jobs:
           cd Mobile-Expensify
           git fetch origin ${{ needs.getOldDotRef.outputs.OLD_DOT_REF }}
           git checkout ${{ needs.getOldDotRef.outputs.OLD_DOT_REF }}
-          echo "Building from https://github.com/Expensify/Mobile-Expensify/pull/${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER || needs.getOldDotPR.outputs.OLD_DOT_PR }}"
+          echo "Building from https://github.com/Expensify/Mobile-Expensify/pull/${{ needs.getOldDotPR.outputs.OLD_DOT_PR }}"
 
       - name: Configure MapBox SDK
         run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
@@ -361,7 +364,7 @@ jobs:
   postGithubComment:
     runs-on: ubuntu-latest
     name: Post a GitHub comment with app download links for testing
-    needs: [getNewDotRef, androidHybrid, iosHybrid]
+    needs: [getNewDotRef, getOldDotPR, androidHybrid, iosHybrid]
     steps:
       - name: Checkout
         uses: actions/checkout@v4
@@ -382,12 +385,26 @@ jobs:
           ios_path=$(echo "$content_ios" | jq -r '.html_path')
           echo "ios_path=$ios_path" >> "$GITHUB_OUTPUT"
 
-      - name: Publish links to apps for download
+      - name: Publish links to apps for download on NewDot PR
+        if: github.event.inputs.APP_PULL_REQUEST_NUMBER != ''
         uses: ./.github/actions/javascript/postTestBuildComment
         with:
           PR_NUMBER: ${{ github.event.inputs.APP_PULL_REQUEST_NUMBER }}
+          REPO: App
           GITHUB_TOKEN: ${{ github.token }}
           ANDROID: ${{ needs.androidHybrid.result }}
           IOS: ${{ needs.iosHybrid.result }}
           ANDROID_LINK: ${{ needs.androidHybrid.outputs.S3_APK_PATH }}
           IOS_LINK: ${{ steps.get_ios_path.outputs.ios_path }}
+
+      - name: Publish links to apps for download on OldDot PR
+        if: needs.getOldDotPR.outputs.OLD_DOT_PR
+        uses: ./.github/actions/javascript/postTestBuildComment
+        with:
+          PR_NUMBER: ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }}
+          REPO: Mobile-Expensify
+          GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
+          ANDROID: ${{ needs.androidHybrid.result }}
+          IOS: ${{ needs.iosHybrid.result }}
+          ANDROID_LINK: ${{ needs.androidHybrid.outputs.S3_APK_PATH }}
+          IOS_LINK: ${{ steps.get_ios_path.outputs.ios_path }}

From e0d7e0276845c60b1c997a2ff262a90b591a0a94 Mon Sep 17 00:00:00 2001
From: Jan Nowakowski <janeknowakowski9@gmail.com>
Date: Thu, 20 Feb 2025 13:43:35 +0100
Subject: [PATCH 2/5] Fix if statement

---
 .github/workflows/testBuildHybrid.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/testBuildHybrid.yml b/.github/workflows/testBuildHybrid.yml
index b16ccb48e0d4..2b87f2c4bf5f 100644
--- a/.github/workflows/testBuildHybrid.yml
+++ b/.github/workflows/testBuildHybrid.yml
@@ -398,7 +398,7 @@ jobs:
           IOS_LINK: ${{ steps.get_ios_path.outputs.ios_path }}
 
       - name: Publish links to apps for download on OldDot PR
-        if: needs.getOldDotPR.outputs.OLD_DOT_PR
+        if: needs.getOldDotPR.outputs.OLD_DOT_PR != ''
         uses: ./.github/actions/javascript/postTestBuildComment
         with:
           PR_NUMBER: ${{ needs.getOldDotPR.outputs.OLD_DOT_PR }}

From 13e348bb15a893ee3a4bc669fc15e3e0fc40db91 Mon Sep 17 00:00:00 2001
From: Jan Nowakowski <janeknowakowski9@gmail.com>
Date: Fri, 21 Feb 2025 07:42:23 +0100
Subject: [PATCH 3/5] Update tests

---
 tests/unit/postTestBuildComment.ts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/unit/postTestBuildComment.ts b/tests/unit/postTestBuildComment.ts
index 1276c7fc2501..f067e6391064 100644
--- a/tests/unit/postTestBuildComment.ts
+++ b/tests/unit/postTestBuildComment.ts
@@ -87,6 +87,7 @@ describe('Post test build comments action tests', () => {
     beforeEach(() => jest.clearAllMocks());
 
     test('Test GH action', async () => {
+        when(core.getInput).calledWith('REPO', {required: true}).mockReturnValue(CONST.APP_REPO);
         when(core.getInput).calledWith('PR_NUMBER', {required: true}).mockReturnValue('12');
         when(core.getInput).calledWith('ANDROID', {required: false}).mockReturnValue('success');
         when(core.getInput).calledWith('IOS', {required: false}).mockReturnValue('success');
@@ -122,6 +123,7 @@ describe('Post test build comments action tests', () => {
     });
 
     test('Test GH action when input is not complete', async () => {
+        when(core.getInput).calledWith('REPO', {required: true}).mockReturnValue(CONST.APP_REPO);
         when(core.getInput).calledWith('PR_NUMBER', {required: true}).mockReturnValue('12');
         when(core.getInput).calledWith('ANDROID', {required: false}).mockReturnValue('success');
         when(core.getInput).calledWith('IOS', {required: false}).mockReturnValue('');

From 60bea524b58e154cc0d9dcda8fbfd6c3c77f6b60 Mon Sep 17 00:00:00 2001
From: Jan Nowakowski <janeknowakowski9@gmail.com>
Date: Fri, 21 Feb 2025 08:32:33 +0100
Subject: [PATCH 4/5] Fix workflow

---
 .github/actions/javascript/authorChecklist/index.js      | 1 +
 .github/actions/javascript/awaitStagingDeploys/index.js  | 1 +
 .github/actions/javascript/checkAndroidStatus/index.js   | 1 +
 .github/actions/javascript/checkDeployBlockers/index.js  | 1 +
 .../javascript/createOrUpdateStagingDeploy/index.js      | 1 +
 .github/actions/javascript/getArtifactInfo/index.js      | 1 +
 .../actions/javascript/getDeployPullRequestList/index.js | 1 +
 .github/actions/javascript/getPreviousVersion/index.js   | 1 +
 .../actions/javascript/getPullRequestDetails/index.js    | 1 +
 .../actions/javascript/isStagingDeployLocked/index.js    | 1 +
 .../javascript/markPullRequestsAsDeployed/index.js       | 1 +
 .../actions/javascript/postTestBuildComment/action.yml   | 9 ++-------
 .github/actions/javascript/postTestBuildComment/index.js | 5 +++++
 .../postTestBuildComment/postTestBuildComment.ts         | 5 +++++
 .../actions/javascript/proposalPoliceComment/index.js    | 1 +
 .../actions/javascript/reopenIssueWithComment/index.js   | 1 +
 .github/actions/javascript/reviewerChecklist/index.js    | 1 +
 .github/actions/javascript/verifySignedCommits/index.js  | 1 +
 .github/libs/CONST.ts                                    | 1 +
 19 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js
index 0d76511fe8a5..d66b8a1a2022 100644
--- a/.github/actions/javascript/authorChecklist/index.js
+++ b/.github/actions/javascript/authorChecklist/index.js
@@ -17244,6 +17244,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js
index 39dccb02ee69..0f880a9d76a0 100644
--- a/.github/actions/javascript/awaitStagingDeploys/index.js
+++ b/.github/actions/javascript/awaitStagingDeploys/index.js
@@ -12248,6 +12248,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/checkAndroidStatus/index.js b/.github/actions/javascript/checkAndroidStatus/index.js
index 21fbc1bef9a1..6fc957206b9e 100644
--- a/.github/actions/javascript/checkAndroidStatus/index.js
+++ b/.github/actions/javascript/checkAndroidStatus/index.js
@@ -736641,6 +736641,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js
index dcfa8aedac4a..b85a22d0de7c 100644
--- a/.github/actions/javascript/checkDeployBlockers/index.js
+++ b/.github/actions/javascript/checkDeployBlockers/index.js
@@ -11531,6 +11531,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js
index 2c096b1e9feb..cc3b6228416b 100644
--- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js
+++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js
@@ -11594,6 +11594,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/getArtifactInfo/index.js b/.github/actions/javascript/getArtifactInfo/index.js
index e26a8685f09a..c2c395f4937f 100644
--- a/.github/actions/javascript/getArtifactInfo/index.js
+++ b/.github/actions/javascript/getArtifactInfo/index.js
@@ -11492,6 +11492,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js
index 59daac6a88d1..4fb109b9e7a5 100644
--- a/.github/actions/javascript/getDeployPullRequestList/index.js
+++ b/.github/actions/javascript/getDeployPullRequestList/index.js
@@ -11635,6 +11635,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/getPreviousVersion/index.js b/.github/actions/javascript/getPreviousVersion/index.js
index a02617a83d57..e0db5ae76166 100644
--- a/.github/actions/javascript/getPreviousVersion/index.js
+++ b/.github/actions/javascript/getPreviousVersion/index.js
@@ -2759,6 +2759,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js
index 6e3ffd690041..0a10b14e5dc9 100644
--- a/.github/actions/javascript/getPullRequestDetails/index.js
+++ b/.github/actions/javascript/getPullRequestDetails/index.js
@@ -11595,6 +11595,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js
index e2a9483f36f6..169f56c4174c 100644
--- a/.github/actions/javascript/isStagingDeployLocked/index.js
+++ b/.github/actions/javascript/isStagingDeployLocked/index.js
@@ -11492,6 +11492,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js
index b205b15e3ddf..16b229a25f69 100644
--- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js
+++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js
@@ -12891,6 +12891,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/postTestBuildComment/action.yml b/.github/actions/javascript/postTestBuildComment/action.yml
index fd78d63fa732..538a8f9bfe3a 100644
--- a/.github/actions/javascript/postTestBuildComment/action.yml
+++ b/.github/actions/javascript/postTestBuildComment/action.yml
@@ -2,16 +2,11 @@ name: "Mark Pull Requests as Deployed"
 description: "Mark pull requests as deployed on production or staging"
 inputs:
     REPO:
-        description: "Repository to place a comment"
-        required: false
-        type: choice
-        options:
-            - App
-            - Mobile-Expensify
+        description: "Repository to place a comment. Can be App or Mobile-Expensify"
         default: App
     PR_NUMBER:
         description: "Pull request number"
-        required: false
+        required: true
     GITHUB_TOKEN:
         description: "Github token for authentication"
         default: "${{ github.token }}"
diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js
index 0356350ca7be..a5fab7df8d9a 100644
--- a/.github/actions/javascript/postTestBuildComment/index.js
+++ b/.github/actions/javascript/postTestBuildComment/index.js
@@ -11558,6 +11558,10 @@ async function commentPR(repo, PR, message) {
 async function run() {
     const PR_NUMBER = Number(core.getInput('PR_NUMBER', { required: true }));
     const REPO = String(core.getInput('REPO', { required: true }));
+    if (REPO !== CONST_1.default.APP_REPO && REPO !== CONST_1.default.MOBILE_EXPENSIFY_REPO) {
+        core.setFailed(`Invalid repo: ${REPO}`);
+        return;
+    }
     const comments = await GithubUtils_1.default.paginate(GithubUtils_1.default.octokit.issues.listComments, {
         owner: CONST_1.default.GITHUB_OWNER,
         repo: REPO,
@@ -11599,6 +11603,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
index bd86ad234c20..bfd5003ca5ab 100644
--- a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
+++ b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
@@ -71,6 +71,11 @@ async function run() {
     const PR_NUMBER = Number(core.getInput('PR_NUMBER', {required: true}));
     const REPO = String(core.getInput('REPO', {required: true}));
 
+    if (REPO !== CONST.APP_REPO && REPO !== CONST.MOBILE_EXPENSIFY_REPO) {
+        core.setFailed(`Invalid repo: ${REPO}`);
+        return;
+    }
+
     const comments = await GithubUtils.paginate(
         GithubUtils.octokit.issues.listComments,
         {
diff --git a/.github/actions/javascript/proposalPoliceComment/index.js b/.github/actions/javascript/proposalPoliceComment/index.js
index be0bd9140bdd..76712b146845 100644
--- a/.github/actions/javascript/proposalPoliceComment/index.js
+++ b/.github/actions/javascript/proposalPoliceComment/index.js
@@ -18075,6 +18075,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js
index 71cbb7e444a0..e0a8ab5dc22e 100644
--- a/.github/actions/javascript/reopenIssueWithComment/index.js
+++ b/.github/actions/javascript/reopenIssueWithComment/index.js
@@ -11502,6 +11502,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/reviewerChecklist/index.js b/.github/actions/javascript/reviewerChecklist/index.js
index 0330a6ddf19e..602792f84411 100644
--- a/.github/actions/javascript/reviewerChecklist/index.js
+++ b/.github/actions/javascript/reviewerChecklist/index.js
@@ -11594,6 +11594,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js
index c45d37179ba5..45472c003c6d 100644
--- a/.github/actions/javascript/verifySignedCommits/index.js
+++ b/.github/actions/javascript/verifySignedCommits/index.js
@@ -11534,6 +11534,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 };
 const CONST = {
     ...GIT_CONST,
diff --git a/.github/libs/CONST.ts b/.github/libs/CONST.ts
index 35d6648e08fb..9548eacbe155 100644
--- a/.github/libs/CONST.ts
+++ b/.github/libs/CONST.ts
@@ -3,6 +3,7 @@ const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\
 const GIT_CONST = {
     GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
     APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
+    MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
 } as const;
 
 const CONST = {

From e61fa63cebb9fd828dd6e58e9b8eb90ca43913c7 Mon Sep 17 00:00:00 2001
From: Jan Nowakowski <janeknowakowski9@gmail.com>
Date: Mon, 24 Feb 2025 09:18:52 +0100
Subject: [PATCH 5/5] Apply suggestions

---
 .github/actions/javascript/postTestBuildComment/index.js  | 8 ++++----
 .../postTestBuildComment/postTestBuildComment.ts          | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js
index a5fab7df8d9a..d30aa17886e4 100644
--- a/.github/actions/javascript/postTestBuildComment/index.js
+++ b/.github/actions/javascript/postTestBuildComment/index.js
@@ -11542,11 +11542,11 @@ function getTestBuildMessage() {
     return message;
 }
 /** Comment on a single PR */
-async function commentPR(repo, PR, message) {
+async function commentPR(REPO, PR, message) {
     console.log(`Posting test build comment on #${PR}`);
     try {
-        await GithubUtils_1.default.createComment(repo, PR, message);
-        console.log(`Comment created on #${PR} successfully 🎉`);
+        await GithubUtils_1.default.createComment(REPO, PR, message);
+        console.log(`Comment created on #${PR} (${REPO}) successfully 🎉`);
     }
     catch (err) {
         console.log(`Unable to write comment on #${PR} 😞`);
@@ -11559,7 +11559,7 @@ async function run() {
     const PR_NUMBER = Number(core.getInput('PR_NUMBER', { required: true }));
     const REPO = String(core.getInput('REPO', { required: true }));
     if (REPO !== CONST_1.default.APP_REPO && REPO !== CONST_1.default.MOBILE_EXPENSIFY_REPO) {
-        core.setFailed(`Invalid repo: ${REPO}`);
+        core.setFailed(`Invalid repository used to place output comment: ${REPO}`);
         return;
     }
     const comments = await GithubUtils_1.default.paginate(GithubUtils_1.default.octokit.issues.listComments, {
diff --git a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
index bfd5003ca5ab..4a49eaf67eb1 100644
--- a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
+++ b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts
@@ -53,11 +53,11 @@ function getTestBuildMessage(): string {
 }
 
 /** Comment on a single PR */
-async function commentPR(repo: string, PR: number, message: string) {
+async function commentPR(REPO: string, PR: number, message: string) {
     console.log(`Posting test build comment on #${PR}`);
     try {
-        await GithubUtils.createComment(repo, PR, message);
-        console.log(`Comment created on #${PR} successfully 🎉`);
+        await GithubUtils.createComment(REPO, PR, message);
+        console.log(`Comment created on #${PR} (${REPO}) successfully 🎉`);
     } catch (err) {
         console.log(`Unable to write comment on #${PR} 😞`);
 
@@ -72,7 +72,7 @@ async function run() {
     const REPO = String(core.getInput('REPO', {required: true}));
 
     if (REPO !== CONST.APP_REPO && REPO !== CONST.MOBILE_EXPENSIFY_REPO) {
-        core.setFailed(`Invalid repo: ${REPO}`);
+        core.setFailed(`Invalid repository used to place output comment: ${REPO}`);
         return;
     }
 
