Skip to content

Commit b7ea445

Browse files
authored
Merge pull request #115 from nextcloud/chore/app-maintenance
chore: app maintenance
2 parents 09de4b3 + 7995a4a commit b7ea445

File tree

8 files changed

+1549
-1247
lines changed

8 files changed

+1549
-1247
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3636
3737
- name: Checkout
38-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3939
with:
4040
persist-credentials: false
4141
path: ${{ env.APP_NAME }}
4242

4343
- name: Get app version number
4444
id: app-version
45-
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
45+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
4646
with:
4747
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4848
expression: "//info//version/text()"
@@ -53,7 +53,7 @@ jobs:
5353
5454
- name: Get appinfo data
5555
id: appinfo
56-
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
56+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
5757
with:
5858
filename: ${{ env.APP_NAME }}/appinfo/info.xml
5959
expression: "//info//dependencies//nextcloud/@min-version"
@@ -71,7 +71,7 @@ jobs:
7171
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
7272
# Skip if no package.json
7373
if: ${{ steps.versions.outputs.nodeVersion }}
74-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
74+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
7575
with:
7676
node-version: ${{ steps.versions.outputs.nodeVersion }}
7777

@@ -149,7 +149,7 @@ jobs:
149149
unzip latest-$NCVERSION.zip
150150
151151
- name: Checkout server master fallback
152-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
152+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
153153
if: ${{ steps.server-checkout.outcome != 'success' }}
154154
with:
155155
persist-credentials: false
@@ -173,7 +173,7 @@ jobs:
173173
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
174174
175175
- name: Attach tarball to github release
176-
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
176+
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
177177
id: attach_to_release
178178
with:
179179
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -183,7 +183,7 @@ jobs:
183183
overwrite: true
184184

185185
- name: Upload app to Nextcloud appstore
186-
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
186+
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
187187
with:
188188
app_name: ${{ env.APP_NAME }}
189189
appstore_token: ${{ secrets.APPSTORE_TOKEN }}

.github/workflows/integration_test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464

6565
steps:
6666
- name: Checkout server
67-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6868
with:
6969
repository: nextcloud/server
7070
ref: ${{ matrix.server-versions }}
@@ -84,14 +84,14 @@ jobs:
8484
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_mysql, pdo_sqlite, pgsql, pdo_pgsql, gd, zip
8585

8686
- name: Checkout app
87-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
87+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8888
with:
8989
path: ${{ env.APP_NAME }}
9090
persist-credentials: false
9191

9292
- name: Get app version
9393
id: appinfo
94-
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
94+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
9595
with:
9696
filename: ${{ env.APP_NAME }}/appinfo/info.xml
9797
expression: "/info/version/text()"
@@ -116,7 +116,7 @@ jobs:
116116
run: ./occ app:enable -vvv -f app_api
117117

118118
- name: Setup python 3.10
119-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5.6.0
119+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
120120
with:
121121
python-version: '3.10'
122122
cache: 'pip'

.github/workflows/pr-feebdack.yml renamed to .github/workflows/pr-feedback.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ 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
@@ -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@f0cab224dea8e1f282f9451de322f323c78fc7a5 # main
3540
with:
3641
feedback-message: |
3742
Hello there,
@@ -45,6 +50,6 @@ jobs:
4550
4651
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
4752
days-before-feedback: 14
48-
start-date: '2024-04-30'
53+
start-date: '2025-06-12'
4954
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
50-
exempt-bots: true
55+
exempt-bots: true

.github/workflows/publish-docker-cpu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
2727
2828
- name: Checkout
29-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3030
with:
3131
persist-credentials: false
3232
path: ${{ env.APP_NAME }}
@@ -44,7 +44,7 @@ jobs:
4444
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
4545
# Skip if no package.json
4646
if: ${{ steps.versions.outputs.nodeVersion }}
47-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
47+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
4848
with:
4949
node-version: ${{ steps.versions.outputs.nodeVersion }}
5050

@@ -70,7 +70,7 @@ jobs:
7070
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
7171

7272
- name: Log in to GitHub Container Registry
73-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
73+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
7474
with:
7575
registry: ghcr.io
7676
username: ${{ github.actor }}

.github/workflows/reuse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ permissions:
1616

1717
jobs:
1818
reuse-compliance-check:
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-latest-low
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2323
with:
2424
persist-credentials: false
2525

lib/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from threading import Event, Thread
1313
from time import perf_counter, sleep, strftime
1414

15-
import httpx
15+
from niquests import HTTPError
1616
from task_processors import generate_task_processors
1717
from fastapi import FastAPI
1818
from nc_py_api import AsyncNextcloudApp, NextcloudApp, NextcloudException
@@ -90,7 +90,7 @@ def background_thread_task():
9090
if not response:
9191
sleep(5)
9292
continue
93-
except (NextcloudException, httpx.RequestError, JSONDecodeError) as e:
93+
except (NextcloudException, HTTPError, JSONDecodeError) as e:
9494
log(nc, LogLvl.ERROR, f"Network error fetching the next task {e}")
9595
sleep(5)
9696
continue
@@ -118,7 +118,7 @@ def background_thread_task():
118118
task["id"],
119119
result,
120120
)
121-
except (NextcloudException, httpx.RequestError, JSONDecodeError) as e:
121+
except (NextcloudException, HTTPError, JSONDecodeError) as e:
122122
# Error when reporting the result
123123
exception_info = traceback.format_exception(type(e), e, e.__traceback__)
124124
log(nc, LogLvl.ERROR, f"Error: {''.join(exception_info)}")
@@ -129,7 +129,7 @@ def background_thread_task():
129129
try:
130130
log(nc, LogLvl.ERROR, str(e))
131131
nc.providers.task_processing.report_result(task["id"], error_message=str(e))
132-
except (NextcloudException, httpx.RequestError) as net_err:
132+
except (NextcloudException, HTTPError) as net_err:
133133
log(nc, LogLvl.INFO, f"Network error in reporting the error: {net_err}")
134134

135135
sleep(5)

0 commit comments

Comments
 (0)