|
|
@ -116,7 +116,6 @@ export const showCurrentBranch = async () => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const branch = await currentBranch(); |
|
|
|
const branch = await currentBranch(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(setCanCommit((branch && branch.name !== ""))); |
|
|
|
dispatch(setCanCommit((branch && branch.name !== ""))); |
|
|
|
dispatch(setCurrentBranch(branch)); |
|
|
|
dispatch(setCurrentBranch(branch)); |
|
|
|
|
|
|
|
|
|
|
@ -490,7 +489,6 @@ export const remoteBranches = async (owner: string, repo: string) => { |
|
|
|
export const remoteCommits = async (url: string, branch: string, length: number) => { |
|
|
|
export const remoteCommits = async (url: string, branch: string, length: number) => { |
|
|
|
const urlParts = url.split("/"); |
|
|
|
const urlParts = url.split("/"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// check if it's github
|
|
|
|
// check if it's github
|
|
|
|
if (!urlParts[urlParts.length - 3].includes('github')) { |
|
|
|
if (!urlParts[urlParts.length - 3].includes('github')) { |
|
|
|
return |
|
|
|
return |
|
|
@ -564,7 +562,6 @@ export const loadGitHubUserFromToken = async () => { |
|
|
|
emails: userEmails |
|
|
|
emails: userEmails |
|
|
|
} = await plugin.call('dgitApi' as any, 'getGitHubUser', { token }); |
|
|
|
} = await plugin.call('dgitApi' as any, 'getGitHubUser', { token }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (data && data.emails && data.user && data.user.login) { |
|
|
|
if (data && data.emails && data.user && data.user.login) { |
|
|
|
|
|
|
|
|
|
|
|
const primaryEmail = data.emails.find(email => email.primary) |
|
|
|
const primaryEmail = data.emails.find(email => email.primary) |
|
|
|