Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to main #783

Merged
merged 20 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1c88ea5
UHF-8975: Updated the order for kymp related paragraph types.
khalima Jan 16, 2024
0de07cb
UHF-8975: Added ploughin schedule paragraph type to hook_helfi_paragr…
khalima Jan 16, 2024
d224ad1
UHF-8975: Merge branch 'dev' of github.com:City-of-Helsinki/drupal-he…
khalima Jan 16, 2024
aaceb44
UHF-8975: Updated the paragraph weights for project and district.
khalima Jan 18, 2024
28c625d
Merge pull request #781 from City-of-Helsinki/UHF-8975_paragraph_order
khalima Jan 18, 2024
930c77b
Update configuration
actions-bot Jan 18, 2024
88d68b0
Merge pull request #782 from City-of-Helsinki/update-configuration
khalima Jan 18, 2024
e3d78ac
UHF-9108: Fix district and project search fallback to look good and t…
teroelonen Jan 19, 2024
fcd7452
Update configuration
actions-bot Jan 23, 2024
aa299e9
Merge pull request #784 from City-of-Helsinki/update-configuration
teroelonen Jan 23, 2024
8ccd3a5
UHF-9108: Merge branch 'dev' of github.com:City-of-Helsinki/drupal-he…
teroelonen Jan 23, 2024
b1749ce
UHF-9380: Added npm audit github action to run npm audit fix in custo…
khalima Jan 24, 2024
d897378
UHF-9380: Handle BC breaks when running npm audit fix.
khalima Jan 25, 2024
13eff9e
UHF-9380: Simplified npm audit action.
khalima Jan 29, 2024
fbbce55
Merge pull request #787 from City-of-Helsinki/UHF-9380
khalima Jan 29, 2024
e1289f0
Merge pull request #786 from City-of-Helsinki/UHF-9108
teroelonen Jan 30, 2024
00b8e0b
Update configuration
actions-bot Jan 30, 2024
ba3b3f6
Merge pull request #788 from City-of-Helsinki/update-configuration
teroelonen Jan 30, 2024
7044d2a
Update configuration
actions-bot Jan 30, 2024
db8d11b
Merge pull request #789 from City-of-Helsinki/update-configuration
teroelonen Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/npm-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Npm audit

on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 0' # Run every fortnight on Sunday at 12

jobs:
npm_audit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run npm audit
id: npm_audit
run: |
find public/modules/custom public/themes/custom -type f -name ".nvmrc" -exec sh -c '
dir=$(dirname "$1")
node_version=$(cat "$1")
echo "Using Node.js version $node_version in $dir"
cd "$dir"
export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install $node_version
nvm use $node_version
set +e
npm audit --package-lock-only --loglevel=error;
# The npm audit command will exit with a 0 exit code if no vulnerabilities were found.
if [ $? -gt 0 ]; then
npm audit fix --package-lock-only --loglevel=error;
if [ $? -gt 0 ]; then
echo "BC_BREAK=:exclamation: NPM Audit fix could not fix all vulnerabilities. Fix them manually by running \`npm audit fix --force\` and test the functionalities thoroughly as there might be breaking changes. :exclamation:" >> $GITHUB_ENV;
fi;
echo "CREATE_PR=true" >> $GITHUB_OUTPUT;
fi;
set -e
' sh {} \;


- name: Create Pull Request
if: steps.npm_audit.outputs.CREATE_PR == 'true'
uses: peter-evans/create-pull-request@v4
with:
committer: GitHub <[email protected]>
author: actions-bot <[email protected]>
commit-message: Updated node modules based on npm audit fix
title: Automatic npm audit fix
labels: auto-update
body: |
# Npm audit

${{ env.BC_BREAK }}

## How to install

* Update the HDBT theme
* `git fetch --all`
* `git checkout automation/npm-audit`
* `git pull origin automation/npm-audit`
* In the custom module or custom theme folder, run `nvm use && npm i && npm run build`

## How to test
Run `npm audit`

* [ ] Check that the `npm audit` prints `found 0 vulnerabilities`
* [ ] Check that the changes for distributed files are sensible

branch: automation/npm-audit
92 changes: 44 additions & 48 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ settings:
weight: 0
enabled: true
district_and_project_search:
weight: 0
weight: 1
enabled: true
district_listing:
weight: 0
weight: 3
enabled: true
image:
weight: 0
Expand All @@ -95,7 +95,7 @@ settings:
weight: 0
enabled: true
list_of_plans:
weight: 0
weight: 2
enabled: true
map:
weight: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- media_library
- text
_core:
default_config_hash: ZzwlJ2SwF1RVqS2C99xcFRBm5QTF6HqHjtgtQTBxAq8
default_config_hash: JfX1NDmZllc_fHMeOSFBgWspFRoEEmivcXOUu014O-k
id: paragraph.chart.default
targetEntityType: paragraph
bundle: chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
config:
- field.field.paragraph.content_liftup.field_content_liftup_unit
- paragraphs.paragraphs_type.content_liftup
_core:
default_config_hash: xULweJ9JMlJZPMLEKe6rT2QooMGsSyiqRMh9VCv95fM
id: paragraph.content_liftup.default
targetEntityType: paragraph
bundle: content_liftup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- media_library
- text
_core:
default_config_hash: 8PkD28wd76Uxb7Lxrd8Js9613dKfCawFNWaoOv5PhF0
default_config_hash: 7crENIwhGW6tRoex4OmKX32kDMRWvLBJ-YjDSBifPak
id: paragraph.map.default
targetEntityType: paragraph
bundle: map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
module:
- text
_core:
default_config_hash: z5HcA-kCryhCEDDUh3GMvbVm_xuff7CohDimxV11670
default_config_hash: BOw_UiW-L7EQ8Y6D4E0CAMkB8XxXao5rBZzbq-DNbBI
id: paragraph.chart.default
targetEntityType: paragraph
bundle: chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ content:
settings:
image_link: ''
image_style: 1_1_l
image_loading:
attribute: lazy
third_party_settings: { }
weight: 0
region: content
Expand Down
Loading
Loading