Merge pull request #31141 from overleaf/cd-adjust-githubworkflow-error-message-for-non-project-owners

Add GitHub error message for non-project owners

GitOrigin-RevId: 954c5ae45cee9de22df20acfe26867d50b049100
This commit is contained in:
Chris Dryden
2026-02-03 11:17:18 +00:00
committed by Copybot
parent 0cabc81d46
commit fa4a8a0333
3 changed files with 35 additions and 0 deletions
@@ -741,6 +741,7 @@
"github_workflow_authorize": "",
"github_workflow_files_delete_github_repo": "",
"github_workflow_files_error": "",
"github_workflow_files_error_non_owner": "",
"give_feedback": "",
"give_your_feedback": "",
"go_next_page": "",
+1
View File
@@ -943,6 +943,7 @@
"github_workflow_authorize": "Authorize GitHub Workflow files",
"github_workflow_files_delete_github_repo": "The repository has been created on GitHub but linking was unsuccessful. You will have to delete GitHub repository or choose a new name.",
"github_workflow_files_error": "The __appName__ GitHub sync service couldnt sync GitHub Workflow files (in .github/workflows/). Please authorize __appName__ to edit your GitHub workflow files and try again.",
"github_workflow_files_error_non_owner": "The __appName__ GitHub sync service couldnt sync GitHub Workflow files (in .github/workflows/). Please ensure the project owner has authorized __appName__ to edit this projects GitHub workflow files and try again.",
"give_feedback": "Give feedback",
"give_your_feedback": "give your feedback",
"global": "global",
@@ -51,6 +51,7 @@ import { ReferencesContext } from '@/features/ide-react/context/references-conte
import { useEditorAnalytics } from '@/shared/hooks/use-editor-analytics'
import { DetachCompileContext } from '@/shared/context/detach-compile-context'
import { type CompileContext } from '@/shared/context/local-compile-context'
import { EditorContext } from '@/shared/context/editor-context'
// these constants can be imported in tests instead of
// using magic strings
@@ -255,6 +256,11 @@ export function EditorProviders({
...providers,
}
// Only use the mock EditorProvider when explicitly required
if (providers.EditorProvider) {
customProviders.EditorProvider = providers.EditorProvider
}
// Only override DetachCompileProvider when we need the mock
if (mockCompileOnLoad) {
customProviders.DetachCompileProvider =
@@ -267,6 +273,33 @@ export function EditorProviders({
)
}
export function makeEditorProvider({ isProjectOwner = true } = {}) {
const EditorProvider: FC<PropsWithChildren> = ({ children }) => {
const value = {
isProjectOwner,
renameProject: () => {},
isPendingEditor: false,
deactivateTutorial: () => {},
inactiveTutorials: [],
currentPopup: null,
setCurrentPopup: () => {},
hasPremiumSuggestion: false,
setHasPremiumSuggestion: () => {},
premiumSuggestionResetDate: new Date(),
setPremiumSuggestionResetDate: () => {},
writefullInstance: null,
setWritefullInstance: () => {},
showUpgradeModal: false,
setShowUpgradeModal: () => {},
}
return (
<EditorContext.Provider value={value}>{children}</EditorContext.Provider>
)
}
return EditorProvider
}
const makeReferencesProvider = () => {
const ReferencesProvider: FC<PropsWithChildren> = ({ children }) => {
return (