Skip to content

Commit b7d805f

Browse files
authored
Merge branch 'master' into cuppett/migrate-appconfig-keys-to-bool
2 parents 0c99c71 + edd0e07 commit b7d805f

152 files changed

Lines changed: 2834 additions & 2055 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ai-policy.yml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: AI Policy
10+
11+
on:
12+
pull_request:
13+
types: [opened, synchronize, reopened]
14+
branches: [master, main]
15+
16+
permissions:
17+
contents: read
18+
# Required to add the "AI assisted" label via `gh pr edit --add-label`
19+
pull-requests: write
20+
# Required to create the "AI assisted" label via the REST labels endpoint
21+
# (labels are an issues-scoped resource in the GitHub API)
22+
issues: write
23+
24+
concurrency:
25+
group: ai-policy-${{ github.head_ref || github.run_id }}
26+
cancel-in-progress: true
27+
28+
jobs:
29+
check-ai-trailers:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
34+
with:
35+
fetch-depth: 0
36+
persist-credentials: false
37+
38+
- name: Collect PR commit messages
39+
id: collect
40+
env:
41+
BASE_REF: ${{ github.base_ref }}
42+
run: |
43+
set -euo pipefail
44+
git fetch origin "${BASE_REF}"
45+
MERGE_BASE=$(git merge-base "origin/${BASE_REF}" HEAD)
46+
git log --format="%B" "${MERGE_BASE}..HEAD" > /tmp/pr_commits.txt
47+
echo "--- PR commit messages ---"
48+
cat /tmp/pr_commits.txt
49+
echo "--------------------------"
50+
51+
- name: Define shared agent detection patterns
52+
run: |
53+
set -euo pipefail
54+
55+
# Email addresses known to be used by coding agents.
56+
# These should never appear in Signed-off-by because the DCO can only be attested by a human.
57+
EMAIL_PATTERN="copilot@github\.com\
58+
|noreply@anthropic\.com\
59+
|devin@cognition\.ai\
60+
|devin@cognition-labs\.com\
61+
|aider@aider\.chat\
62+
|noreply@aider\.chat\
63+
|codex@openai\.com\
64+
|cursor@anysphere\.com\
65+
|windsurf@codeium\.com\
66+
|codeium@codeium\.com\
67+
|amazon-q@amazon\.com\
68+
|codewhisperer@amazon\.com\
69+
|gemini-code-assist@google\.com\
70+
|openhands@all-hands\.dev\
71+
|swe-agent@princeton\.edu"
72+
73+
# Strip embedded whitespace (used above only for readability)
74+
EMAIL_PATTERN=$(echo "$EMAIL_PATTERN" | tr -d ' \n')
75+
echo "AGENT_EMAIL_PATTERN=${EMAIL_PATTERN}" >> "$GITHUB_ENV"
76+
77+
# Display-name prefixes used by known coding agents (shared by Signed-off-by and Co-Authored-By checks)
78+
# shellcheck disable=SC2016
79+
echo 'AGENT_NAMES=GitHub Copilot|Claude( [A-Za-z0-9. -]+)?|Devin( AI)?|aider( \(.*\))?|OpenAI Codex|Cursor( AI)?|Windsurf|Amazon Q|CodeWhisperer|Gemini Code Assist|OpenHands|SWE-agent|AutoCodeRover|Tabnine' >> "$GITHUB_ENV"
80+
81+
- name: Check for AI-assistant / Assisted-by trailers
82+
id: ai_trailers
83+
run: |
84+
set -euo pipefail
85+
AI_ASSISTED=false
86+
if grep -qiE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt; then
87+
AI_ASSISTED=true
88+
echo "Found AI-assistant/Assisted-by trailer(s):"
89+
grep -iE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt
90+
fi
91+
echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT"
92+
93+
- name: Check for coding-agent Signed-off-by trailers
94+
id: agent_signoff
95+
run: |
96+
set -euo pipefail
97+
98+
EMAIL_HITS=$(grep -iE "^Signed-off-by:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true)
99+
NAME_HITS=$(grep -iE "^Signed-off-by: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true)
100+
101+
AGENT_LINES=$(printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d')
102+
103+
AGENT_SIGNOFF=false
104+
if [ -n "$AGENT_LINES" ]; then
105+
AGENT_SIGNOFF=true
106+
fi
107+
108+
echo "agent_signoff=${AGENT_SIGNOFF}" >> "$GITHUB_OUTPUT"
109+
{
110+
echo "agent_lines<<AGENT_EOF"
111+
echo "${AGENT_LINES}"
112+
echo "AGENT_EOF"
113+
} >> "$GITHUB_OUTPUT"
114+
115+
- name: Check for coding-agent Co-Authored-By trailers
116+
id: co_authored
117+
run: |
118+
set -euo pipefail
119+
120+
EMAIL_HITS=$(grep -iE "^Co-Authored-By:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true)
121+
NAME_HITS=$(grep -iE "^Co-Authored-By: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true)
122+
123+
CO_AUTHORED=false
124+
if [ -n "$EMAIL_HITS" ] || [ -n "$NAME_HITS" ]; then
125+
CO_AUTHORED=true
126+
echo "Found coding-agent Co-Authored-By trailer(s):"
127+
printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d'
128+
fi
129+
130+
echo "co_authored=${CO_AUTHORED}" >> "$GITHUB_OUTPUT"
131+
132+
- name: Create 'AI assisted' label if absent
133+
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
134+
env:
135+
GH_TOKEN: ${{ github.token }}
136+
run: |
137+
gh api "repos/${{ github.repository }}/labels" \
138+
--method POST \
139+
-f name="AI assisted" \
140+
-f color="d93f0b" \
141+
-f description="This PR contains AI-assisted commits" \
142+
2>/dev/null || true
143+
144+
- name: Label PR as AI assisted
145+
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
146+
env:
147+
GH_TOKEN: ${{ github.token }}
148+
run: |
149+
gh pr edit "${{ github.event.pull_request.number }}" \
150+
--repo "${{ github.repository }}" \
151+
--add-label "AI assisted"
152+
echo "Added 'AI assisted' label to PR #${{ github.event.pull_request.number }}"
153+
154+
- name: Fail on coding-agent Signed-off-by
155+
if: steps.agent_signoff.outputs.agent_signoff == 'true'
156+
env:
157+
AGENT_LINES: ${{ steps.agent_signoff.outputs.agent_lines }}
158+
AGENTS_MD_URL: https://github.com/${{ github.repository }}/blob/${{ github.base_ref }}/AGENTS.md
159+
run: |
160+
echo "::error title=Coding-agent sign-off detected::A Signed-off-by trailer from a known coding agent was found in one or more commits."
161+
echo ""
162+
echo "Offending trailer(s):"
163+
echo "${AGENT_LINES}"
164+
echo ""
165+
echo "The 'Signed-off-by' trailer represents the Developer Certificate of Origin (DCO)"
166+
echo "and must only be attested by a human contributor."
167+
echo "Please amend the affected commit(s) to remove the coding-agent sign-off"
168+
echo "and replace it with an 'Assisted-by' trailer, for example:"
169+
echo ""
170+
echo " Assisted-by: Claude Code:claude-sonnet-4-6"
171+
echo ""
172+
echo "References:"
173+
echo " • AGENTS.md (this repository)"
174+
echo " ${AGENTS_MD_URL}"
175+
echo " • AI Contribution Policy"
176+
echo " https://github.com/nextcloud/.github/blob/master/AI_POLICY.md"
177+
echo " • Contribution Guidelines"
178+
echo " https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md"
179+
exit 1

.github/workflows/files-external-smb.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ jobs:
9595

9696
- name: Set up smbclient
9797
# This is needed as icewind/smb php library for notify
98-
run: sudo apt-get install -y smbclient
98+
run: |
99+
sudo apt-get update
100+
sudo apt-get install -y smbclient
99101
100102
- name: Set up Nextcloud
101103
run: |

.github/workflows/integration-sqlite.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ jobs:
6666
- 'openldap_features'
6767
- 'openldap_numerical_features'
6868
- 'ldap_features'
69-
- 'remoteapi_features'
7069
- 'routing_features'
7170
- 'setup_features'
7271
- 'sharees_features'

.github/workflows/static-code-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
- 'vendor-bin/**'
4444
- 'composer.json'
4545
- 'composer.lock'
46+
- 'psalm*.xml'
47+
- 'build/psalm-baseline*.xml'
4648
- '**.php'
4749
4850
static-code-analysis:

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- Andreas Pflug <dev@admin4.org>
3333
- Andrew Brown <andrew@casabrown.com>
3434
- Andrey Borysenko <andrey.borysenko@nextcloud.com>
35+
- Andrey Dyakov <adduxa@gmail.com>
3536
- André Gaul <gaul@web-yard.de>
3637
- Andy Xheli <axheli@axtsolutions.com>
3738
- Anna Larch <anna@nextcloud.com>

Caddyfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
#
4+
# THIS IS AN EXPERIMENTAL FEATURE
5+
# DO NOT USE THIS IN PRODUCTION, YOU HAVE BEEN WARNED.
6+
7+
localhost {
8+
php_server {
9+
worker {
10+
file index.php
11+
watch
12+
}
13+
}
14+
15+
log {
16+
level ERROR
17+
output stderr
18+
}
19+
20+
encode gzip
21+
22+
redir /.well-known/carddav /remote.php/dav 301
23+
redir /.well-known/caldav /remote.php/dav 301
24+
25+
# Rule: Maps most RFC 8615 compliant well-known URIs to our main frontend controller (/index.php) by default
26+
@wellKnown {
27+
path "/.well-known/"
28+
not {
29+
path /.well-known/acme-challenge
30+
path /.well-known/pki-validation
31+
}
32+
}
33+
rewrite @wellKnown /index.php
34+
35+
rewrite /ocm-provider/ /index.php
36+
37+
@forbidden {
38+
path /.htaccess
39+
path /data/*
40+
path /config/*
41+
path /db_structure
42+
path /.xml
43+
path /README
44+
path /3rdparty/*
45+
path /lib/*
46+
path /templates/*
47+
path /occ
48+
path /build
49+
path /tests
50+
path /console.php
51+
path /autotest
52+
path /issue
53+
path /indi
54+
path /db_
55+
path /console
56+
}
57+
respond @forbidden 404
58+
}

apps/appstore/REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SPDX-FileCopyrightText = "2026 Nextcloud GmbH and Nextcloud contributors"
1010
SPDX-License-Identifier = "CC-BY-SA-4.0"
1111

1212
[[annotations]]
13-
path = ["img/app.svg"]
13+
path = ["img/app.svg", "img/app-dark.svg"]
1414
precedence = "aggregate"
1515
SPDX-FileCopyrightText = "2018-2024 Google LLC"
1616
SPDX-License-Identifier = "Apache-2.0"

apps/appstore/appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<navigation role="admin">
3232
<name>Apps</name>
3333
<route>appstore.page.viewApps</route>
34-
<icon>app.svg</icon>
34+
<icon>app-dark.svg</icon>
3535
<order>5</order>
3636
<type>settings</type>
3737
</navigation>

apps/appstore/img/app-dark.svg

Lines changed: 1 addition & 0 deletions
Loading

apps/appstore/l10n/ga.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ OC.L10N.register(
44
"App store" : "Siopa aip",
55
"Apps" : "Feidhmchláir",
66
"Nextcloud Appstore" : "Siopa Aipeanna Nextcloud",
7+
"Appstore" : "Siopa Aipeanna",
78
"App name" : "Ainm aip",
89
"Version" : "Leagan",
910
"Support level" : "Leibhéal tacaíochta",

0 commit comments

Comments
 (0)