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 2024/09/20 02:54:59 UTC
(incubator-devlake) 12/34: feat: adjust the github transformation cicd style
This is an automated email from the ASF dual-hosted git repository.
mintsweet pushed a commit to branch feat-dora-config
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 03bf73e2425b8097212cc320c6e082cd2f0a47a1
Author: mintsweet <0x...@gmail.com>
AuthorDate: Fri Sep 13 20:50:44 2024 +1200
feat: adjust the github transformation cicd style
---
.../src/plugins/register/github/transformation.tsx | 76 ++++++++++++----------
1 file changed, 40 insertions(+), 36 deletions(-)
diff --git a/config-ui/src/plugins/register/github/transformation.tsx b/config-ui/src/plugins/register/github/transformation.tsx
index fa6e05290..d8ec7cae1 100644
--- a/config-ui/src/plugins/register/github/transformation.tsx
+++ b/config-ui/src/plugins/register/github/transformation.tsx
@@ -273,42 +273,46 @@ const renderCollapseItems = ({
<Checkbox checked={useCustom} onChange={onChangeUseCustom}>
Convert a GitHub workflow run as a DevLake Deployment when:
</Checkbox>
- <div style={{ margin: '8px 0', paddingLeft: 28 }}>
- <span>
- The name of the <strong>GitHub workflow run</strong> or <strong> one of its jobs</strong> matches
- </span>
- <Input
- style={{ width: 180, margin: '0 8px' }}
- placeholder="(deploy|push-image)"
- value={transformation.deploymentPattern ?? ''}
- onChange={(e) =>
- onChangeTransformation({
- ...transformation,
- deploymentPattern: e.target.value,
- productionPattern: !e.target.value ? '' : transformation.productionPattern,
- })
- }
- />
- <i style={{ marginRight: 4, color: '#E34040' }}>*</i>
- <HelpTooltip content="GitHub Workflow Runs: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow" />
- </div>
- <div style={{ margin: '8px 0', paddingLeft: 28 }}>
- <span>If the name or its branch’s name also matches</span>
- <Input
- style={{ width: 180, margin: '0 8px' }}
- placeholder="prod(.*)"
- value={transformation.productionPattern ?? ''}
- onChange={(e) =>
- onChangeTransformation({
- ...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>
- <CheckMatchedItems plugin={plugin} connectionId={connectionId} transformation={transformation} />
+ {useCustom && (
+ <>
+ <div style={{ margin: '8px 0', paddingLeft: 28 }}>
+ <span>
+ The name of the <strong>GitHub workflow run</strong> or <strong> one of its jobs</strong> matches
+ </span>
+ <Input
+ style={{ width: 180, margin: '0 8px' }}
+ placeholder="(deploy|push-image)"
+ value={transformation.deploymentPattern ?? ''}
+ onChange={(e) =>
+ onChangeTransformation({
+ ...transformation,
+ deploymentPattern: e.target.value,
+ productionPattern: !e.target.value ? '' : transformation.productionPattern,
+ })
+ }
+ />
+ <i style={{ marginRight: 4, color: '#E34040' }}>*</i>
+ <HelpTooltip content="GitHub Workflow Runs: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow" />
+ </div>
+ <div style={{ margin: '8px 0', paddingLeft: 28 }}>
+ <span>If the name or its branch’s name also matches</span>
+ <Input
+ style={{ width: 180, margin: '0 8px' }}
+ placeholder="prod(.*)"
+ value={transformation.productionPattern ?? ''}
+ onChange={(e) =>
+ onChangeTransformation({
+ ...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>
+ <CheckMatchedItems plugin={plugin} connectionId={connectionId} transformation={transformation} />
+ </>
+ )}
</>
),
},