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/11/09 01:43:51 UTC

(incubator-devlake) branch fix-github-transformation created (now 7046e8bd3)

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

mintsweet pushed a change to branch fix-github-transformation
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at 7046e8bd3 fix(config-ui): copywriting for github transformation

This branch includes the following new commits:

     new 7046e8bd3 fix(config-ui): copywriting for github transformation

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.



(incubator-devlake) 01/01: fix(config-ui): copywriting for github transformation

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

mintsweet pushed a commit to branch fix-github-transformation
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 7046e8bd390df25aa252fcc418293ecdaae82ba5
Author: mintsweet <0x...@gmail.com>
AuthorDate: Thu Nov 9 14:43:39 2023 +1300

    fix(config-ui): copywriting for github transformation
---
 .../src/plugins/register/github/transformation.tsx | 145 +++++++++++----------
 1 file changed, 74 insertions(+), 71 deletions(-)

diff --git a/config-ui/src/plugins/register/github/transformation.tsx b/config-ui/src/plugins/register/github/transformation.tsx
index da0279c65..e010f5b3f 100644
--- a/config-ui/src/plugins/register/github/transformation.tsx
+++ b/config-ui/src/plugins/register/github/transformation.tsx
@@ -188,77 +188,80 @@ export const GitHubTransformation = ({ entities, transformation, setTransformati
         </div>
       )}
       {entities.includes('CICD') && (
-        <S.CICD>
-          <h2>CI/CD</h2>
-          <h3>
-            <span>Deployment</span>
-            <Tag minimal intent={Intent.PRIMARY} style={{ marginLeft: 8 }}>
-              DORA
-            </Tag>
-          </h3>
-          <p style={{ marginBottom: 16 }}>
-            Use Regular Expression to define Deployments in DevLake in order to measure DORA metrics.{' '}
-            <ExternalLink link={DOC_URL.PLUGIN.GITHUB.TRANSFORMATION}>Learn more</ExternalLink>
-          </p>
-          <div className="text">
-            <Checkbox disabled checked />
-            <span>Convert a GitHub Deployment to a DevLake Deployment </span>
-          </div>
-          <div className="sub-text">
-            <span>If its environment name matches</span>
-            <InputGroup
-              style={{ width: 180, margin: '0 8px' }}
-              placeholder="(?i)prod(.*)"
-              value={transformation.envNamePattern}
-              onChange={(e) =>
-                setTransformation({
-                  ...transformation,
-                  envNamePattern: e.target.value,
-                })
-              }
-            />
-            <span>, this deployment is a ‘Production Deployment’</span>
-          </div>
-          <div className="text">
-            <Checkbox checked={useCustom} onChange={handleChangeUseCustom} />
-            <span>Convert a GitHub workflow run as a DevLake Deployment when: </span>
-          </div>
-          <div className="sub-text">
-            <span>
-              The name of the <strong>GitHub workflow run</strong> or <strong> one of its jobs</strong> matches
-            </span>
-            <InputGroup
-              style={{ width: 180, margin: '0 8px' }}
-              placeholder="(deploy|push-image)"
-              value={transformation.deploymentPattern ?? ''}
-              onChange={(e) =>
-                setTransformation({
-                  ...transformation,
-                  deploymentPattern: e.target.value,
-                  productionPattern: !e.target.value ? '' : transformation.productionPattern,
-                })
-              }
-            />
-            <i style={{ color: '#E34040' }}>*</i>
-            <HelpTooltip content="GitHub Workflow Runs: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow" />
-          </div>
-          <div className="sub-text">
-            <span>If the name also matches</span>
-            <InputGroup
-              style={{ width: 180, margin: '0 8px' }}
-              placeholder="prod(.*)"
-              value={transformation.productionPattern ?? ''}
-              onChange={(e) =>
-                setTransformation({
-                  ...transformation,
-                  productionPattern: e.target.value,
-                })
-              }
-            />
-            <span>, this deployment is a ‘Production Deployment’</span>
-            <HelpTooltip content="If you leave this field empty, all Deployments will be tagged as in the Production environment. " />
-          </div>
-        </S.CICD>
+        <>
+          <S.CICD>
+            <h2>CI/CD</h2>
+            <h3>
+              <span>Deployment</span>
+              <Tag minimal intent={Intent.PRIMARY} style={{ marginLeft: 8 }}>
+                DORA
+              </Tag>
+            </h3>
+            <p style={{ marginBottom: 16 }}>
+              Use Regular Expression to define Deployments in DevLake in order to measure DORA metrics.{' '}
+              <ExternalLink link={DOC_URL.PLUGIN.GITHUB.TRANSFORMATION}>Learn more</ExternalLink>
+            </p>
+            <div className="text">
+              <Checkbox disabled checked />
+              <span>Convert a GitHub Deployment to a DevLake Deployment </span>
+            </div>
+            <div className="sub-text">
+              <span>If its environment name matches</span>
+              <InputGroup
+                style={{ width: 180, margin: '0 8px' }}
+                placeholder="(?i)prod(.*)"
+                value={transformation.envNamePattern}
+                onChange={(e) =>
+                  setTransformation({
+                    ...transformation,
+                    envNamePattern: e.target.value,
+                  })
+                }
+              />
+              <span>, this deployment is a ‘Production Deployment’</span>
+            </div>
+            <div className="text">
+              <Checkbox checked={useCustom} onChange={handleChangeUseCustom} />
+              <span>Convert a GitHub workflow run as a DevLake Deployment when: </span>
+            </div>
+            <div className="sub-text">
+              <span>
+                The name of the <strong>GitHub workflow run</strong> or <strong> one of its jobs</strong> matches
+              </span>
+              <InputGroup
+                style={{ width: 180, margin: '0 8px' }}
+                placeholder="(deploy|push-image)"
+                value={transformation.deploymentPattern ?? ''}
+                onChange={(e) =>
+                  setTransformation({
+                    ...transformation,
+                    deploymentPattern: e.target.value,
+                    productionPattern: !e.target.value ? '' : transformation.productionPattern,
+                  })
+                }
+              />
+              <i style={{ color: '#E34040' }}>*</i>
+              <HelpTooltip content="GitHub Workflow Runs: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow" />
+            </div>
+            <div className="sub-text">
+              <span>If the name or its branch’s name also matches</span>
+              <InputGroup
+                style={{ width: 180, margin: '0 8px' }}
+                placeholder="prod(.*)"
+                value={transformation.productionPattern ?? ''}
+                onChange={(e) =>
+                  setTransformation({
+                    ...transformation,
+                    productionPattern: e.target.value,
+                  })
+                }
+              />
+              <span>, this deployment is a ‘Production Deployment’</span>
+              <HelpTooltip content="If you leave this field empty, all Deployments will be tagged as in the Production environment. " />
+            </div>
+          </S.CICD>
+          <Divider />
+        </>
       )}
       {entities.includes('CODEREVIEW') && (
         <div>