Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Expensify/App into kadie-pdf-index
Browse files Browse the repository at this point in the history
  • Loading branch information
kadiealexander committed Dec 11, 2023
2 parents d553f84 + e1d334a commit 670d5d3
Show file tree
Hide file tree
Showing 1,316 changed files with 38,066 additions and 28,255 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/node_modules/*
**/dist/*
.github/actions/**/index.js"
docs/vendor/**
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ const restrictedImportPaths = [
importNames: ['TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight'],
message: "Please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
},
{
name: 'react-native-safe-area-context',
importNames: ['useSafeAreaInsets', 'SafeAreaConsumer', 'SafeAreaInsetsContext'],
message: "Please use 'useSafeAreaInsets' from 'src/hooks/useSafeAreaInset' and/or 'SafeAreaConsumer' from 'src/components/SafeAreaConsumer' instead.",
},
];

const restrictedImportPatterns = [
Expand Down
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# Every PR gets a review from an internal Expensify engineer
* @Expensify/pullerbear

# Every PR that touches redirects gets reviewed by ring0
docs/redirects.csv @Expensify/infra
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ $ https://github.com/Expensify/App/issues/<issueID(comment)>
Do NOT only link the issue number like this: $ #<issueID>
--->
$
PROPOSAL:
$
PROPOSAL:


### Tests
Expand Down Expand Up @@ -98,7 +98,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
- [ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
- [ ] If a new CSS style is added I verified that:
- [ ] A similar style doesn't already exist
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/StyleUtils.js) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)`)
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/utils/index.ts) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)`)
- [ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/composite/setupGitForOSBotifyApp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ runs:
shell: bash
run: |
if [[ -f .github/workflows/OSBotify-private-key.asc.gpg ]]; then
echo "::set-output name=key_exists::true"
echo "key_exists=true" >> "$GITHUB_OUTPUT"
fi
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
if: steps.key_check.outputs.key_exists != 'true'
with:
sparse-checkout: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Set up Node
runs:
using: composite
steps:
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
},
DATE_FORMAT_STRING: 'yyyy-MM-dd',
};

CONST.APP_REPO_URL = `https://github.com/${CONST.GITHUB_OWNER}/${CONST.APP_REPO}`;
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/awaitStagingDeploys/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ inputs:
description: If provided, this action will only wait for a deploy matching this tag.
required: false
runs:
using: 'node16'
using: 'node20'
main: './index.js'
1 change: 1 addition & 0 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
},
DATE_FORMAT_STRING: 'yyyy-MM-dd',
};

CONST.APP_REPO_URL = `https://github.com/${CONST.GITHUB_OWNER}/${CONST.APP_REPO}`;
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/bumpVersion/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ outputs:
NEW_VERSION:
description: The new semver version of the application, updated in the JS and native layers.
runs:
using: 'node16'
using: 'node20'
main: './index.js'
2 changes: 1 addition & 1 deletion .github/actions/javascript/checkDeployBlockers/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ outputs:
HAS_DEPLOY_BLOCKERS:
description: A true/false indicating whether or not a deploy blocker was found.
runs:
using: 'node16'
using: 'node20'
main: 'index.js'
1 change: 1 addition & 0 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
},
DATE_FORMAT_STRING: 'yyyy-MM-dd',
};

CONST.APP_REPO_URL = `https://github.com/${CONST.GITHUB_OWNER}/${CONST.APP_REPO}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ inputs:
GITHUB_TOKEN:
description: Auth token for New Expensify Github
required: true
NPM_VERSION:
description: The new NPM version of the StagingDeployCash issue.
required: false

runs:
using: 'node16'
using: 'node20'
main: './index.js'
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const fs = require('fs');
const format = require('date-fns/format');
const _ = require('underscore');
const core = require('@actions/core');
const moment = require('moment');
const CONST = require('../../../libs/CONST');
const GithubUtils = require('../../../libs/GithubUtils');
const GitUtils = require('../../../libs/GitUtils');

async function run() {
const newVersion = core.getInput('NPM_VERSION');
console.log('New version found from action input:', newVersion);
// Note: require('package.json').version does not work because ncc will resolve that to a plain string at compile time
const newVersionTag = JSON.parse(fs.readFileSync('package.json')).version;

try {
// Start by fetching the list of recent StagingDeployCash issues, along with the list of open deploy blockers
Expand Down Expand Up @@ -35,14 +36,12 @@ async function run() {
const currentChecklistData = shouldCreateNewDeployChecklist ? {} : GithubUtils.getStagingDeployCashData(mostRecentChecklist);

// Find the list of PRs merged between the current checklist and the previous checklist
// Note that any time we're creating a new checklist we MUST have `NPM_VERSION` passed in as an input
const newTag = newVersion || _.get(currentChecklistData, 'tag');
const mergedPRs = await GitUtils.getPullRequestsMergedBetween(previousChecklistData.tag, newTag);
const mergedPRs = await GitUtils.getPullRequestsMergedBetween(previousChecklistData.tag, newVersionTag);

// Next, we generate the checklist body
let checklistBody = '';
if (shouldCreateNewDeployChecklist) {
checklistBody = await GithubUtils.generateStagingDeployCashBody(newTag, _.map(mergedPRs, GithubUtils.getPullRequestURLFromNumber));
checklistBody = await GithubUtils.generateStagingDeployCashBody(newVersionTag, _.map(mergedPRs, GithubUtils.getPullRequestURLFromNumber));
} else {
// Generate the updated PR list, preserving the previous state of `isVerified` for existing PRs
const PRList = _.reduce(
Expand Down Expand Up @@ -94,9 +93,9 @@ async function run() {
});
}

const didVersionChange = newVersion ? newVersion !== currentChecklistData.tag : false;
const didVersionChange = newVersionTag !== currentChecklistData.tag;
checklistBody = await GithubUtils.generateStagingDeployCashBody(
newTag,
newVersionTag,
_.pluck(PRList, 'url'),
_.pluck(_.where(PRList, {isVerified: true}), 'url'),
_.pluck(deployBlockers, 'url'),
Expand All @@ -118,7 +117,7 @@ async function run() {
if (shouldCreateNewDeployChecklist) {
const {data: newChecklist} = await GithubUtils.octokit.issues.create({
...defaultPayload,
title: `Deploy Checklist: New Expensify ${moment().format('YYYY-MM-DD')}`,
title: `Deploy Checklist: New Expensify ${format(new Date(), CONST.DATE_FORMAT_STRING)}`,
labels: [CONST.LABELS.STAGING_DEPLOY],
assignees: [CONST.APPLAUSE_BOT],
});
Expand Down
Loading

0 comments on commit 670d5d3

Please sign in to comment.