Skip to content

Commit 9d73058

Browse files
authored
chore: maintenance update (#184)
- update gh actions - add dependabot --------- Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
2 parents a1118f8 + cecb853 commit 9d73058

File tree

7 files changed

+55
-18
lines changed

7 files changed

+55
-18
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
version: 2
4+
updates:
5+
- package-ecosystem: pip
6+
directory: "/"
7+
schedule:
8+
interval: weekly
9+
day: saturday
10+
time: "03:00"
11+
timezone: Europe/Paris
12+
open-pull-requests-limit: 10

.github/workflows/appstore-build-publish.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
release:
1313
types: [published]
1414

15+
permissions:
16+
contents: write
17+
1518
jobs:
1619
build_and_publish:
1720
runs-on: ubuntu-latest
@@ -32,13 +35,25 @@ jobs:
3235
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3336
3437
- name: Checkout
35-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3639
with:
40+
persist-credentials: false
3741
path: ${{ env.APP_NAME }}
3842

43+
- name: Get app version number
44+
id: app-version
45+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
46+
with:
47+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
48+
expression: "//info//version/text()"
49+
50+
- name: Validate app version against tag
51+
run: |
52+
[ "${{ env.APP_VERSION }}" = "v${{ fromJSON(steps.app-version.outputs.result).version }}" ]
53+
3954
- name: Get appinfo data
4055
id: appinfo
41-
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
56+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
4257
with:
4358
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4459
expression: "//info//dependencies//nextcloud/@min-version"
@@ -56,7 +71,7 @@ jobs:
5671
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5772
# Skip if no package.json
5873
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
74+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
6075
with:
6176
node-version: ${{ steps.versions.outputs.nodeVersion }}
6277

@@ -72,7 +87,7 @@ jobs:
7287
filename: ${{ env.APP_NAME }}/appinfo/info.xml
7388

7489
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
75-
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
90+
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
7691
with:
7792
php-version: ${{ steps.php-versions.outputs.php-min }}
7893
coverage: none
@@ -134,9 +149,10 @@ jobs:
134149
unzip latest-$NCVERSION.zip
135150
136151
- name: Checkout server master fallback
137-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
152+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
138153
if: ${{ steps.server-checkout.outcome != 'success' }}
139154
with:
155+
persist-credentials: false
140156
submodules: true
141157
repository: nextcloud/server
142158
path: nextcloud

.github/workflows/integration-test.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,8 @@ jobs:
9696
with:
9797
repository: nextcloud/server
9898
ref: ${{ matrix.server-versions }}
99-
100-
- name: Checkout submodules
101-
shell: bash
102-
run: |
103-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
104-
git submodule sync --recursive
105-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
99+
submodules: 'recursive'
100+
persist-credentials: false
106101

107102
- name: Set up php ${{ matrix.php-versions }}
108103
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2
@@ -116,11 +111,13 @@ jobs:
116111
with:
117112
repository: nextcloud/context_chat
118113
path: apps/context_chat
114+
persist-credentials: false
119115

120116
- name: Checkout backend
121117
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
122118
with:
123119
path: context_chat_backend/
120+
persist-credentials: false
124121

125122
- name: Get app version
126123
id: appinfo
@@ -153,6 +150,7 @@ jobs:
153150
with:
154151
repository: nextcloud/documentation
155152
path: data/admin/files/documentation
153+
persist-credentials: false
156154

157155
- name: Prepare docs
158156
run: |

.github/workflows/pr-feedback.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ on:
1515
schedule:
1616
- cron: '30 1 * * *'
1717

18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
1822
jobs:
1923
pr-feedback:
24+
if: ${{ github.repository_owner == 'nextcloud' }}
2025
runs-on: ubuntu-latest
2126
steps:
2227
- name: The get-github-handles-from-website action
23-
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
28+
uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1
2429
id: scrape
2530
with:
2631
website: 'https://nextcloud.com/team/'
@@ -31,7 +36,7 @@ jobs:
3136
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
3237
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
3338
34-
- uses: marcelklehr/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4
39+
- uses: nextcloud/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4 # main
3540
with:
3641
feedback-message: |
3742
Hello there,

.github/workflows/reuse.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ name: REUSE Compliance Check
1111

1212
on: [pull_request]
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
reuse-compliance-check:
16-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-latest-low
1720
steps:
1821
- name: Checkout
1922
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ jobs:
5858
steps:
5959
- name: Checkout CCB
6060
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
61+
with:
62+
persist-credentials: false
6163

6264
- name: Setup python 3.11
6365
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5

context_chat_backend/vectordb/pgvector.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from datetime import datetime
88

99
import sqlalchemy as sa
10+
import sqlalchemy.dialects.postgresql as postgresql_dialects
1011
import sqlalchemy.orm as orm
1112
from dotenv import load_dotenv
1213
from fastapi import UploadFile
@@ -89,7 +90,7 @@ class AccessListStore(Base):
8990
)
9091

9192
@classmethod
92-
def get_all(cls, session: sa.orm.Session) -> list[str]:
93+
def get_all(cls, session: orm.Session) -> list[str]:
9394
try:
9495
return [r.uid for r in session.query(cls.uid).distinct().all()]
9596
except Exception as e:
@@ -246,7 +247,7 @@ def decl_update_access(self, user_ids: list[str], source_id: str, session_: orm.
246247
session.commit()
247248

248249
stmt = (
249-
sa.dialects.postgresql.insert(AccessListStore)
250+
postgresql_dialects.insert(AccessListStore)
250251
.values([
251252
{
252253
'uid': user_id,
@@ -297,7 +298,7 @@ def update_access(
297298
match op:
298299
case UpdateAccessOp.allow:
299300
stmt = (
300-
sa.dialects.postgresql.insert(AccessListStore)
301+
postgresql_dialects.insert(AccessListStore)
301302
.values([
302303
{
303304
'uid': user_id,

0 commit comments

Comments
 (0)