Skip to content

Commit

Permalink
change Expensify url
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Aug 5, 2021
1 parent 21a1458 commit 4bddf27
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/libs/GithubUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {throttling} = require('@octokit/plugin-throttling');

const GITHUB_OWNER = 'Expensify';
const EXPENSIFY_CASH_REPO = 'Expensify.cash';
const EXPENSIFY_CASH_URL = 'https://github.com/Expensify/Expensify.cash';
const EXPENSIFY_CASH_URL = 'https://github.com/Expensify/App';

const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
const PULL_REQUEST_REGEX = new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`);
Expand Down Expand Up @@ -219,7 +219,7 @@ class GithubUtils {

// Tag version and comparison URL
// eslint-disable-next-line max-len
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/Expensify.cash/compare/production...staging\r\n`;
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`;

// PR list
if (!_.isEmpty(sortedPRList)) {
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Security Rules 🔐
1. Do **not** use `pull_request_target` trigger unless an external fork needs access to secrets, or a _write_ `GITHUB_TOKEN`.
1. Do **not ever** write a `pull_request_target` trigger with an explicit PR checkout, e.g. using `actions/checkout@v2`. This is [discussed further here](https://securitylab.github.com/research/github-actions-preventing-pwn-requests)
1. **Do use** the `pull_request` trigger as it does not send internal secrets and only grants a _read_ `GITHUB_TOKEN`.
1. **Do use** the `pull_request` trigger as it does not send internal secrets and only grants a _read_ `GITHUB_TOKEN`.
1. If an external action needs access to any secret (`GITHUB_TOKEN` or internal secret), use the commit hash of the workflow to prevent a modification of underlying source code at that version. For example:
1. **Bad:** `hmarr/[email protected]` Relies on the tag
1. **Good:** `hmarr/auto-approve-action@7782c7e2bdf62b4d79bdcded8332808fd2f179cd` Explicit Git hash
Expand All @@ -25,7 +25,7 @@ The GitHub workflows require a large list of secrets to deploy, notify and test
4. `ios/Certificates.p12.gpg`
2. `SLACK_WEBHOOK` - Sends Slack notifications via Slack WebHook https://expensify.slack.com/services/B01AX48D7MM
3. `OS_BOTIFY_TOKEN` - Personal access token for @OSBotify user in GitHub
4. `CLA_BOTIFY_TOKEN` - Personal access token for @CLABotify user in GitHub
4. `CLA_BOTIFY_TOKEN` - Personal access token for @CLABotify user in GitHub
5. `CSC_LINK` - Required to be set for desktop code signing: https://www.electron.build/code-signing.html#travis-appveyor-and-other-ci-servers
6. `CSC_KEY_PASSWORD` - Required to be set for desktop code signing: https://www.electron.build/code-signing.html#travis-appveyor-and-other-ci-servers
7. `APPLE_ID` - Required for notarizing desktop code in `desktop/notarize.js`
Expand All @@ -42,7 +42,7 @@ The GitHub workflows require a large list of secrets to deploy, notify and test

All these _workflows_ are comprised of atomic _actions_. Most of the time, we can use pre-made and independently maintained actions to create powerful workflows that meet our needs. However, when we want to do something very specific or have a more complex or robust action in mind, we can create our own _actions_.

All our actions are stored in the neighboring directory [`.github/actions`](https://github.com/Expensify/Expensify.cash/tree/main/.github/actions). Each action is a module comprised of three parts:
All our actions are stored in the neighboring directory [`.github/actions`](https://github.com/Expensify/App/tree/main/.github/actions). Each action is a module comprised of three parts:

1) An [action metadata file](https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/creating-a-javascript-action#creating-an-action-metadata-file) called `action.yml`. This describes the action, gives it a name, and defines its inputs and outputs.
2) A Node.js script, whose name matches the module. This is where you can implement the custom logic for your action.
Expand All @@ -69,7 +69,7 @@ In order to bundle actions with their dependencies into a single Node.js executa
- Use the absolute path of the action in GitHub, including the repo name, path, and branch ref, like so:
```yaml
- name: Generate Version
uses: Expensify/Expensify.cash/.github/actions/bumpVersion@main
uses: Expensify/App/.github/actions/bumpVersion@main
```
Do not try to use a relative path.
- Confusingly, paths in action metadata files (`action.yml`) _must_ use relative paths.
Expand All @@ -78,11 +78,11 @@ In order to bundle actions with their dependencies into a single Node.js executa

## Imperative Workflows

We have a unique way of defining certain workflows which can be manually triggered by the `workflow_dispatch` event. See `createNewVersion.yml` and `updateProtectedBranch.yml` for examples. Used in combination with the custom [`triggerWorkflowAndWait` action](https://github.com/Expensify/Expensify.cash/blob/d07dcf4e3e0b3f11bec73726856e6d5f8624704c/.github/actions/triggerWorkflowAndWait/triggerWorkflowAndWait.js), workflows can be synchronously executed like a function from another workflow, like this:
We have a unique way of defining certain workflows which can be manually triggered by the `workflow_dispatch` event. See `createNewVersion.yml` and `updateProtectedBranch.yml` for examples. Used in combination with the custom [`triggerWorkflowAndWait` action](https://github.com/Expensify/App/blob/d07dcf4e3e0b3f11bec73726856e6d5f8624704c/.github/actions/triggerWorkflowAndWait/triggerWorkflowAndWait.js), workflows can be synchronously executed like a function from another workflow, like this:

```yaml
- name: Create new BUILD version
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: createNewVersion.yml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create new BUILD version
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: createNewVersion.yml
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Get merge commit for CP pull request
id: getCPMergeCommit
uses: Expensify/Expensify.cash/.github/actions/getMergeCommitForPullRequest@main
uses: Expensify/App/.github/actions/getMergeCommitForPullRequest@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_NUMBER: ${{ github.event.inputs.PULL_REQUEST_NUMBER }}
Expand All @@ -94,7 +94,7 @@ jobs:
- name: Get merge commit for version-bump pull request
id: getVersionBumpMergeCommit
uses: Expensify/Expensify.cash/.github/actions/getMergeCommitForPullRequest@main
uses: Expensify/App/.github/actions/getMergeCommitForPullRequest@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USER: OSBotify
Expand Down Expand Up @@ -132,12 +132,12 @@ jobs:
destination_branch: staging
github_token: ${{ secrets.OS_BOTIFY_TOKEN }}
pr_title: '🍒 Cherry pick PR #${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒'
pr_body: '🍒 Cherry pick https://github.com/Expensify/Expensify.cash/pull/${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒'
pr_body: '🍒 Cherry pick https://github.com/Expensify/App/pull/${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒'
pr_label: automerge

