diff --git a/libs/remix-ui/git/src/components/github/repositoryselect.tsx b/libs/remix-ui/git/src/components/github/repositoryselect.tsx index afbace7e32..5a57cbc0c6 100644 --- a/libs/remix-ui/git/src/components/github/repositoryselect.tsx +++ b/libs/remix-ui/git/src/components/github/repositoryselect.tsx @@ -45,7 +45,7 @@ const RepositorySelect = (props: RepositorySelectProps) => { const repo = context.repositories.find(repo => { return repo.id.toString() === value.toString() }) - + if (repo) { props.select(repo) await actions.remoteBranches(repo.owner.login, repo.name) @@ -64,7 +64,7 @@ const RepositorySelect = (props: RepositorySelectProps) => { }; return ( - <> { diff --git a/libs/remix-ui/git/src/lib/gitactions.ts b/libs/remix-ui/git/src/lib/gitactions.ts index 91587220d0..8ae2202082 100644 --- a/libs/remix-ui/git/src/lib/gitactions.ts +++ b/libs/remix-ui/git/src/lib/gitactions.ts @@ -488,7 +488,7 @@ export const repositories = async () => { } else { plugin.call('notification', 'alert', { title: 'Error getting repositories', - message: `Please check your GitHub token in the GitHub settings. It needs to have access to the repositories.` + message: `Please check your GitHub token in the GitHub settings... cannot connect to GitHub` }) dispatch(setRepos([])) } @@ -558,12 +558,8 @@ export const remoteCommits = async (url: string, branch: string, length: number) } else { sendToGitLog({ type: 'error', - message: `Please check your GitHub token in the GitHub settings. It needs to have access to the commits.` + message: `Please check your GitHub token in the GitHub settings.` }) - //plugin.call('notification', 'alert', { - // title: 'Error getting commits', - // message: `Please check your GitHub token in the GitHub settings. It needs to have access to the commits.` - //}) } } catch (e) { console.log(e) diff --git a/libs/remix-ui/git/src/state/gitreducer.tsx b/libs/remix-ui/git/src/state/gitreducer.tsx index 400d3052b3..d344a6c4ca 100644 --- a/libs/remix-ui/git/src/state/gitreducer.tsx +++ b/libs/remix-ui/git/src/state/gitreducer.tsx @@ -182,10 +182,19 @@ export const gitReducer = (state: gitState = defaultGitState, action: Action): g } case 'SET_LOG': + const previousLog = [...state.log] + // check if the new message is the same as the last + if (previousLog.length > 0 && previousLog[previousLog.length - 1].message === action.payload.message) { + return { + ...state, + log: previousLog + } + } return { ...state, - log: [...state.log, action.payload] + log: [...previousLog, action.payload] } + case 'CLEAR_LOG': return {