Skip to content

Commit

Permalink
Merge branch 'main' into feature/40998-improve-task-replies
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisl authored May 1, 2024
2 parents 857433f + a7f8e68 commit 8eab7df
Show file tree
Hide file tree
Showing 408 changed files with 10,514 additions and 6,122 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ module.exports = {
},
},
],
'rulesdir/avoid-anonymous-functions': 'off',
},
},
// This helps disable the `prefer-alias` rule to be enabled for specific directories
Expand Down Expand Up @@ -276,5 +277,11 @@ module.exports = {
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
},
},
{
files: ['en.ts', 'es.ts'],
rules: {
'rulesdir/use-periods-for-error-messages': 'error',
},
},
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {promiseDoWhile} from '@github/libs/promiseWhile';
type CurrentStagingDeploys = Awaited<ReturnType<typeof GitHubUtils.octokit.actions.listWorkflowRuns>>['data']['workflow_runs'];

function run() {
console.info('[awaitStagingDeploys] POLL RATE', CONST.POLL_RATE);
console.info('[awaitStagingDeploys] run()');
console.info('[awaitStagingDeploys] getStringInput', getStringInput);
console.info('[awaitStagingDeploys] GitHubUtils', GitHubUtils);
Expand Down
8 changes: 7 additions & 1 deletion .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12131,6 +12131,7 @@ const CONST_1 = __importDefault(__nccwpck_require__(9873));
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296));
const promiseWhile_1 = __nccwpck_require__(9438);
function run() {
console.info('[awaitStagingDeploys] POLL RATE', CONST_1.default.POLL_RATE);
console.info('[awaitStagingDeploys] run()');
console.info('[awaitStagingDeploys] getStringInput', ActionUtils_1.getStringInput);
console.info('[awaitStagingDeploys] GitHubUtils', GithubUtils_1.default);
Expand Down Expand Up @@ -12742,7 +12743,12 @@ function promiseWhile(condition, action) {
resolve();
return;
}
Promise.resolve(actionResult).then(loop).catch(reject);
Promise.resolve(actionResult)
.then(() => {
// Set a timeout to delay the next loop iteration
setTimeout(loop, 1000); // 1000 ms delay
})
.catch(reject);
}
};
loop();
Expand Down
7 changes: 6 additions & 1 deletion .github/libs/promiseWhile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ function promiseWhile(condition: () => boolean, action: (() => Promise<void>) |
return;
}

Promise.resolve(actionResult).then(loop).catch(reject);
Promise.resolve(actionResult)
.then(() => {
// Set a timeout to delay the next loop iteration
setTimeout(loop, 1000); // 1000 ms delay
})
.catch(reject);
}
};
loop();
Expand Down
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 1001046602
versionName "1.4.66-2"
versionCode 1001046803
versionName "1.4.68-3"
// 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
11 changes: 10 additions & 1 deletion assets/images/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion assets/images/back-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
15 changes: 15 additions & 0 deletions assets/images/invoice-generic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion assets/images/play.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions assets/images/receipt-scan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 6 additions & 10 deletions config/webpack/webpack.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ const getConfiguration = (environment: Environment): Promise<Configuration> =>
process.env.USE_WEB_PROXY === 'false'
? {}
: {
proxy: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'/api': 'http://[::1]:9000',
// eslint-disable-next-line @typescript-eslint/naming-convention
'/staging': 'http://[::1]:9000',
// eslint-disable-next-line @typescript-eslint/naming-convention
'/chat-attachments': 'http://[::1]:9000',
// eslint-disable-next-line @typescript-eslint/naming-convention
'/receipts': 'http://[::1]:9000',
},
proxy: [
{
context: ['/api', '/staging', '/chat-attachments', '/receipts'],
target: 'http://[::1]:9000',
},
],
};

const baseConfig = getCommonConfiguration(environment);
Expand Down
Loading

0 comments on commit 8eab7df

Please sign in to comment.