- name: Check if pull request is mergeable
id: isPullRequestMergeable
uses: Expensify/Expensify.cash/.github/actions/isPullRequestMergeable@main
uses: Expensify/App/.github/actions/isPullRequestMergeable@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_NUMBER: ${{ steps.createPullRequest.outputs.pr_number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/createNewVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Generate version
id: bumpVersion
uses: Expensify/Expensify.cash/.github/actions/bumpVersion@main
uses: Expensify/App/.github/actions/bumpVersion@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
SEMVER_LEVEL: ${{ github.event.inputs.SEMVER_LEVEL }}
Expand All @@ -56,7 +56,7 @@ jobs:
git push origin ${{ env.VERSION_BRANCH }}
- name: Update main branch
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: updateProtectedBranch.yml
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ jobs:

- name: Get Release Pull Request List
id: getReleasePRList
uses: Expensify/Expensify.cash/.github/actions/getDeployPullRequestList@main
uses: Expensify/App/.github/actions/getDeployPullRequestList@main
with:
TAG: ${{ env.PRODUCTION_VERSION }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
IS_PRODUCTION_DEPLOY: true

- name: Generate Release Body
id: getReleaseBody
uses: Expensify/Expensify.cash/.github/actions/getReleaseBody@main
uses: Expensify/App/.github/actions/getReleaseBody@main
with:
PR_LIST: ${{ steps.getReleasePRList.outputs.PR_LIST }}

Expand All @@ -79,4 +79,3 @@ jobs:

env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

4 changes: 2 additions & 2 deletions .github/workflows/deployBlocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
echo "DEPLOY_BLOCKER_TITLE=$(sed -e "s/'/'\\\\''/g; s/\`/\\\\\`/g; 1s/^/'/; \$s/\$/'/" <<< ${{ github.event.pull_request.title }})" >> $GITHUB_ENV
- name: Update StagingDeployCash with new deploy blocker
uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@main
uses: Expensify/App/.github/actions/createOrUpdateStagingDeploy@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
github_token: ${{ secrets.OS_BOTIFY_TOKEN }}
number: ${{ env.DEPLOY_BLOCKER_NUMBER }}
body: |
:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! [Check out the open `StagingDeployCash` deploy checklist](https://github.com/Expensify/Expensify.cash/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) to see the list of PRs included in this release, then work quickly to do one of the following:
:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! [Check out the open `StagingDeployCash` deploy checklist](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) to see the list of PRs included in this release, then work quickly to do one of the following:
1. Identify the pull request that introduced this issue and revert it.
2. Find someone who can quickly fix the issue.
3. Fix the issue yourself.
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/finishReleaseCycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
steps:
- name: Check for any deploy blockers
id: checkDeployBlockers
uses: Expensify/Expensify.cash/.github/actions/checkDeployBlockers@main
uses: Expensify/App/.github/actions/checkDeployBlockers@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}

- name: Reopen and comment on issue
if: ${{ steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS == 'true' }}
uses: Expensify/Expensify.cash/.github/actions/reopenIssueWithComment@main
uses: Expensify/App/.github/actions/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
Expand All @@ -45,7 +45,7 @@ jobs:
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Update production branch
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: updateProtectedBranch.yml
Expand All @@ -71,14 +71,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create new BUILD version
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: createNewVersion.yml
INPUTS: '{ "SEMVER_LEVEL": "BUILD" }'

- name: Update staging branch to trigger staging deploy
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: updateProtectedBranch.yml
Expand All @@ -96,7 +96,7 @@ jobs:
run: git tag ${{ env.NEW_VERSION }}

- name: Create new StagingDeployCash
uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@main
uses: Expensify/App/.github/actions/createOrUpdateStagingDeploy@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NPM_VERSION: ${{ env.NEW_VERSION }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lockDeploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create new PATCH version
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: createNewVersion.yml
INPUTS: '{ "SEMVER_LEVEL": "PATCH" }'

- name: Update staging branch
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: updateProtectedBranch.yml
Expand All @@ -47,7 +47,7 @@ jobs:
run: git tag ${{ env.NEW_VERSION }}

- name: Update StagingDeployCash
uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@main
uses: Expensify/App/.github/actions/createOrUpdateStagingDeploy@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NPM_VERSION: ${{ env.NEW_VERSION }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ jobs:

- name: Determine if this was a cherry-pick
id: isStagingDeployLocked
uses: Expensify/Expensify.cash/.github/actions/isStagingDeployLocked@main
uses: Expensify/App/.github/actions/isStagingDeployLocked@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -343,14 +343,14 @@ jobs:

- name: Get Release Pull Request List
id: getReleasePRList
uses: Expensify/Expensify.cash/.github/actions/getDeployPullRequestList@main
uses: Expensify/App/.github/actions/getDeployPullRequestList@main
with:
TAG: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
IS_PRODUCTION_DEPLOY: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}

- name: Comment on issues
uses: Expensify/Expensify.cash/.github/actions/markPullRequestsAsDeployed@main
uses: Expensify/App/.github/actions/markPullRequestsAsDeployed@main
with:
PR_LIST: ${{ steps.getReleasePRList.outputs.PR_LIST }}
IS_PRODUCTION_DEPLOY: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Check if StagingDeployCash is locked
id: isStagingDeployLocked
uses: Expensify/Expensify.cash/.github/actions/isStagingDeployLocked@main
uses: Expensify/App/.github/actions/isStagingDeployLocked@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

Expand Down Expand Up @@ -73,15 +73,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create new BUILD version
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: createNewVersion.yml
INPUTS: '{ "SEMVER_LEVEL": "BUILD" }'

- name: Update staging branch from main
if: ${{ needs.chooseDeployActions.outputs.isStagingDeployLocked == 'false' }}
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: updateProtectedBranch.yml
Expand All @@ -99,14 +99,14 @@ jobs:

- name: Cherry pick to staging
if: ${{ needs.chooseDeployActions.outputs.isStagingDeployLocked == 'true' && needs.chooseDeployActions.outputs.shouldCherryPick == 'true' }}
uses: Expensify/Expensify.cash/.github/actions/triggerWorkflowAndWait@main
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
WORKFLOW: cherryPick.yml
INPUTS: '{ "PULL_REQUEST_NUMBER": "${{ needs.chooseDeployActions.outputs.mergedPullRequest }}", "NEW_VERSION": "${{ env.NEW_VERSION }}" }'

- name: Update StagingDeployCash
uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@main
uses: Expensify/App/.github/actions/createOrUpdateStagingDeploy@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NPM_VERSION: ${{ env.NEW_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/updateProtectedBranch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

- name: Check if pull request is mergeable
id: isPullRequestMergeable
uses: Expensify/Expensify.cash/.github/actions/isPullRequestMergeable@main
uses: Expensify/App/.github/actions/isPullRequestMergeable@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_NUMBER: ${{ steps.createPullRequest.outputs.pr_number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/warnCPLabel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: |
:warning: :warning: **Heads up! This pull request has the `CP Staging` label.** :warning: :warning:
Merging it will cause it to be immediately deployed to staging, _even if the [open `StagingDeployCash` deploy checklist](https://github.com/Expensify/Expensify.cash/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) is locked._
Merging it will cause it to be immediately deployed to staging, _even if the [open `StagingDeployCash` deploy checklist](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) is locked._
# This Slack step is duplicated in all workflows, if you make a change to this step, make sure to update all
# the other workflows with the same change
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<a href="https://new.expensify.com">
<img src="https://raw.githubusercontent.com/Expensify/Expensify.cash/main/web/favicon.png" width="64" height="64" alt="New Expensify Icon">
<img src="https://raw.githubusercontent.com/Expensify/App/main/web/favicon.png" width="64" height="64" alt="New Expensify Icon">
</a>
<h1>
<a href="https://new.expensify.com">
Expand Down
2 changes: 1 addition & 1 deletion src/CONST.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4bddf27

Please sign in to comment.