Skip to content

Commit 4d646b4

Browse files
committed
chore: update from main
2 parents 3b1ba43 + b0d5e46 commit 4d646b4

File tree

65 files changed

+414
-224
lines changed

Some content is hidden

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

65 files changed

+414
-224
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
cypress
2-
scripts
31
**/build
42
**/public
53
**/out

.eslintrc.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,5 @@ module.exports = {
33
browser: true,
44
es2021: true,
55
node: true
6-
},
7-
extends: ['eslint:recommended'],
8-
rules: {
9-
'no-console': 'error'
106
}
117
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: "Extract branch name"
3+
description: "Extract branch name based on pr or push"
4+
outputs:
5+
branch-name:
6+
description: "Branch name"
7+
value: ${{ steps.branch-name.outputs.branch-name }}
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: ⏬ Get branch name
12+
uses: actions/github-script@v6
13+
id: get-branch-name
14+
with:
15+
result-encoding: string
16+
script: |
17+
return (
18+
context?.payload?.pull_request?.head?.ref ||
19+
context?.payload?.ref
20+
).replace("refs/heads/","");
21+
- name: 🪑 Set output
22+
id: branch-name
23+
run: echo "::set-output name=branch-name::$(echo $BRANCH_NAME)"
24+
shell: bash
25+
env:
26+
BRANCH_NAME: ${{steps.get-branch-name.outputs.result}}

.github/workflows/00-scan-secrets.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ jobs:
1313
fetch-depth: 0
1414

1515
- name: ↔ Extract branch name
16-
shell: bash
17-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
16+
uses: ./.github/actions/extract-branch
1817
id: extract_branch
1918

2019
- name: 🐷 TruffleHog OSS
21-
uses: trufflesecurity/trufflehog@v3.14.0
20+
uses: trufflesecurity/trufflehog@v3.16.0
2221
with:
2322
path: ./
24-
base: ${{ steps.extract_branch.outputs.branch }}
23+
base: ${{ steps.extract_branch.outputs.branch-name }}
2524
head: HEAD
2625

2726
- name: 💀 Killing me softly

.github/workflows/02-deploy-gh-pages.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,22 @@ jobs:
3232
name: patternlab
3333
path: out
3434

35+
- name: ↔ Extract branch name
36+
uses: ./.github/actions/extract-branch
37+
id: extract_branch
38+
3539
- name: ↔ Extract branch/tag name
3640
shell: bash
3741
env:
3842
RELEASE: ${{ inputs.release }}
3943
PRE_RELEASE: ${{ inputs.preRelease }}
44+
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch-name }}
4045
run: |
4146
if [[ $RELEASE == "true" || $PRE_RELEASE == "true" ]]
4247
then
4348
echo "##[set-output name=name;]$(echo ${GITHUB_REF#refs/tags/})"
4449
else
45-
echo "##[set-output name=name;]$(echo ${GITHUB_REF#refs/heads/})"
50+
echo "##[set-output name=name;]$(echo $BRANCH_NAME)"
4651
fi
4752
id: extract
4853

.github/workflows/default.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
name: Default push workflow
22

33
on:
4+
pull_request:
45
push:
56
branches:
6-
- "**"
7-
tags:
8-
- "!**"
7+
- "main"
8+
- "dbux-3"
99

1010
jobs:
1111
init:
1212
uses: ./.github/workflows/00-init.yml
1313

1414
scan-secrets:
15+
if: github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui'
1516
uses: ./.github/workflows/00-scan-secrets.yml
1617

1718
lint:
@@ -27,7 +28,14 @@ jobs:
2728
uses: ./.github/workflows/01-build.yml
2829
needs: [init]
2930

31+
checks-done:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: 🎉 Checks done
35+
run: echo "🎉 Linting & build were successful."
36+
needs: [build, lint]
37+
3038
deploy:
3139
uses: ./.github/workflows/02-deploy-gh-pages.yml
32-
if: ${{ github.actor != 'dependabot[bot]' }}
40+
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui' }}
3341
needs: [lint, build]

.github/workflows/pull-request-opened.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ permissions:
1111

1212
jobs:
1313
add-url-comment:
14+
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
1415
uses: ./.github/workflows/99-add-url-comment.yml

.github/workflows/pull-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ jobs:
2222
uses: ./.github/workflows/99-dependency-review.yml
2323

2424
labeler:
25+
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
2526
uses: ./.github/workflows/99-labeler.yml

.prettierrc.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
{
2-
"trailingComma": "none"
2+
"trailingComma": "none",
3+
"overrides": [
4+
{
5+
"files": "**/*.js",
6+
"options": {
7+
"singleQuote": true,
8+
"bracketSpacing": true,
9+
"bracketSameLine": true
10+
}
11+
},
12+
{
13+
"files": "**/*.mjs",
14+
"options": {
15+
"singleQuote": true
16+
}
17+
}
18+
]
319
}

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"recommendations": ["editorconfig.editorconfig", "henrynguyen5-vsc.vsc-nvm"]
2+
"recommendations": [
3+
"editorconfig.editorconfig",
4+
"henrynguyen5-vsc.vsc-nvm",
5+
"streetsidesoftware.code-spell-checker"
6+
]
37
}

0 commit comments

Comments
 (0)