Skip to content

Commit

Permalink
Merge branch 'main' into move-leave-button-into-row-of-the-report-det…
Browse files Browse the repository at this point in the history
…ails-page
  • Loading branch information
ZhenjaHorbach committed May 3, 2024
2 parents 8c5f825 + 7483d10 commit f02a4d4
Show file tree
Hide file tree
Showing 408 changed files with 12,616 additions and 5,768 deletions.
23 changes: 22 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const restrictedImportPatterns = [

module.exports = {
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-native-a11y/basic', 'plugin:@dword-design/import-alias/recommended', 'prettier'],
plugins: ['react-native-a11y'],
plugins: ['react-native-a11y', 'testing-library'],
parser: 'babel-eslint',
ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'],
env: {
Expand Down Expand Up @@ -122,13 +122,28 @@ module.exports = {
},
},
],
'rulesdir/avoid-anonymous-functions': 'off',
},
},
// This helps disable the `prefer-alias` rule to be enabled for specific directories
{
files: ['tests/**/*.js', 'tests/**/*.ts', 'tests/**/*.jsx', 'assets/**/*.js', '.storybook/**/*.js'],
rules: {'@dword-design/import-alias/prefer-alias': ['off']},
},
{
files: ['tests/**/*.js', 'tests/**/*.ts', 'tests/**/*.jsx', 'tests/**/*.tsx'],
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-debugging-utils': 'error',
'testing-library/no-manual-cleanup': 'error',
'testing-library/no-unnecessary-act': 'error',
'testing-library/prefer-find-by': 'error',
'testing-library/prefer-presence-queries': 'error',
'testing-library/prefer-screen-queries': 'error',
},
},
{
files: ['*.js', '*.jsx'],
settings: {
Expand Down Expand Up @@ -276,5 +291,11 @@ module.exports = {
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
},
},
{
files: ['en.ts', 'es.ts'],
rules: {
'rulesdir/use-periods-for-error-messages': 'error',
},
},
],
};
44 changes: 34 additions & 10 deletions .github/workflows/failureNotifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,49 @@ jobs:
});
return jobsData.data;
- name: Fetch Previous Workflow Run
id: previous-workflow-run
uses: actions/github-script@v7
with:
script: |
const runId = ${{ github.event.workflow_run.id }};
const allRuns = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'preDeploy.yml',
});
const filteredRuns = allRuns.data.workflow_runs.filter(run => run.actor.login !== 'OSBotify' && run.status !== 'cancelled');
const currentIndex = filteredRuns.findIndex(run => run.id === runId);
const previousRun = filteredRuns[currentIndex + 1];
return previousRun;
- name: Fetch Previous Workflow Run Jobs
id: previous-workflow-jobs
uses: actions/github-script@v7
with:
script: |
const previousRun = ${{ steps.previous-workflow-run.outputs.result }};
const runId = previousRun.id;
const jobsData = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runId,
});
return jobsData.data;
- name: Process Each Failed Job
uses: actions/github-script@v7
with:
script: |
const jobs = ${{ steps.fetch-workflow-jobs.outputs.result }};
const previousRun = ${{ steps.previous-workflow-run.outputs.result }};
const previousRunJobs = ${{ steps.previous-workflow-jobs.outputs.result }};
const headCommit = "${{ github.event.workflow_run.head_commit.id }}";
const prData = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: headCommit,
});
const pr = prData.data[0];
const prLink = pr.html_url;
const prAuthor = pr.user.login;
Expand All @@ -50,14 +80,8 @@ jobs:
if (jobs.jobs[i].conclusion == 'failure') {
const jobName = jobs.jobs[i].name;
const jobLink = jobs.jobs[i].html_url;
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
labels: failureLabel,
state: 'open'
});
const existingIssue = issues.data.find(issue => issue.title.includes(jobName));
if (!existingIssue) {
const previousJob = previousRunJobs.jobs.find(job => job.name === jobName);
if (previousJob?.conclusion === 'success') {
const annotations = await github.rest.checks.listAnnotations({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001046700
versionName "1.4.67-0"
versionCode 1001047001
versionName "1.4.70-1"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
Loading

0 comments on commit f02a4d4

Please sign in to comment.