From 46852b16f459a634e079c23cc18e163f4cd1c272 Mon Sep 17 00:00:00 2001 From: tahmidrahman-dsi Date: Mon, 28 Oct 2024 17:35:00 +0600 Subject: [PATCH 1/7] fix: empty section handle in `fieldValueTransformer` --- .../client/src/forms/register/mappings/query/field-mappings.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/client/src/forms/register/mappings/query/field-mappings.ts b/packages/client/src/forms/register/mappings/query/field-mappings.ts index 98b898271e..1628ff15b4 100644 --- a/packages/client/src/forms/register/mappings/query/field-mappings.ts +++ b/packages/client/src/forms/register/mappings/query/field-mappings.ts @@ -109,6 +109,9 @@ export const fieldValueTransformer = sectionId: SectionId, field: IFormField ) => { + if (!(sectionId in transformedData)) { + transformedData[sectionId] = {} + } if (queryData[sectionId] && queryData[sectionId][transformedFieldName]) { transformedData[sectionId][field.name] = queryData[sectionId][transformedFieldName] From 98be0dcc988c6d97fbe8984b7da6eac98874b54e Mon Sep 17 00:00:00 2001 From: tahmidrahman-dsi Date: Mon, 28 Oct 2024 18:06:43 +0600 Subject: [PATCH 2/7] chore: update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00745c19a3..d57f53040f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ - Fix hardcoded placeholder copy of input when saving a query in advanced search - Handle label params used in form inputs when rendering in action details modal - **Staged files getting reset on precommit hook failure** We were running lint-staged separately on each package using lerna which potentially created a race condition causing staged changes to get lost on failure. Now we are running lint-staged directly without depending on lerna. **_This is purely a DX improvement without affecting any functionality of the system_** +- Fix `informantType` missing in template object which prevented rendering informant relationship data in the certificates [#5952](https://github.com/opencrvs/opencrvs-core/issues/5952) ### Breaking changes From 41ea66b4bc94d43d24702608450a53ba9e9d1646 Mon Sep 17 00:00:00 2001 From: tahmidrahman-dsi Date: Tue, 29 Oct 2024 14:36:21 +0600 Subject: [PATCH 3/7] chore: test trigger From 20df551ea69ffa8998605fe149fedfb4c87c1469 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 29 Oct 2024 11:01:59 +0200 Subject: [PATCH 4/7] debug build --- .github/workflows/build-images-from-branch.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-images-from-branch.yml b/.github/workflows/build-images-from-branch.yml index 23c0f11052..6cdae3c9ef 100644 --- a/.github/workflows/build-images-from-branch.yml +++ b/.github/workflows/build-images-from-branch.yml @@ -39,15 +39,17 @@ jobs: id: set-version-and-branch run: | export VERSION=`git log -1 --pretty=format:%h` + echo "Pushing version $VERSION" echo "version=$VERSION" >> $GITHUB_OUTPUT if [ "${{ github.event_name }}" == 'push' ]; then - BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} elif [ "${{ github.event_name }}" == 'pull_request' ]; then - BRANCH=${{ github.event.pull_request.head.ref }} + BRANCH=${{ github.event.pull_request.head.ref }} else - BRANCH=${{ inputs.branch_name }} + BRANCH=${{ inputs.branch_name }} fi ESCAPED_BRANCH=$(echo $BRANCH | sed 's/[^a-zA-Z0-9_.-]/-/g') + echo "from branch $BRANCH" echo "branch=$ESCAPED_BRANCH" >> $GITHUB_OUTPUT - name: Get list of services From 8e159685a4072d626fda49e4595fc2f18571946d Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 29 Oct 2024 11:09:22 +0200 Subject: [PATCH 5/7] fix how the version is resolved --- .github/workflows/build-images-from-branch.yml | 3 +++ trivy.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/build-images-from-branch.yml b/.github/workflows/build-images-from-branch.yml index 6cdae3c9ef..d42a37fe52 100644 --- a/.github/workflows/build-images-from-branch.yml +++ b/.github/workflows/build-images-from-branch.yml @@ -34,6 +34,9 @@ jobs: - uses: actions/checkout@v4 if: github.event_name == 'push' || github.event_name == 'pull_request' + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set version and branch id: set-version-and-branch diff --git a/trivy.yaml b/trivy.yaml index a8a931e1fb..896c042404 100644 --- a/trivy.yaml +++ b/trivy.yaml @@ -20,6 +20,8 @@ scan: - sequence-diagrams - usr/local/share/.cache/yarn/v6/ - home/node/.cache/yarn/v6 + skip-files: + - '**/*.dockerignore' scanners: - vuln - misconfig From 8a9eeda717870b8f8eff4fe278589ad00cbaf4b7 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 29 Oct 2024 11:10:32 +0200 Subject: [PATCH 6/7] separate out pulling for pull requests and pushes --- .github/workflows/build-images-from-branch.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-images-from-branch.yml b/.github/workflows/build-images-from-branch.yml index d42a37fe52..b5d03c5f19 100644 --- a/.github/workflows/build-images-from-branch.yml +++ b/.github/workflows/build-images-from-branch.yml @@ -33,9 +33,13 @@ jobs: ref: '${{ github.event.inputs.branch_name }}' - uses: actions/checkout@v4 - if: github.event_name == 'push' || github.event_name == 'pull_request' + if: github.event_name == 'push' + with: + ref: ${{ github.event.pull_request.head.sha }} + + - uses: actions/checkout@v4 + if: github.event_name == 'pull_request' with: - fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - name: Set version and branch From 5fc4a3688f3c6a6fb5a028ea8136fe2397573c92 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 29 Oct 2024 11:29:00 +0200 Subject: [PATCH 7/7] fix java-repository config --- trivy.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trivy.yaml b/trivy.yaml index 896c042404..595244a472 100644 --- a/trivy.yaml +++ b/trivy.yaml @@ -30,8 +30,7 @@ vulnerability: ignore-unfixed: true db: repository: 'ghcr.io/opencrvs/trivy-db' -java: - db: - repository: 'ghcr.io/opencrvs/trivy-java-db' + java-repository: 'ghcr.io/opencrvs/trivy-java-db' + policies-bundle: repository: 'ghcr.io/opencrvs/trivy-checks'