mirror of
https://github.com/harness/drone.git
synced 2025-05-11 22:50:11 +08:00
Merge branch 'code-213-part2' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#41)
This commit is contained in:
commit
9c995d87a0
@ -14,6 +14,7 @@ import { Match, Case, Render } from 'react-jsx-match'
|
||||
import * as Diff2Html from 'diff2html'
|
||||
import cx from 'classnames'
|
||||
import { useGet } from 'restful-react'
|
||||
import { noop } from 'lodash-es'
|
||||
import { useStrings } from 'framework/strings'
|
||||
import type { GitInfoProps } from 'utils/GitUtils'
|
||||
import { formatNumber, getErrorMessage, voidFn } from 'utils/Utils'
|
||||
@ -214,6 +215,7 @@ export const Changes: React.FC<ChangesProps> = ({
|
||||
shouldHide={readOnly || pullRequestMetadata?.state === 'merged'}
|
||||
repoMetadata={repoMetadata}
|
||||
pullRequestMetadata={pullRequestMetadata}
|
||||
refreshPr={voidFn(noop)}
|
||||
/>
|
||||
{/* <ReviewDecisionButton
|
||||
repoMetadata={repoMetadata}
|
||||
|
@ -10,13 +10,13 @@ import {
|
||||
Text,
|
||||
useToaster
|
||||
} from '@harness/uicore'
|
||||
import { useHistory } from 'react-router-dom'
|
||||
import { useStrings } from 'framework/strings'
|
||||
import { CopyButton } from 'components/CopyButton/CopyButton'
|
||||
import { CodeIcon } from 'utils/GitUtils'
|
||||
import { useAppContext } from 'AppContext'
|
||||
import { generateAlphaNumericHash } from 'utils/Utils'
|
||||
import css from './CloneCredentialDialog.module.scss'
|
||||
import { useHistory } from 'react-router-dom'
|
||||
|
||||
interface CloneCredentialDialogProps {
|
||||
setFlag: (val: boolean) => void
|
||||
|
@ -50,6 +50,8 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
|
||||
}) => {
|
||||
const { getString } = useStrings()
|
||||
const { showError } = useToaster()
|
||||
const { hooks, standalone } = useAppContext()
|
||||
const space = useGetSpaceParam()
|
||||
const { mutate: mergePR, loading } = useMutate({
|
||||
verb: 'POST',
|
||||
path: `/api/v1/repos/${repoMetadata.path}/+/pullreq/${pullRequestMetadata.number}/merge`
|
||||
@ -88,8 +90,6 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
|
||||
if (pullRequestMetadata.state === PullRequestFilterOption.MERGED) {
|
||||
return <MergeInfo pullRequestMetadata={pullRequestMetadata} />
|
||||
}
|
||||
const { hooks, standalone } = useAppContext()
|
||||
const space = useGetSpaceParam()
|
||||
|
||||
const permPushResult = hooks?.usePermissionTranslate?.(
|
||||
{
|
||||
|
@ -24,12 +24,12 @@ import { CodeIcon, GitInfoProps } from 'utils/GitUtils'
|
||||
import { useDisableCodeMainLinks } from 'hooks/useDisableCodeMainLinks'
|
||||
import { useGetSpaceParam } from 'hooks/useGetSpaceParam'
|
||||
import { Images } from 'images'
|
||||
import { CopyButton } from 'components/CopyButton/CopyButton'
|
||||
import CloneCredentialDialog from 'components/CloneCredentialDialog/CloneCredentialDialog'
|
||||
import { RepositoryContent } from './RepositoryContent/RepositoryContent'
|
||||
import { RepositoryHeader } from './RepositoryHeader/RepositoryHeader'
|
||||
import { ContentHeader } from './RepositoryContent/ContentHeader/ContentHeader'
|
||||
import css from './Repository.module.scss'
|
||||
import { CopyButton } from 'components/CopyButton/CopyButton'
|
||||
import CloneCredentialDialog from 'components/CloneCredentialDialog/CloneCredentialDialog'
|
||||
|
||||
export default function Repository() {
|
||||
const { gitRef, resourcePath, repoMetadata, error, loading, refetch } = useGetRepositoryMetadata()
|
||||
|
Loading…
Reference in New Issue
Block a user