Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 51 additions & 0 deletions .github/workflows/command-rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Rebase command

on:
issue_comment:
types: created

permissions:
contents: read

jobs:
rebase:
runs-on: ubuntu-latest
permissions:
contents: none

# On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')

steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"

- name: Checkout the latest code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}

- name: Automatic Rebase
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
env:
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}

- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"
25 changes: 10 additions & 15 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# DO NOT apply the update of the workflows blindly.
# This here is not a Nextcloud app, so things are different.
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
Expand All @@ -16,29 +18,22 @@ concurrency:
cancel-in-progress: true

jobs:
matrix:
runs-on: ubuntu-latest-low
outputs:
php-versions: ${{ steps.versions.outputs.php-versions }}
steps:
- name: Checkout app
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

php-lint:
runs-on: ubuntu-latest
needs: matrix
runs-on: ubuntu-latest-low
strategy:
matrix:
php-versions: ["7.4", "8.3"]
php-versions: ["8.4", "8.5"]

name: php-lint

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/lint-php.yml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
index e4c6e9b..0d01ac4 100644
--- a/.github/workflows/lint-php.yml
+++ b/.github/workflows/lint-php.yml
@@ -18,27 +18,11 @@ concurrency:
cancel-in-progress: true

jobs:
- matrix:
- runs-on: ubuntu-latest-low
- outputs:
- php-min: ${{ steps.versions.outputs.php-min }}
- php-max: ${{ steps.versions.outputs.php-max }}
- steps:
- - name: Checkout app
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- with:
- persist-credentials: false
-
- - name: Get version matrix
- id: versions
- uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3
-
php-lint:
runs-on: ubuntu-latest-low
- needs: matrix
strategy:
matrix:
- php-versions: ['${{ needs.matrix.outputs.php-min }}', '${{ needs.matrix.outputs.php-max }}']
+ php-versions: ["8.4", "8.5"]

name: php-lint

49 changes: 0 additions & 49 deletions .github/workflows/node.yml

This file was deleted.

110 changes: 110 additions & 0 deletions .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Build Javascript

on: pull_request

permissions:
contents: read

concurrency:
group: node-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'src/**'
- 'appinfo/info.xml'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '**.js'
- '**.ts'
- '**.vue'

build:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

name: NPM build
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Read package.json node and npm engines version
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
id: versions

- name: Set up node ${{ steps.versions.outputs.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ steps.versions.outputs.node-version }}

- name: Set up npm ${{ steps.versions.outputs.package-manager-version }}
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'

- name: Validate package-lock.json # See https://github.com/npm/cli/issues/4460
run: |
npm i -g npm-package-lock-add-resolved@1.1.4
npm-package-lock-add-resolved
git --no-pager diff --exit-code

- name: Install dependencies & build
env:
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_DOWNLOAD: true
run: |
npm ci
npm run build --if-present

- name: Check build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"

- name: Show changes on failure
if: failure()
run: |
git status
git --no-pager diff
exit 1 # make it red to grab attention

summary:
permissions:
contents: none
runs-on: ubuntu-latest-low
needs: [changes, build]

if: always()

# This is the summary, we just avoid to rename it so that branch protection rules still match
name: node

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi
32 changes: 31 additions & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<div class="container">
<div class="row row-list-blog">
<?php
global $wp_query;
$default_posts_per_page = get_option( 'posts_per_page' ); // should be 9
$limit = $default_posts_per_page;
$count = $wp_query->found_posts;


$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
Expand All @@ -36,7 +40,26 @@
while (have_posts()) : the_post();

if(get_post_type()!='acf-field-group') {
get_template_part('inc/blog_loop_single');

$webinar = false;
if ( 'event' == get_post_type() ) {
$cat = wp_get_object_terms( get_the_ID(), 'event_categories', array() );
if($cat) {
foreach ($cat as $c) {
if($c->term_id == 250 ) { // event_categories Webinars
$webinar = true;
break;
}
}
}
}

if($webinar) {
get_template_part('inc/webinar_loop_single');
} else {
get_template_part('inc/blog_loop_single');
}

}

endwhile;
Expand All @@ -57,6 +80,10 @@
?>
</div>


<?php
if ($count > $limit) {
?>
<div class="row loadNews_row">
<div class="col-12">
<div class="section-button">
Expand All @@ -67,6 +94,9 @@
</div>
</div>
</div>
<?php
}
?>


</div>
Expand Down
Loading
Loading