This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 1a537dc62 fix(github): update prBodyClosePattern to adapt new github
options (#4029)
1a537dc62 is described below
commit 1a537dc62db4c45b5463ec4e59edf14549e0f77a
Author: Warren Chen <[email protected]>
AuthorDate: Tue Dec 27 11:13:51 2022 +0800
fix(github): update prBodyClosePattern to adapt new github options (#4029)
---
.../components/advanced-editor/example/index.ts | 12 +++++++++
.../components/advanced-editor/example/tapd.ts | 30 +++++++++++++++++++++
.../components/advanced-editor/example/zentao.ts | 31 ++++++++++++++++++++++
config-ui/src/pages/configure/settings/github.jsx | 2 +-
.../github/components/code-review/index.tsx | 2 +-
plugins/github/github.go | 2 +-
6 files changed, 76 insertions(+), 3 deletions(-)
diff --git
a/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts
b/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts
index b722140fd..c4a0e23a8 100644
--- a/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts
+++ b/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts
@@ -26,6 +26,8 @@ import jenkins from './jenkins'
import feishu from './feishu'
import dbt from './dbt'
import starrocks from './starrocks'
+import tapd from './tapd'
+import zentao from './zentao'
export const EXAMPLE_CONFIG = [
{
@@ -73,6 +75,16 @@ export const EXAMPLE_CONFIG = [
name: 'Load DBT Configuration',
config: dbt
},
+ {
+ id: 'tapd',
+ name: 'Load TAPD Configuration',
+ config: tapd
+ },
+ {
+ id: 'zentao',
+ name: 'Load ZENTAO Configuration',
+ config: zentao
+ },
{
id: 'starrocks',
name: 'Load StarRocks Configuration',
diff --git
a/config-ui/src/pages/blueprint/components/advanced-editor/example/tapd.ts
b/config-ui/src/pages/blueprint/components/advanced-editor/example/tapd.ts
new file mode 100644
index 000000000..c607c2650
--- /dev/null
+++ b/config-ui/src/pages/blueprint/components/advanced-editor/example/tapd.ts
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+export default [
+ [
+ {
+ plugin: 'tapd',
+ options: {
+ companyId: 1,
+ workspaceId: 1,
+ connectionId: 1
+ }
+ }
+ ]
+]
diff --git
a/config-ui/src/pages/blueprint/components/advanced-editor/example/zentao.ts
b/config-ui/src/pages/blueprint/components/advanced-editor/example/zentao.ts
new file mode 100644
index 000000000..997642c6f
--- /dev/null
+++ b/config-ui/src/pages/blueprint/components/advanced-editor/example/zentao.ts
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+export default [
+ [
+ {
+ plugin: 'zentao',
+ options: {
+ connectionId: 1,
+ productId: 1,
+ projectId: 1,
+ executionId: 1
+ }
+ }
+ ]
+]
diff --git a/config-ui/src/pages/configure/settings/github.jsx
b/config-ui/src/pages/configure/settings/github.jsx
index b63c51c2c..ec2e45803 100644
--- a/config-ui/src/pages/configure/settings/github.jsx
+++ b/config-ui/src/pages/configure/settings/github.jsx
@@ -375,7 +375,7 @@ export default function GithubSettings(props) {
className='textarea'
value={transformation?.prBodyClosePattern}
// eslint-disable-next-line max-len
-
placeholder='(?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\s]*.*(((and
)?(#|https:\/\/github.com\/%s\/%s\/issues\/)\d+[ ]*)+)'
+
placeholder='(?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\s]*.*(((and
)?(#|https:\/\/github.com\/%s\/issues\/)\d+[ ]*)+)'
onChange={(e) =>
onSettingsChange({ prBodyClosePattern: e.target.value })
}
diff --git a/config-ui/src/plugins/github/components/code-review/index.tsx
b/config-ui/src/plugins/github/components/code-review/index.tsx
index 05811faf2..71f76be2c 100644
--- a/config-ui/src/plugins/github/components/code-review/index.tsx
+++ b/config-ui/src/plugins/github/components/code-review/index.tsx
@@ -124,7 +124,7 @@ export const CodeReview = ({
>
<TextArea
value={transformation.prBodyClosePattern}
-
placeholder='(?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\s]*.*(((and
)?(#|https:\/\/github.com\/%s\/%s\/issues\/)\d+[ ]*)+)'
+
placeholder='(?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\s]*.*(((and
)?(#|https:\/\/github.com\/%s\/issues\/)\d+[ ]*)+)'
onChange={(e) =>
setTransformation({
...transformation,
diff --git a/plugins/github/github.go b/plugins/github/github.go
index 8e88fe1d8..6ee06b22c 100644
--- a/plugins/github/github.go
+++ b/plugins/github/github.go
@@ -39,7 +39,7 @@ func main() {
prType := cmd.Flags().String("prType", "type/(.*)$", "pr type")
prComponent := cmd.Flags().String("prComponent", "component/(.*)$", "pr
component")
- prBodyClosePattern := cmd.Flags().String("prBodyClosePattern",
"(?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\\s]*.*(((and
)?(#|https:\\/\\/github.com\\/%s\\/%s\\/issues\\/)\\d+[ ]*)+)", "pr body close
pattern")
+ prBodyClosePattern := cmd.Flags().String("prBodyClosePattern",
"(?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\\s]*.*(((and
)?(#|https:\\/\\/github.com\\/%s\\/issues\\/)\\d+[ ]*)+)", "pr body close
pattern")
issueSeverity := cmd.Flags().String("issueSeverity", "severity/(.*)$",
"issue severity")
issuePriority := cmd.Flags().String("issuePriority",
"^(highest|high|medium|low)$", "issue priority")
issueComponent := cmd.Flags().String("issueComponent",
"component/(.*)$", "issue component")