Skip to content

Commit c645bd4

Browse files
authored
Merge pull request #151 from devtron-labs/feat/release-v2
feat: releases v2
2 parents 2eecd9b + 371e90d commit c645bd4

File tree

27 files changed

+251
-79
lines changed

27 files changed

+251
-79
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
ci:
1313
runs-on: ubuntu-latest
14+
15+
if: ${{ !github.event.pull_request.draft }}
16+
1417
steps:
1518
- name: Checkout repository
1619
uses: actions/checkout@v4

.github/workflows/release-package.yml

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,32 @@ on:
55
types: [created]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v4
12-
- uses: actions/setup-node@v4
13-
with:
14-
node-version-file: '.nvmrc'
15-
- run: npm ci
16-
- run: npm test
8+
build-and-publish:
9+
name: Build and Publish to NPM Registry
1710

18-
publish-gpr:
19-
needs: build
2011
runs-on: ubuntu-latest
21-
permissions:
22-
packages: write
23-
contents: read
12+
2413
steps:
25-
- uses: actions/checkout@v4
26-
- uses: actions/setup-node@v4
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
2719
with:
2820
node-version-file: '.nvmrc'
29-
registry-url: https://npm.pkg.github.com/
30-
- run: npm ci
31-
- run: npm run build-lib
32-
- run: npm publish
33-
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
publish-npm:
36-
name: Publish to NPM Registry
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v4
40-
- uses: actions/setup-node@v4
41-
with:
42-
node-version: 16
21+
cache: 'npm'
4322
registry-url: 'https://registry.npmjs.org/'
44-
- run: npm ci
45-
- run: npm run build-lib
46-
- run: npm publish --access public
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Execute test cases
28+
run: npm test
29+
30+
- name: Build Lib
31+
run: npm run build-lib
32+
33+
- name: Publish to NPM Registry
34+
run: npm publish --access public
4735
env:
4836
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package-lock.json

Lines changed: 2 additions & 2 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.0.83",
3+
"version": "0.0.84",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Assets/Icon/ic-exclamation.svg

Lines changed: 3 additions & 0 deletions
Loading

src/Common/Common.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ const cdMaterialListModal = (artifacts: any[], offset: number, artifactId?: numb
146146
promotionApprovalMetadata: material.promotionApprovalMetadata,
147147
deployedOnEnvironments: material.deployedOnEnvironments ?? [],
148148
deploymentWindowArtifactMetadata: material.deploymentWindowArtifactMetadata ?? null,
149+
configuredInReleases: material.configuredInReleases ?? [],
150+
appWorkflowId: material.appWorkflowId ?? null,
149151
}
150152
})
151153
return materials

src/Common/ErrorScreenManager.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import notFound from '../Assets/Img/ic-not-found.svg'
22
import badRequest from '../Assets/Img/ic-page-not-found.svg'
33
import unauthorized from '../Assets/Img/ic-not-authorized.svg'
4-
import { ERROR_STATUS_CODE, ERROR_EMPTY_SCREEN } from './Constants'
4+
import { ERROR_STATUS_CODE, ERROR_EMPTY_SCREEN, ROUTES } from './Constants'
55
import Reload from './Reload'
66
import ErrorPage from './ErrorPage'
77
import { ErrorScreenManagerProps, ImageType } from './Types'
@@ -12,7 +12,7 @@ const ErrorScreenManager = ({
1212
subtitle,
1313
reloadClass,
1414
heightToDeduct,
15-
redirectURL,
15+
redirectURL = ROUTES.APP_LIST,
1616
}: ErrorScreenManagerProps) => {
1717
const getMessage = () => {
1818
switch (code) {
@@ -71,6 +71,7 @@ const ErrorScreenManager = ({
7171
image={badRequest}
7272
imageType={ImageType.Large}
7373
heightToDeduct={heightToDeduct}
74+
reload={reload}
7475
/>
7576
)
7677
case ERROR_STATUS_CODE.BAD_GATEWAY:

src/Common/Helper.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,3 +784,5 @@ export function deepEqual(configA: any, configB: any): boolean {
784784
return true
785785
}
786786
}
787+
788+
export const prefixZeroIfSingleDigit = (value: number = 0) => (value > 0 && value < 10 ? `0${value}` : value)

src/Common/Hooks/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export { useClickOutside } from './UseClickOutside/UseClickOutside'
33
export { useWindowSize } from './UseWindowSize/UseWindowSize'
44
export * from './useUrlFilters'
55
export * from './UseRegisterShortcut'
6+
export * from './useStateFilters'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default as useStateFilters } from './useStateFilters'
2+
export type { UseStateFiltersProps, UseStateFiltersReturnType } from './types'

0 commit comments

Comments
 (0)