Skip to content

Commit

Permalink
Merge pull request #334 from nextcloud/automated/noid/stable28-fix-np…
Browse files Browse the repository at this point in the history
…m-audit

[stable28] Fix npm audit
  • Loading branch information
susnux authored Aug 7, 2024
2 parents cd76550 + 4c9c1c9 commit 575d264
Show file tree
Hide file tree
Showing 11 changed files with 242 additions and 100 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/block-merge-eol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Block merges for EOL

Expand All @@ -23,15 +26,15 @@ jobs:
runs-on: ubuntu-latest-low

steps:
- name: Download updater config
run: curl https://raw.githubusercontent.com/nextcloud/updater_server/production/config/config.php --output config.php

- name: Set server major version environment
run: |
# retrieve version number from branch reference
server_major=$(echo "${{ github.base_ref }}" | sed -En 's/stable//p')
echo "server_major=$server_major" >> $GITHUB_ENV
echo "current_month=$(date +%Y-%m)" >> $GITHUB_ENV
- name: Checking if ${{ env.server_major }} is EOL
run: |
php -r 'echo json_encode(require_once "config.php");' | jq --arg version "${{ env.server_major }}" '.stable[$version]["100"].eol // .beta[$version]["100"].eol' | grep --silent -i 'false'
curl -s https://raw.githubusercontent.com/nextcloud-releases/updater_server/production/config/major_versions.json \
| jq '.["${{ env.server_major }}"]["eol"] // "9999-99" | . >= "${{ env.current_month }}"' \
| grep -q true
7 changes: 5 additions & 2 deletions .github/workflows/block-merge-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Block merges during freezes

Expand All @@ -27,10 +30,10 @@ jobs:
steps:
- name: Register server reference to fallback to master branch
run: |
server_ref="$(if [ "${{ github.base_ref }}" = "main" ]; then echo -n "master"; else echo -n "${{ github.base_ref }}"; fi)"
server_ref="$(if [ '${{ github.base_ref }}' = 'main' ]; then echo -n 'master'; else echo -n '${{ github.base_ref }}'; fi)"
echo "server_ref=$server_ref" >> $GITHUB_ENV
- name: Download version.php from ${{ env.server_ref }}
run: curl https://raw.githubusercontent.com/nextcloud/server/${{ env.server_ref }}/version.php --output version.php
run: curl 'https://raw.githubusercontent.com/nextcloud/server/${{ env.server_ref }}/version.php' --output version.php

- name: Run check
run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC'
5 changes: 4 additions & 1 deletion .github/workflows/block-unconventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Block unconventional commits

Expand All @@ -24,7 +27,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
with:
Expand Down
2 changes: 1 addition & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

namespace OCA\Files_DownloadLimit\AppInfo;

use OCA\Files_DownloadLimit\Capabilities;
use OCA\Files\Event\LoadSidebar;
use OCA\Files_DownloadLimit\Capabilities;
use OCA\Files_DownloadLimit\Listener\BeforeTemplateRenderedListener;
use OCA\Files_DownloadLimit\Listener\LoadSidebarListener;
use OCA\Files_DownloadLimit\Listener\ShareLinkAccessedListener;
Expand Down
8 changes: 4 additions & 4 deletions lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class ApiController extends OCSController {
private $mapper;

public function __construct(IRequest $request,
IConfig $config,
IManager $shareManager,
IUserSession $userSession,
LimitMapper $mapper) {
IConfig $config,
IManager $shareManager,
IUserSession $userSession,
LimitMapper $mapper) {
parent::__construct(Application::APP_ID, $request);
$this->config = $config;
$this->shareManager = $shareManager;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Limit.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
namespace OCA\Files_DownloadLimit\Db;

use \JsonSerializable;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;

class Limit extends Entity implements JsonSerializable {
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/LimitMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
*/
namespace OCA\Files_DownloadLimit\Db;

use OCP\IDBConnection;
use OCP\AppFramework\Db\QBMapper;
use OCP\IDBConnection;

class LimitMapper extends QBMapper {
public function __construct(IDBConnection $db) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Listener/BeforeTemplateRenderedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BeforeTemplateRenderedListener implements IEventListener {
private $limitMapper;

public function __construct(IInitialState $initialStateService,
LimitMapper $limitMapper) {
LimitMapper $limitMapper) {
$this->initialStateService = $initialStateService;
$this->limitMapper = $limitMapper;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Listener/LoadSidebarListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

namespace OCA\Files_DownloadLimit\Listener;

use OCA\Files_DownloadLimit\AppInfo\Application;
use OCA\Files\Event\LoadSidebar;
use OCA\Files_DownloadLimit\AppInfo\Application;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
Expand Down
6 changes: 3 additions & 3 deletions lib/Listener/ShareLinkAccessedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class ShareLinkAccessedListener implements IEventListener {
private $logger;

public function __construct(IConfig $config,
IManager $manager,
LimitMapper $mapper,
LoggerInterface $logger) {
IManager $manager,
LimitMapper $mapper,
LoggerInterface $logger) {
$this->config = $config;
$this->manager = $manager;
$this->mapper = $mapper;
Expand Down
Loading

0 comments on commit 575d264

Please sign in to comment.