mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-10 17:13:17 +02:00
Merge branch 'master' into develop
This commit is contained in:
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.27.2] - 2021-11-19
|
||||
### Fixed
|
||||
- Repository file search ([#1867](https://github.com/scm-manager/scm-manager/pull/1867))
|
||||
|
||||
## [2.27.1] - 2021-11-18
|
||||
### Fixed
|
||||
- Sporadic error "Automatic publicPath is not supported in this browser" (updated plugin-scripts to v1.2.2)
|
||||
@@ -835,3 +839,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
[2.26.1]: https://scm-manager.org/download/2.26.1
|
||||
[2.27.0]: https://scm-manager.org/download/2.27.0
|
||||
[2.27.1]: https://scm-manager.org/download/2.27.1
|
||||
[2.27.2]: https://scm-manager.org/download/2.27.2
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
# SOFTWARE.
|
||||
#
|
||||
group = sonia.scm
|
||||
version = 2.27.2-SNAPSHOT
|
||||
version = 2.27.2
|
||||
org.gradle.jvmargs=-Xmx1024M
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "2.27.2-SNAPSHOT"
|
||||
"version": "2.27.2"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-git-plugin",
|
||||
"private": true,
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.ts",
|
||||
"scripts": {
|
||||
@@ -11,7 +11,7 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.27.2-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.27.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/babel-preset": "^2.12.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-hg-plugin",
|
||||
"private": true,
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.ts",
|
||||
"scripts": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.27.2-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.27.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/babel-preset": "^2.12.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-legacy-plugin",
|
||||
"private": true,
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.tsx",
|
||||
"scripts": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.27.2-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.27.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/babel-preset": "^2.12.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-svn-plugin",
|
||||
"private": true,
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.ts",
|
||||
"scripts": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.27.2-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.27.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/babel-preset": "^2.12.0",
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# MIT License
|
||||
#
|
||||
# Copyright (c) 2020-present Cloudogu GmbH and Contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
|
||||
Feature: Repository File Search
|
||||
|
||||
Background:
|
||||
Given User is authenticated
|
||||
And A git repository exists
|
||||
|
||||
Scenario: Search file inside repository
|
||||
Given User has permission to read and write repository
|
||||
When User visits repository
|
||||
And User performs file search inside repository
|
||||
Then The search results are found
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
When("User visits repository", function() {
|
||||
cy.visit(`/repo/${this.repository.namespace}/${this.repository.name}/code/sources`);
|
||||
});
|
||||
|
||||
When("User performs file search inside repository", function() {
|
||||
cy.byTestId("file_search_button").click();
|
||||
cy.url().should("include", `/repo/${this.repository.namespace}/${this.repository.name}/code/search/main?q=`);
|
||||
cy.get("[data-testid=file_search_filter_input]").type("README");
|
||||
});
|
||||
|
||||
Then("The search results are found", function() {
|
||||
cy.get("[data-testid=file_search_single_result]").contains("README.md");
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/e2e-tests",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "End to end Tests for SCM-Manager",
|
||||
"main": "index.js",
|
||||
"author": "Eduard Heimbuch <eduard.heimbuch@cloudogu.com>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-api",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "React hook api for the SCM-Manager backend",
|
||||
"main": "src/index.ts",
|
||||
"files": [
|
||||
@@ -25,7 +25,7 @@
|
||||
"react-test-renderer": "^17.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-types": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.27.2",
|
||||
"fetch-mock-jest": "^1.5.1",
|
||||
"gitdiff-parser": "^0.1.2",
|
||||
"query-string": "5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-components",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "UI Components for SCM-Manager and its plugins",
|
||||
"main": "src/index.ts",
|
||||
"files": [
|
||||
@@ -25,7 +25,7 @@
|
||||
"@scm-manager/jest-preset": "^2.13.0",
|
||||
"@scm-manager/prettier-config": "^2.10.1",
|
||||
"@scm-manager/tsconfig": "^2.12.0",
|
||||
"@scm-manager/ui-tests": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-tests": "^2.27.2",
|
||||
"@storybook/addon-actions": "^6.3.12",
|
||||
"@storybook/addon-storyshots": "^6.3.12",
|
||||
"@storybook/builder-webpack5": "^6.3.12",
|
||||
@@ -67,9 +67,9 @@
|
||||
"worker-plugin": "^3.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-api": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-api": "^2.27.2",
|
||||
"@scm-manager/ui-extensions": "^2.27.2",
|
||||
"@scm-manager/ui-types": "^2.27.2",
|
||||
"classnames": "^2.2.6",
|
||||
"date-fns": "^2.4.1",
|
||||
"deepmerge": "^4.2.2",
|
||||
|
||||
@@ -67,20 +67,17 @@ const FilterInput: FC<Props> = ({ filter, value, testId, placeholder, autoFocus,
|
||||
};
|
||||
|
||||
return (
|
||||
<form
|
||||
className={classNames("input-field", className)}
|
||||
onSubmit={handleSubmit}
|
||||
{...createAttributesForTesting(testId)}
|
||||
>
|
||||
<form className={classNames("input-field", className)} onSubmit={handleSubmit}>
|
||||
<div className="control has-icons-left">
|
||||
<FixedHeightInput
|
||||
className="input"
|
||||
type="search"
|
||||
placeholder={placeholder || t("filterEntries")}
|
||||
value={stateValue}
|
||||
onChange={(event) => setStateValue(event.target.value)}
|
||||
onChange={event => setStateValue(event.target.value)}
|
||||
autoFocus={autoFocus || false}
|
||||
aria-describedby={id}
|
||||
{...createAttributesForTesting(testId)}
|
||||
/>
|
||||
<span className="icon is-small is-left">
|
||||
<i className="fas fa-filter" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-extensions",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"main": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
@@ -10,7 +10,7 @@
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-types": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.27.2",
|
||||
"react": "^17.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-plugins",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"ui-plugins": "./bin/ui-plugins.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-components": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-components": "^2.27.2",
|
||||
"@scm-manager/ui-extensions": "^2.27.2",
|
||||
"classnames": "^2.2.6",
|
||||
"query-string": "^5.0.1",
|
||||
"react": "^17.0.1",
|
||||
@@ -25,9 +25,9 @@
|
||||
"@scm-manager/plugin-scripts": "^1.2.2",
|
||||
"@scm-manager/prettier-config": "^2.10.1",
|
||||
"@scm-manager/tsconfig": "^2.12.0",
|
||||
"@scm-manager/ui-scripts": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-tests": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-scripts": "^2.27.2",
|
||||
"@scm-manager/ui-tests": "^2.27.2",
|
||||
"@scm-manager/ui-types": "^2.27.2",
|
||||
"@types/classnames": "^2.2.9",
|
||||
"@types/enzyme": "^3.10.3",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-polyfill",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "Polyfills for SCM-Manager UI",
|
||||
"main": "src/index.js",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-scripts",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "Build scripts for SCM-Manager",
|
||||
"main": "src/index.js",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-styles",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "Styles for SCM-Manager",
|
||||
"main": "src/scm.scss",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-tests",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "UI-Tests helpers",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-types",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"description": "Typescript types for SCM-Manager related Objects",
|
||||
"main": "src/index.ts",
|
||||
"files": [
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-webapp",
|
||||
"version": "2.27.2-SNAPSHOT",
|
||||
"version": "2.27.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-api": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-components": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-api": "^2.27.2",
|
||||
"@scm-manager/ui-components": "^2.27.2",
|
||||
"@scm-manager/ui-extensions": "^2.27.2",
|
||||
"classnames": "^2.2.5",
|
||||
"history": "^4.10.1",
|
||||
"i18next": "^19.6.0",
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/jest-preset": "^2.13.0",
|
||||
"@scm-manager/ui-tests": "^2.27.2-SNAPSHOT",
|
||||
"@scm-manager/ui-tests": "^2.27.2",
|
||||
"@types/classnames": "^2.2.9",
|
||||
"@types/enzyme": "^3.10.3",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
|
||||
@@ -39,7 +39,11 @@ const SearchIcon = styled(Icon)`
|
||||
const FileSearchButton: FC<Props> = ({ baseUrl, revision }) => {
|
||||
const [t] = useTranslation("repos");
|
||||
return (
|
||||
<Link to={`${baseUrl}/search/${encodeURIComponent(revision)}`} aria-label={t("fileSearch.button.title")}>
|
||||
<Link
|
||||
to={`${baseUrl}/search/${encodeURIComponent(revision)}`}
|
||||
aria-label={t("fileSearch.button.title")}
|
||||
data-testid="file_search_button"
|
||||
>
|
||||
<SearchIcon title={t("fileSearch.button.title")} name="search" color="inherit" />
|
||||
</Link>
|
||||
);
|
||||
|
||||
@@ -62,7 +62,7 @@ const PathResultRow: FC<PathResultRowProps> = ({ contentBaseUrl, path }) => {
|
||||
</Link>
|
||||
</IconColumn>
|
||||
<LeftOverflowTd>
|
||||
<Link title={path} to={link}>
|
||||
<Link title={path} to={link} data-testid="file_search_single_result">
|
||||
{path}
|
||||
</Link>
|
||||
</LeftOverflowTd>
|
||||
@@ -78,7 +78,7 @@ type ResultTableProps = {
|
||||
const ResultTable: FC<ResultTableProps> = ({ contentBaseUrl, paths }) => (
|
||||
<table className="table table-hover table-sm is-fullwidth">
|
||||
<tbody>
|
||||
{paths.map((path) => (
|
||||
{paths.map(path => (
|
||||
<PathResultRow contentBaseUrl={contentBaseUrl} path={path} />
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
@@ -28,7 +28,7 @@ import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
import { Branch, Repository } from "@scm-manager/ui-types";
|
||||
import { urls, usePaths } from "@scm-manager/ui-api";
|
||||
import { ErrorNotification, FilterInput, Help, Icon, Loading } from "@scm-manager/ui-components";
|
||||
import { createA11yId, ErrorNotification, FilterInput, Help, Icon, Loading } from "@scm-manager/ui-components";
|
||||
import CodeActionBar from "../components/CodeActionBar";
|
||||
import FileSearchResults from "../components/FileSearchResults";
|
||||
import { filepathSearch } from "../utils/filepathSearch";
|
||||
@@ -91,7 +91,7 @@ const FileSearch: FC<Props> = ({ repository, baseUrl, branches, selectedBranch }
|
||||
};
|
||||
|
||||
const contentBaseUrl = `${baseUrl}/sources/${revision}/`;
|
||||
const id = useA11yId("file-search");
|
||||
const id = createA11yId("file-search");
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -123,6 +123,7 @@ const FileSearch: FC<Props> = ({ repository, baseUrl, branches, selectedBranch }
|
||||
filter={search}
|
||||
autoFocus={true}
|
||||
id={id}
|
||||
testId="file_search_filter_input"
|
||||
/>
|
||||
<Help className="ml-3" message={t("fileSearch.input.help")} id={id} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user