From 4ddd3ee772c2474479c141f0700a89dd6ad0b69e Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 12 Mar 2025 11:40:12 +0000 Subject: [PATCH] Check for changed files since last merge in GitHub Sync modal (#24180) GitOrigin-RevId: 4cd55e1501648f0a18b77be5af19deb0773d6881 --- .../web/app/src/Features/Project/ProjectGetter.js | 11 +++++++++++ services/web/frontend/extracted-translations.json | 4 +++- services/web/locales/en.json | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/services/web/app/src/Features/Project/ProjectGetter.js b/services/web/app/src/Features/Project/ProjectGetter.js index 7edf08d7a2..cdc690f21a 100644 --- a/services/web/app/src/Features/Project/ProjectGetter.js +++ b/services/web/app/src/Features/Project/ProjectGetter.js @@ -152,6 +152,17 @@ const ProjectGetter = { 'deleterData.deletedProjectOwnerId': userId, }).exec() }, + + async getHistoryId(projectId) { + const project = await this.getProject(projectId, { + 'overleaf.history.id': 1, + }) + const historyId = project?.overleaf?.history?.id + if (!historyId) { + throw new OError('project does not have a history id', { projectId }) + } + return historyId + }, } module.exports = { diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index fd64863454..4aeedc04bf 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -238,6 +238,8 @@ "change_the_ownership_of_your_personal_projects": "", "change_to_group_plan": "", "change_to_this_plan": "", + "changed_file_count_since_last_merge": "", + "changed_file_count_since_last_merge_plural": "", "changes_the_color_scheme_of_the_code_editor": "", "changing_the_position_of_your_figure": "", "changing_the_position_of_your_table": "", @@ -274,7 +276,6 @@ "column_width_is_x_click_to_resize": "", "comment": "", "comment_submit_error": "", - "commit": "", "common": "", "common_causes_of_compile_timeouts_include": "", "commons_plan_tooltip": "", @@ -1046,6 +1047,7 @@ "no_actions": "", "no_borders": "", "no_caption": "", + "no_changed_files_since_last_merge": "", "no_comments": "", "no_comments_or_suggestions": "", "no_existing_password": "", diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 82d9f65fd4..c44b590552 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -304,6 +304,8 @@ "change_the_ownership_of_your_personal_projects": "Change the ownership of your personal projects to the new account. <0>Find out how to change project owner.", "change_to_group_plan": "Change to a group plan", "change_to_this_plan": "Change to this plan", + "changed_file_count_since_last_merge": "__count__ changed file in __appName__ since last merge", + "changed_file_count_since_last_merge_plural": "__count__ changed files in __appName__ since last merge", "changes_the_color_scheme_of_the_code_editor": "Changes the color scheme of the code editor", "changing_the_position_of_your_figure": "Changing the position of your figure", "changing_the_position_of_your_table": "Changing the position of your table", @@ -354,7 +356,6 @@ "column_width_is_x_click_to_resize": "Column width is __width__. Click to resize", "comment": "Comment", "comment_submit_error": "Sorry, there was a problem submitting your comment", - "commit": "Commit", "common": "Common", "common_causes_of_compile_timeouts_include": "Common causes of compile timeouts include", "commons_plan_tooltip": "You’re on the __plan__ plan because of your affiliation with __institution__. Click to find out how to make the most of your Overleaf premium features.", @@ -1382,6 +1383,7 @@ "no_articles_matching_your_tags": "There are no articles matching your tags", "no_borders": "No borders", "no_caption": "No caption", + "no_changed_files_since_last_merge": "No changed files in __appName__ since last merge", "no_comments": "No comments", "no_comments_or_suggestions": "No comments or suggestions", "no_existing_password": "Please use the password reset form to set your password",