diff --git a/libs/remix-ui/git/src/components/buttons/sourcecontrolbuttons.tsx b/libs/remix-ui/git/src/components/buttons/sourcecontrolbuttons.tsx index ce70ae3170..02c6c960af 100644 --- a/libs/remix-ui/git/src/components/buttons/sourcecontrolbuttons.tsx +++ b/libs/remix-ui/git/src/components/buttons/sourcecontrolbuttons.tsx @@ -33,7 +33,8 @@ export const SourceControlButtons = () => { } const push = async () => { - await actions.pull(getRemoteName(), branch ? branch.name : context.currentBranch.name) + await actions.push(getRemoteName(), branch ? branch.name : context.currentBranch.name) + await actions.fetch(getRemoteName(), branch ? branch.name : context.currentBranch.name, null, null, true) } const sync = async () => { diff --git a/libs/remix-ui/git/src/components/panels/commands/pushpull.tsx b/libs/remix-ui/git/src/components/panels/commands/pushpull.tsx index e4a531ec0a..89975bb9a5 100644 --- a/libs/remix-ui/git/src/components/panels/commands/pushpull.tsx +++ b/libs/remix-ui/git/src/components/panels/commands/pushpull.tsx @@ -47,7 +47,8 @@ export const PushPull = () => { const push = async () => { console.log('PUSH', context.upstream, localBranch, remoteBranch, force) - actions.push(context.upstream.remote, localBranch, remoteBranch, force) + await actions.push(context.upstream.remote, localBranch, remoteBranch, force) + await actions.fetch(context.upstream.remote, localBranch, remoteBranch, 1, true) } const pull = async () => { diff --git a/libs/remix-ui/git/src/components/panels/commits/commitsummary.tsx b/libs/remix-ui/git/src/components/panels/commits/commitsummary.tsx index f19b15b7a9..271b345d42 100644 --- a/libs/remix-ui/git/src/components/panels/commits/commitsummary.tsx +++ b/libs/remix-ui/git/src/components/panels/commits/commitsummary.tsx @@ -1,6 +1,11 @@ import { ReadCommitResult } from "isomorphic-git" import { default as dateFormat } from "dateformat"; import React from "react"; +import { faGlobe } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { remote } from "@remix-ui/git"; +import GitUIButton from "../../buttons/gituibutton"; +import { gitPluginContext } from "../../gitui"; export interface CommitSummaryProps { commit: ReadCommitResult; @@ -9,6 +14,7 @@ export interface CommitSummaryProps { export const CommitSummary = (props: CommitSummaryProps) => { const { commit, checkout } = props; + const context = React.useContext(gitPluginContext) const getDate = (commit: ReadCommitResult) => { const timestamp = commit.commit.author.timestamp; @@ -38,6 +44,15 @@ export const CommitSummary = (props: CommitSummaryProps) => { return ""; }; + const getRemote = (): remote | null => { + return context.upstream ? context.upstream : context.defaultRemote ? context.defaultRemote : null + } + + const openRemote = () => { + if(getRemote()) + window.open(`${getRemote().url}/commit/${commit.oid}`, '_blank'); + } + return ( <>