Skip to content

Commit 3fcfff0

Browse files
committed
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-common-lib into feat/app-status-filters
2 parents 1189cdc + a0e2669 commit 3fcfff0

File tree

100 files changed

+2846
-1154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2846
-1154
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Increment tag for patch or minor
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- closed # Trigger only when a PR is closed (merged or not)
9+
10+
jobs:
11+
tag:
12+
if: github.event.pull_request.merged == true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Create new tag
21+
env:
22+
TOKEN: ${{ secrets.TAG_CREATION_TOKEN_PUBLIC }}
23+
run: |
24+
echo $TOKEN | gh auth login --with-token
25+
latest_tag=$(git tag | sort -V | tail -n 1)
26+
echo "Latest tag: $latest_tag"
27+
28+
# Extract major and minor versions
29+
version=$(echo $latest_tag | cut -d. -f1-2)
30+
# Extract patch version
31+
patch=$(echo $latest_tag | cut -d. -f3)
32+
# Extract minor version
33+
minor=$(echo $latest_tag | cut -d. -f2)
34+
major=$(echo $latest_tag | cut -d. -f1)
35+
36+
# Check if the incoming branch starts with 'release-candidate-'
37+
incoming_branch="${{ github.head_ref }}"
38+
if [[ "$incoming_branch" == release-candidate-* ]]; then
39+
# Increment minor version and reset patch
40+
new_minor=$((minor+1))
41+
new_tag="$major.$new_minor.0"
42+
echo "New tag will be (minor increment): $new_tag"
43+
else
44+
# Increment patch version
45+
new_tag="$version.$((patch+1))"
46+
echo "New tag will be (patch increment): $new_tag"
47+
fi
48+
49+
git config --global user.email "devops@devtron.ai"
50+
git config --global user.name "systemsdt"
51+
git tag $new_tag
52+
git push origin $new_tag

package-lock.json

Lines changed: 2 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.5.0-beta-9",
3+
"version": "0.5.8",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
@@ -83,7 +83,6 @@
8383
"react-dom": "^17.0.2",
8484
"react-draggable": "^4.4.5",
8585
"react-ga4": "^1.4.1",
86-
"react-keybind": "^0.9.4",
8786
"react-mde": "^11.5.0",
8887
"react-router-dom": "^5.3.0",
8988
"react-select": "5.8.0",
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

src/Assets/Icon/ic-file-code.svg

Lines changed: 7 additions & 0 deletions
Loading

src/Assets/Icon/ic-warning-y5.svg

Lines changed: 20 additions & 0 deletions
Loading

src/Common/ChartVersionAndTypeSelector.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@
1515
*/
1616

1717
import { useEffect, useState } from 'react'
18+
import { SelectPicker, SelectPickerVariantType } from '@Shared/Components'
1819
import { fetchChartTemplateVersions } from './Common.service'
19-
import { ChartVersionAndTypeSelectorProps, DeploymentChartVersionType } from './Types'
20+
import { ChartVersionAndTypeSelectorProps } from './Types'
2021
import { getFilteredChartVersions, showError } from './Helper'
21-
import { SelectPicker, SelectPickerVariantType } from '@Shared/Components'
22+
23+
interface DeploymentChartVersionType {
24+
chartRefId: number
25+
chartVersion: string
26+
chartType: string
27+
type: number
28+
}
2229

2330
// @TODO: Generalize this component to be used in CodeEditor as Chart selector toolbar
2431
// when the Code Editor is moved to the fe-common-lib
@@ -72,18 +79,17 @@ const ChartVersionAndTypeSelector = ({ setSelectedChartRefId }: ChartVersionAndT
7279
<div className="chart-type-options flex" data-testid="chart-type-options">
7380
<span className="cn-7 mr-4">Chart Type</span>
7481
<SelectPicker
75-
inputId='chart-type-select'
76-
label='Chart Type'
82+
inputId="chart-type-select"
7783
value={selectedChartType ?? chartTypeOptions[0]}
7884
options={chartTypeOptions}
7985
onChange={handleChartTypeChange}
8086
variant={SelectPickerVariantType.BORDER_LESS}
8187
/>
8288
</div>
8389
<div className="chart-version-options flex" data-testid="chart-version-options">
84-
<span className="cn-7 mr-4">Chart Version</span>
90+
<span className="cn-7 mr-4">Chart Version</span>
8591
<SelectPicker
86-
inputId='chart-version-select'
92+
inputId="chart-version-select"
8793
value={selectedChartVersion ?? chartVersionOptions[0]}
8894
options={chartVersionOptions}
8995
onChange={handleChartVersionChange}

src/Common/CodeEditor/CodeEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import ReactGA from 'react-ga4'
2121
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
2222
import { configureMonacoYaml } from 'monaco-yaml'
2323

24+
import { ReactComponent as ICWarningY5 } from '@Icons/ic-warning-y5.svg'
2425
import { ReactComponent as Info } from '../../Assets/Icon/ic-info-filled.svg'
2526
import { ReactComponent as ErrorIcon } from '../../Assets/Icon/ic-error-exclamation.svg'
26-
import { ReactComponent as WarningIcon } from '../../Assets/Icon/ic-warning.svg'
2727
import './codeEditor.scss'
2828
import 'monaco-editor'
2929

@@ -348,7 +348,7 @@ const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition = React.
348348
<CodeEditorPlaceholder customLoader={customLoader} />
349349
) : (
350350
<>
351-
{shebang && <div className="shebang">{shebang}</div>}
351+
{shebang && <div className="code-editor__shebang">{shebang}</div>}
352352
{state.diffMode ? (
353353
<MonacoDiffEditor
354354
original={
@@ -452,7 +452,7 @@ const ValidationError = () => {
452452

453453
const Warning: React.FC<InformationBarProps> = (props) => (
454454
<div className={`code-editor__warning ${props.className || ''}`}>
455-
<WarningIcon className="code-editor__information-info-icon" />
455+
<ICWarningY5 className="code-editor__information-info-icon" />
456456
{props.text}
457457
{props.children}
458458
</div>
@@ -476,7 +476,7 @@ const Information: React.FC<InformationBarProps> = (props) => (
476476

477477
const Clipboard = () => {
478478
const { state } = useCodeEditorContext()
479-
return <ClipboardButton content={state.code} rootClassName="bcn-1" iconSize={20} />
479+
return <ClipboardButton content={state.code} iconSize={16} />
480480
}
481481

482482
const SplitPane = ({}) => {

src/Common/CodeEditor/codeEditor.scss

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,6 @@
105105
min-height: 300px;
106106
}
107107

108-
.code-editor__warning {
109-
font-size: 12px;
110-
font-weight: 400;
111-
line-height: 1.33;
112-
letter-spacing: normal;
113-
color: var(--Y700);
114-
height: auto;
115-
padding: 8px 16px;
116-
border-bottom: 1px solid #d6dbdf;
117-
background-color: var(--Y100);
118-
}
119-
120108
.code-editor__information {
121109
font-size: 12px;
122110
font-weight: 400;
@@ -171,3 +159,9 @@
171159
z-index: 9;
172160
}
173161
}
162+
163+
.code-editor__shebang {
164+
padding: 0 52px;
165+
color: #151515;
166+
opacity: 0.6;
167+
}

0 commit comments

Comments
 (0)