You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2023/12/05 08:28:06 UTC

(incubator-devlake) branch refactor-6307-1 updated (43e915f60 -> 39027d62e)

This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a change to branch refactor-6307-1
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


    omit 43e915f60 refactor(config-ui): use new ui alert to replace old alert component
     add 131488266 feat(db): add date relation fields to devops tables (#6499)
     add 502ef1de6 fix: incorrect datetime value: '0000-00-00' for column latest_updated… (#6541)
     add 38abeb5f3 refactor: gitlab adopts new remote api helper (#6546)
     add c90f77a64 fix: config-ui is expecting the parentId to be null for the search remote api (#6547)
     add 09457a1e2 docs: update remote api swagger doc for github/ and gitlab (#6549)
     add e2afe72d4 refactor: extract MakePipelinePlanTask function (#6550)
     add 2650d6fe3 fix: gitlab remote scope api not working correctly (#6553)
     add 5581670a1 refactor: jenkins adopts new dshelpers (#6554)
     add 03e70d0b8 fix: github issue data too long for column type (#6560)
     add 21a14b88b fix: token expired may cause 500 error (#6561)
     add 0e7bf408a feat(config-ui): support new plugin circleci (#6537)
     add 01a5c3fa8 refactor(config-ui): use new ui card to replace old card component (#6545)
     new 39027d62e refactor(config-ui): use new ui alert to replace old alert component

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (43e915f60)
            \
             N -- N -- N   refs/heads/refactor-6307-1 (39027d62e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../models/domainlayer/devops/cicd_deployment.go   |   8 +-
 .../domainlayer/devops/cicd_deployment_commit.go   |  35 +--
 .../models/domainlayer/devops/cicd_pipeline.go     |  26 +-
 .../core/models/domainlayer/devops/cicd_task.go    |  26 +-
 .../account.go => domainlayer/devops/common.go}    |  27 +-
 backend/core/models/domainlayer/ticket/issue.go    |   2 +-
 ...0231122_add_some_date_field_in_devops_tables.go |  81 ++++++
 ...d_queued_duration_sec_field_in_devops_tables.go |  78 ++++++
 ... 20231205_modify_issue_original_type_length.go} |  26 +-
 backend/core/models/migrationscripts/register.go   |   3 +
 backend/core/plugin/api_client.go                  |  13 +
 .../helpers/pluginhelper/api/api_async_client.go   |  15 +-
 backend/helpers/pluginhelper/api/api_client.go     |  32 ++-
 backend/helpers/pluginhelper/api/api_collector.go  |   7 +-
 .../helpers/pluginhelper/api/api_collector_test.go |   4 +-
 .../pluginhelper/api/api_collector_with_state.go   |   3 +-
 .../api/ds_remote_api_scope_list_helper.go         |   9 +-
 .../api/ds_remote_api_scope_search_helper.go       |  11 +-
 .../helpers/pluginhelper/api/model_api_helper.go   |   1 +
 .../api/models/ds_remote_api_scope_list_entry.go   |   4 +
 backend/helpers/pluginhelper/api/pipeline_plan.go  |  31 +++
 backend/helpers/pluginhelper/common/hooks.go       |  32 ---
 backend/helpers/srvhelper/scope_service_helper.go  |  13 +-
 backend/plugins/bamboo/e2e/job_build_test.go       |   6 +-
 .../snapshot_tables/_tool_bamboo_job_builds.csv    |  16 +-
 .../snapshot_tables/cicd_deployment_commits.csv    |  30 +--
 .../e2e/snapshot_tables/cicd_deployments.csv       |  30 +--
 .../bamboo/e2e/snapshot_tables/cicd_pipelines.csv  |  34 +--
 .../bamboo/e2e/snapshot_tables/cicd_tasks.csv      |  16 +-
 backend/plugins/bamboo/models/job_build.go         |   6 +
 .../20231128_add_queued_fields_in_job_builds.go}   |  29 +--
 .../bamboo/models/migrationscripts/register.go     |   1 +
 backend/plugins/bamboo/models/plan_build.go        |   3 +
 .../plugins/bamboo/tasks/deploy_build_convertor.go |  29 +--
 .../plugins/bamboo/tasks/job_build_convertor.go    |  24 +-
 .../plugins/bamboo/tasks/plan_build_convertor.go   |  20 +-
 .../bitbucket/e2e/snapshot_tables/cicd_tasks.csv   |  10 +-
 .../bitbucket/tasks/deployment_convertor.go        |  32 ++-
 .../plugins/bitbucket/tasks/pipeline_convertor.go  |  13 +-
 .../bitbucket/tasks/pipeline_steps_convertor.go    |  26 +-
 backend/plugins/circleci/e2e/job_test.go           |   4 +-
 .../e2e/raw_tables/_raw_circleci_api_jobs.csv      |   9 +
 .../e2e/snapshot_tables/_tool_circleci_jobs.csv    |  20 +-
 .../e2e/snapshot_tables/cicd_pipelines.csv         |  20 +-
 .../circleci/e2e/snapshot_tables/cicd_tasks.csv    |  20 +-
 backend/plugins/circleci/models/job.go             |   3 +
 .../20231129_add_fields_to_tool_circleci_jobs.go}  |  29 ++-
 .../circleci/models/migrationscripts/register.go   |   1 +
 backend/plugins/circleci/tasks/job_converter.go    |  28 ++-
 backend/plugins/circleci/tasks/job_extractor.go    |   2 +-
 .../plugins/circleci/tasks/workflow_converter.go   |  14 +-
 .../plugins/circleci/tasks/workflow_extractor.go   |   2 +-
 .../dora/tasks/deployment_commits_generator.go     |  16 +-
 backend/plugins/github/api/blueprint_v200.go       |  24 +-
 .../github/api/{remote.go => remote_api.go}        |  36 +--
 .../snapshot_tables/cicd_deployment_commits.csv    |  24 +-
 .../e2e/snapshot_tables/cicd_deployments.csv       |  24 +-
 .../github/e2e/snapshot_tables/cicd_pipelines.csv  |  72 +++---
 .../github/e2e/snapshot_tables/cicd_tasks.csv      |  72 +++---
 backend/plugins/github/models/issue.go             |   5 +-
 .../20231205_modify_issue_type_length.go}          |  29 ++-
 .../github/models/migrationscripts/register.go     |   1 +
 backend/plugins/github/tasks/cicd_job_convertor.go |  28 ++-
 backend/plugins/github/tasks/cicd_run_convertor.go |  27 +-
 .../plugins/github/tasks/deployment_convertor.go   |  18 +-
 backend/plugins/github/tasks/task_data.go          |   9 -
 .../tasks/deployment_collector_extractor.go        |   4 +-
 backend/plugins/gitlab/api/init.go                 |  23 +-
 backend/plugins/gitlab/api/proxy.go                |  39 ---
 backend/plugins/gitlab/api/remote.go               | 194 ---------------
 backend/plugins/gitlab/api/remote_api.go           | 272 +++++++++++++++++++++
 .../snapshot_tables/_tool_gitlab_deployments.csv   |  16 +-
 .../snapshot_tables/cicd_deployment_commits.csv    |  18 +-
 .../e2e/snapshot_tables/cicd_deployments.csv       |  18 +-
 .../gitlab/e2e/snapshot_tables/cicd_pipelines.csv  |  60 ++---
 .../gitlab/e2e/snapshot_tables/cicd_tasks.csv      | 152 ++++++------
 .../snapshot_tables/cicd_tasks_no_prod_regex.csv   | 152 ++++++------
 backend/plugins/gitlab/impl/impl.go                |   5 +-
 backend/plugins/gitlab/models/connection.go        |   2 +
 backend/plugins/gitlab/models/deployment.go        |   2 +-
 backend/plugins/gitlab/models/job.go               |  23 +-
 ...29_add_queued_duration_to_pipeline_and_task.go} |  39 +--
 .../gitlab/models/migrationscripts/register.go     |   1 +
 backend/plugins/gitlab/models/pipeline.go          |  15 +-
 backend/plugins/gitlab/models/project.go           |  14 +-
 .../plugins/gitlab/tasks/deployment_convertor.go   |  24 +-
 .../plugins/gitlab/tasks/deployment_extractor.go   |   1 +
 backend/plugins/gitlab/tasks/job_convertor.go      |  26 +-
 backend/plugins/gitlab/tasks/job_extractor.go      |  31 +--
 backend/plugins/gitlab/tasks/pipeline_convertor.go |  34 +--
 .../gitlab/tasks/pipeline_detail_extractor.go      |   2 +-
 backend/plugins/gitlab/tasks/pipeline_extractor.go |  16 +-
 backend/plugins/jenkins/api/blueprint_v200.go      |  79 +++---
 backend/plugins/jenkins/api/blueprint_v200_test.go | 111 ---------
 .../api/{connection.go => connection_api.go}       |  48 +---
 backend/plugins/jenkins/api/init.go                |  48 ++--
 backend/plugins/jenkins/api/proxy.go               |  73 ------
 backend/plugins/jenkins/api/remote.go              | 182 ++++++--------
 .../plugins/jenkins/api/{scope.go => scope_api.go} |  14 +-
 .../api/{scope_config.go => scope_config_api.go}   |  10 +-
 .../snapshot_tables/cicd_tasks_after_stages.csv    |  28 +--
 backend/plugins/jenkins/impl/impl.go               |  10 +-
 backend/plugins/jenkins/models/response.go         |   4 +-
 .../plugins/jenkins/tasks/build_cicd_convertor.go  |  32 ++-
 backend/plugins/jenkins/tasks/stage_convertor.go   |  23 +-
 backend/plugins/webhook/api/deployments.go         |  62 +++--
 config-ui/src/components/card/index.tsx            |  30 ---
 config-ui/src/components/index.ts                  |   1 -
 config-ui/src/components/no-data/index.tsx         |   3 +-
 .../src/pages/blueprint/detail/status-panel.tsx    |   3 +-
 .../src/pages/project/detail/settings-panel.tsx    |   3 +-
 .../plugins/components/scope-config-form/index.tsx |   4 +-
 .../src/plugins/register/circleci/assets/icon.svg  |  22 ++
 .../register/{pagerduty => circleci}/config.tsx    |  30 ++-
 .../register/{opsgenie => circleci}/index.ts       |   0
 config-ui/src/plugins/register/github/config.tsx   |   2 +-
 config-ui/src/plugins/register/gitlab/config.tsx   |   2 +-
 config-ui/src/plugins/register/index.ts            |   2 +
 config-ui/src/plugins/register/jenkins/config.tsx  |   2 +-
 config-ui/src/plugins/register/jira/config.tsx     |   2 +-
 config-ui/src/plugins/register/opsgenie/config.tsx |   2 +-
 .../src/plugins/register/pagerduty/config.tsx      |   2 +-
 .../src/plugins/register/sonarqube/config.tsx      |   2 +-
 config-ui/src/plugins/register/tapd/config.tsx     |   2 +-
 config-ui/src/plugins/register/zentao/config.tsx   |   2 +-
 config-ui/src/release/stable.ts                    |   3 +
 .../routes/error/components/exception/index.tsx    |   3 +-
 .../error/components/needs-db-migrate/index.tsx    |   3 +-
 .../src/routes/error/components/offline/index.tsx  |   3 +-
 config-ui/src/routes/pipeline/pipeline.tsx         |   3 +-
 130 files changed, 1733 insertions(+), 1654 deletions(-)
 copy backend/core/models/{migrationscripts/archived/account.go => domainlayer/devops/common.go} (66%)
 create mode 100644 backend/core/models/migrationscripts/20231122_add_some_date_field_in_devops_tables.go
 create mode 100644 backend/core/models/migrationscripts/20231128_add_queued_duration_sec_field_in_devops_tables.go
 copy backend/core/models/migrationscripts/{20230517_add_updated_date_to_issue_comments.go => 20231205_modify_issue_original_type_length.go} (64%)
 delete mode 100644 backend/helpers/pluginhelper/common/hooks.go
 copy backend/{core/models/migrationscripts/20230517_add_updated_date_to_issue_comments.go => plugins/bamboo/models/migrationscripts/20231128_add_queued_fields_in_job_builds.go} (55%)
 copy backend/plugins/{github/models/migrationscripts/20221230_add_std_type_to_githubissue.go => circleci/models/migrationscripts/20231129_add_fields_to_tool_circleci_jobs.go} (61%)
 rename backend/plugins/github/api/{remote.go => remote_api.go} (89%)
 copy backend/{core/models/migrationscripts/20230405_rename_tap_collector_state.go => plugins/github/models/migrationscripts/20231205_modify_issue_type_length.go} (64%)
 delete mode 100644 backend/plugins/gitlab/api/proxy.go
 delete mode 100644 backend/plugins/gitlab/api/remote.go
 create mode 100644 backend/plugins/gitlab/api/remote_api.go
 copy backend/{core/models/migrationscripts/20221117_add_project_to_blueprint.go => plugins/gitlab/models/migrationscripts/20231129_add_queued_duration_to_pipeline_and_task.go} (54%)
 delete mode 100644 backend/plugins/jenkins/api/blueprint_v200_test.go
 rename backend/plugins/jenkins/api/{connection.go => connection_api.go} (83%)
 delete mode 100644 backend/plugins/jenkins/api/proxy.go
 rename backend/plugins/jenkins/api/{scope.go => scope_api.go} (93%)
 rename backend/plugins/jenkins/api/{scope_config.go => scope_config_api.go} (94%)
 delete mode 100644 config-ui/src/components/card/index.tsx
 create mode 100644 config-ui/src/plugins/register/circleci/assets/icon.svg
 copy config-ui/src/plugins/register/{pagerduty => circleci}/config.tsx (71%)
 copy config-ui/src/plugins/register/{opsgenie => circleci}/index.ts (100%)


(incubator-devlake) 01/01: refactor(config-ui): use new ui alert to replace old alert component

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch refactor-6307-1
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 39027d62ee01cd4ce7fbb8c5bedbe245d523b695
Author: mintsweet <0x...@gmail.com>
AuthorDate: Fri Dec 1 13:22:49 2023 +1300

    refactor(config-ui): use new ui alert to replace old alert component
---
 config-ui/src/components/alert/index.tsx           | 35 ----------------------
 config-ui/src/components/index.ts                  |  1 -
 .../src/pages/project/detail/webhooks-panel.tsx    |  7 +++--
 .../plugins/components/scope-config-form/index.tsx |  6 ++--
 4 files changed, 7 insertions(+), 42 deletions(-)

diff --git a/config-ui/src/components/alert/index.tsx b/config-ui/src/components/alert/index.tsx
deleted file mode 100644
index 20bab99d0..000000000
--- a/config-ui/src/components/alert/index.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- *
- */
-
-import styled from 'styled-components';
-
-const Wrapper = styled.div`
-  padding: 24px;
-  background: #f0f4fe;
-  border: 1px solid #bdcefb;
-  border-radius: 4px;
-`;
-
-interface Props {
-  style?: React.CSSProperties;
-  content: React.ReactNode;
-}
-
-export const Alert = ({ style, content }: Props) => {
-  return <Wrapper style={style}>{content}</Wrapper>;
-};
diff --git a/config-ui/src/components/index.ts b/config-ui/src/components/index.ts
index 03ede2141..5981646c4 100644
--- a/config-ui/src/components/index.ts
+++ b/config-ui/src/components/index.ts
@@ -17,7 +17,6 @@
  */
 
 export * from './action';
-export * from './alert';
 export * from './buttons';
 export * from './dialog';
 export * from './divider';
diff --git a/config-ui/src/pages/project/detail/webhooks-panel.tsx b/config-ui/src/pages/project/detail/webhooks-panel.tsx
index a9a87b98e..18ca39a83 100644
--- a/config-ui/src/pages/project/detail/webhooks-panel.tsx
+++ b/config-ui/src/pages/project/detail/webhooks-panel.tsx
@@ -18,10 +18,11 @@
 
 import { useState, useMemo } from 'react';
 import { Link } from 'react-router-dom';
+import { Alert } from 'antd';
 import { Button, Intent } from '@blueprintjs/core';
 
 import API from '@/api';
-import { Alert, NoData } from '@/components';
+import { NoData } from '@/components';
 import type { WebhookItemType } from '@/plugins/register/webhook';
 import { WebhookCreateDialog, WebhookSelectorDialog, WebHookConnection } from '@/plugins/register/webhook';
 import { IProject } from '@/types';
@@ -110,8 +111,8 @@ export const WebhooksPanel = ({ project, onRefresh }: Props) => {
   return (
     <>
       <Alert
-        style={{ marginBottom: 24, color: '#3C5088' }}
-        content={
+        style={{ marginBottom: 24 }}
+        message={
           <>
             <div>
               The data pushed by Webhooks will only be calculated for DORA in the next run of the Blueprint of this
diff --git a/config-ui/src/plugins/components/scope-config-form/index.tsx b/config-ui/src/plugins/components/scope-config-form/index.tsx
index e9e4cb648..af8c19df3 100644
--- a/config-ui/src/plugins/components/scope-config-form/index.tsx
+++ b/config-ui/src/plugins/components/scope-config-form/index.tsx
@@ -18,11 +18,11 @@
 
 import { useState, useEffect, useMemo } from 'react';
 import { omit } from 'lodash';
-import { Form, Card } from 'antd';
+import { Form, Card, Alert } from 'antd';
 import { InputGroup, Button, Intent } from '@blueprintjs/core';
 
 import API from '@/api';
-import { Alert, ExternalLink, FormItem, MultiSelector, Message, Buttons, Divider } from '@/components';
+import { ExternalLink, FormItem, MultiSelector, Message, Buttons, Divider } from '@/components';
 import { transformEntities, EntitiesLabel } from '@/config';
 import { getPluginConfig } from '@/plugins';
 import { GitHubTransformation } from '@/plugins/register/github';
@@ -117,7 +117,7 @@ export const ScopeConfigForm = ({
       {TIPS_MAP[plugin] && (
         <Alert
           style={{ marginBottom: 24 }}
-          content={
+          message={
             <>
               To learn about how {TIPS_MAP[plugin].name} transformation is used in DevLake,{' '}
               <ExternalLink link={TIPS_MAP[plugin].link}>check out this doc</ExternalLink>.