diff --git a/src/components/git/PullRequestDialog.tsx b/src/components/git/PullRequestDialog.tsx index 557d7558..ec72296c 100644 --- a/src/components/git/PullRequestDialog.tsx +++ b/src/components/git/PullRequestDialog.tsx @@ -115,20 +115,6 @@ export function PullRequestDialog({ } }, [git, projectPath]); - useEffect(() => { - if (isOpen && remoteUrl) { - parseRemoteUrl(remoteUrl); - loadRemoteBranches(); - } - }, [isOpen, remoteUrl, loadRemoteBranches]); - - // Check permissions after remoteInfo is set - useEffect(() => { - if (remoteInfo && remoteUrl) { - checkPermissionsAndFork(); - } - }, [remoteInfo, remoteUrl, checkPermissionsAndFork]); - const checkPermissionsAndFork = useCallback(async () => { if (!remoteInfo || !remoteUrl) { console.log('checkPermissionsAndFork: No remoteInfo or remoteUrl'); @@ -177,6 +163,20 @@ export function PullRequestDialog({ } }, [remoteInfo, remoteUrl, settings.credentials]); + useEffect(() => { + if (isOpen && remoteUrl) { + parseRemoteUrl(remoteUrl); + loadRemoteBranches(); + } + }, [isOpen, remoteUrl, loadRemoteBranches]); + + // Check permissions after remoteInfo is set + useEffect(() => { + if (remoteInfo && remoteUrl) { + checkPermissionsAndFork(); + } + }, [remoteInfo, remoteUrl, checkPermissionsAndFork]); + const parseRemoteUrl = (url: string) => { setError(null); try {