diff --git a/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/AddBranchComponent.js b/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/AddBranchComponent.js index 408cf22c..ac68a73d 100644 --- a/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/AddBranchComponent.js +++ b/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/AddBranchComponent.js @@ -55,10 +55,10 @@ export default function AddBranchComponent(props) { const branchNameVal = event.target.value; if ( event.target.id === "branchName" && - branchNameVal.match(/[^a-zA-Z0-9_]/gi) + branchNameVal.match(/[^a-zA-Z0-9_.:^\\/]/gi) ) { event.target.value = branchNameVal.replace( - /[^a-zA-Z0-9_]/gi, + /[^a-zA-Z0-9_.:^\\/]/gi, "-" ); } diff --git a/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/FetchPullActionComponent.js b/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/FetchPullActionComponent.js index 71c6b6e3..c202aaa5 100644 --- a/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/FetchPullActionComponent.js +++ b/src/Components/DashBoard/Repository/RepoComponents/RepoDetailBackdrop/FetchPullActionComponent.js @@ -4,10 +4,14 @@ import { globalAPIEndpoint, ROUTE_REPO_DETAILS, } from "../../../../../util/env_config"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { library } from "@fortawesome/fontawesome-svg-core"; +import { fas } from "@fortawesome/free-solid-svg-icons"; import { v4 as uuid } from "uuid"; export default function FetchFromRemoteComponent(props) { + library.add(fas); const { repoId, actionType } = props; const [remoteData, setRemoteData] = useState(); @@ -94,7 +98,7 @@ export default function FetchFromRemoteComponent(props) { } } - function actionHandler(remote, branch) { + function actionHandler(remote = "", branch = "") { setLoading(true); const getAxiosRequestBody = (remote, branch) => { @@ -178,6 +182,21 @@ export default function FetchFromRemoteComponent(props) { return ( <>
+ {actionType === "fetch" ? ( +
{ + actionHandler(); + }} + > +
+ +
+
Click here to Fetch globally without branch selection
+
+ ) : null}
Available remote repos
@@ -250,7 +269,7 @@ export default function FetchFromRemoteComponent(props) { {!loading && result && result.length > 0 ? ( <> -
+
{result.map((result) => { return (