Skip to content

Commit 1e774ff

Browse files
authored
chore: Merge master into jtr/refactor-imagePath, resolve conflict in URLGenerator.php
Signed-off-by: Josh <josh.t.richards@gmail.com>
2 parents 0c73423 + 5467d41 commit 1e774ff

6,087 files changed

Lines changed: 64913 additions & 33552 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.

.devcontainer/codespace.config.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@
77
$codespaceName = getenv('CODESPACE_NAME');
88
$codespaceDomain = getenv('GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN');
99

10+
// When running under Apache, env vars from the shell profile are not inherited.
11+
// Fall back to the Codespaces shared environment file and the well-known domain.
12+
if (empty($codespaceName)) {
13+
$sharedEnvFile = '/workspaces/.codespaces/shared/environment-variables.json';
14+
if (is_readable($sharedEnvFile)) {
15+
$sharedEnv = json_decode(file_get_contents($sharedEnvFile), true) ?? [];
16+
$codespaceName = $sharedEnv['CODESPACE_NAME'] ?? '';
17+
}
18+
}
19+
if (!empty($codespaceName) && empty($codespaceDomain)) {
20+
$codespaceDomain = 'app.github.dev';
21+
}
22+
1023
$CONFIG = [
1124
'mail_from_address' => 'no-reply',
1225
'mail_smtpmode' => 'smtp',

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ package-lock.json @nextcloud/server-dependabot
3838
/apps/encryption/appinfo/info.xml @come-nc @icewind1991
3939
/apps/federatedfilesharing/appinfo/info.xml @icewind1991 @danxuliu
4040
/apps/federation/appinfo/info.xml @nfebe @sorbaugh
41-
/apps/files/appinfo/info.xml @skjnldsv @ArtificialOwl @come-nc @artonge @icewind1991 @szaimen @susnux @nfebe
41+
/apps/files/appinfo/info.xml @skjnldsv @icewind1991 @szaimen @susnux @nfebe
4242
/apps/files_external/appinfo/info.xml @icewind1991 @artonge
4343
/apps/files_reminders/appinfo/info.xml @skjnldsv @sorbaugh
44-
/apps/files_sharing/appinfo/info.xml @skjnldsv @come-nc
44+
/apps/files_sharing/appinfo/info.xml @skjnldsv @provokateurin @nfebe
4545
/apps/files_trashbin/appinfo/info.xml @icewind1991 @sorbaugh
4646
/apps/files_versions/appinfo/info.xml @artonge @icewind1991
4747
/apps/oauth2/appinfo/info.xml @julien-nc @ChristophWurst
4848
/apps/provisioning_api/appinfo/info.xml @provokateurin @nickvergessen
4949
/apps/settings/appinfo/info.xml @hweihwang @sorbaugh
50-
/apps/sharebymail/appinfo/info.xml @Altahrim @skjnldsv
50+
/apps/sharebymail/appinfo/info.xml @provokateurin @skjnldsv
5151
/apps/systemtags/appinfo/info.xml @Antreesy @marcelklehr
5252
/apps/theming/appinfo/info.xml @skjnldsv @juliusknorr
5353
/apps/twofactor_backupcodes/appinfo/info.xml @miaulalala @ChristophWurst

.github/CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,26 @@ Help us to maximize the effort we can spend fixing issues and adding new feature
3131

3232
Thanks for wanting to contribute source code to Nextcloud. That's great!
3333

34+
Please read the [general contribution guidelines][contributing] that apply to all Nextcloud repositories, and the [AI Contribution Policy][aipolicy] if you are using AI tools.
35+
3436
Please read the [Developer Manuals][devmanual] to learn how to create your first application or how to test the Nextcloud code with PHPUnit.
3537

38+
### AI-assisted contributions
39+
40+
Nextcloud allows contributions made with the help of AI tools. You are the author of everything you submit - AI assistance does not change that responsibility.
41+
42+
* **Disclosure:** Declare AI tool use in the PR description and add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to each affected commit.
43+
44+
* **Accountability:** You must be able to explain, defend, and modify every line you submit. If a reviewer asks why something works a certain way, "the AI wrote it" is not an answer.
45+
46+
* **Communication:** PR descriptions, review comments, and issue reports must be written in your own words. This applies throughout the review process - passing reviewer feedback to an AI and posting whatever comes out is not acceptable.
47+
48+
* **Quality:** AI output must be quality assured by the human, i.e. reviewed, cleaned up, and tested before submission. New features must be tested on a live instance by you, not by an agent. Code that has never been executed, or that shifts debugging work onto maintainers, will not be accepted.
49+
50+
* **Licensing:** Ensure AI-generated code contains no material incompatible with the license of the repository you are contributing to.
51+
52+
For the full policy including autonomous agent rules, security reports, and beginner issues, read the [AI Contribution Policy][aipolicy].
53+
3654
### Conventional Commits
3755

3856
Please use [Conventional Commits](https://www.conventionalcommits.org) for your commit messages. This helps maintain clarity and consistency across the project, making it easier to understand changes and automate versioning.
@@ -72,6 +90,8 @@ In case you are not sure how to add or update the license header correctly pleas
7290
[devmanual]: https://docs.nextcloud.com/server/latest/developer_manual/
7391
[dcofile]: https://github.com/nextcloud/server/blob/master/contribute/developer-certificate-of-origin
7492
[applyalicense]: https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md
93+
[contributing]: https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md
94+
[aipolicy]: https://github.com/nextcloud/.github/blob/master/AI_POLICY.md
7595

7696
## Translations
7797
Please submit translations via [Transifex][transifex].

.github/workflows/ai-policy.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
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-low
31+
steps:
32+
- name: Collect PR commit messages
33+
id: collect
34+
env:
35+
GH_TOKEN: ${{ github.token }}
36+
COMMITS_URL: ${{ github.event.pull_request.commits_url }}
37+
run: |
38+
set -euo pipefail
39+
gh api ${COMMITS_URL} | jq -r '.[] | .commit.message' > /tmp/pr_commits.txt
40+
echo "--- PR commit messages ---"
41+
cat /tmp/pr_commits.txt
42+
echo "--------------------------"
43+
44+
- name: Define shared agent detection patterns
45+
run: |
46+
set -euo pipefail
47+
48+
# Email addresses known to be used by coding agents.
49+
# These should never appear in Signed-off-by because the DCO can only be attested by a human.
50+
EMAIL_PATTERN="copilot@github\.com\
51+
|noreply@anthropic\.com\
52+
|devin@cognition\.ai\
53+
|devin@cognition-labs\.com\
54+
|aider@aider\.chat\
55+
|noreply@aider\.chat\
56+
|codex@openai\.com\
57+
|cursor@anysphere\.com\
58+
|windsurf@codeium\.com\
59+
|codeium@codeium\.com\
60+
|amazon-q@amazon\.com\
61+
|codewhisperer@amazon\.com\
62+
|gemini-code-assist@google\.com\
63+
|openhands@all-hands\.dev\
64+
|swe-agent@princeton\.edu"
65+
66+
# Strip embedded whitespace (used above only for readability)
67+
EMAIL_PATTERN=$(echo "$EMAIL_PATTERN" | tr -d ' \n')
68+
echo "AGENT_EMAIL_PATTERN=${EMAIL_PATTERN}" >> "$GITHUB_ENV"
69+
70+
# Display-name prefixes used by known coding agents (shared by Signed-off-by and Co-Authored-By checks)
71+
# shellcheck disable=SC2016
72+
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"
73+
74+
- name: Check for AI-assistant / Assisted-by trailers
75+
id: ai_trailers
76+
run: |
77+
set -euo pipefail
78+
AI_ASSISTED=false
79+
if grep -qiE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt; then
80+
AI_ASSISTED=true
81+
echo "Found AI-assistant/Assisted-by/AI-Assisted-By trailer(s):"
82+
grep -iE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt
83+
fi
84+
echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT"
85+
86+
- name: Check for coding-agent Signed-off-by trailers
87+
id: agent_signoff
88+
run: |
89+
set -euo pipefail
90+
91+
EMAIL_HITS=$(grep -iE "^Signed-off-by:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true)
92+
NAME_HITS=$(grep -iE "^Signed-off-by: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true)
93+
94+
AGENT_LINES=$(printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d')
95+
96+
AGENT_SIGNOFF=false
97+
if [ -n "$AGENT_LINES" ]; then
98+
AGENT_SIGNOFF=true
99+
fi
100+
101+
echo "agent_signoff=${AGENT_SIGNOFF}" >> "$GITHUB_OUTPUT"
102+
{
103+
echo "agent_lines<<AGENT_EOF"
104+
echo "${AGENT_LINES}"
105+
echo "AGENT_EOF"
106+
} >> "$GITHUB_OUTPUT"
107+
108+
- name: Check for coding-agent Co-Authored-By trailers
109+
id: co_authored
110+
run: |
111+
set -euo pipefail
112+
113+
EMAIL_HITS=$(grep -iE "^Co-Authored-By:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true)
114+
NAME_HITS=$(grep -iE "^Co-Authored-By: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true)
115+
116+
CO_AUTHORED=false
117+
if [ -n "$EMAIL_HITS" ] || [ -n "$NAME_HITS" ]; then
118+
CO_AUTHORED=true
119+
echo "Found coding-agent Co-Authored-By trailer(s):"
120+
printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d'
121+
fi
122+
123+
echo "co_authored=${CO_AUTHORED}" >> "$GITHUB_OUTPUT"
124+
125+
- name: Create 'AI assisted' label if absent
126+
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
127+
env:
128+
GH_TOKEN: ${{ github.token }}
129+
run: |
130+
gh api "repos/${{ github.repository }}/labels" \
131+
--method POST \
132+
-f name="AI assisted" \
133+
-f color="d93f0b" \
134+
-f description="This PR contains AI-assisted commits" \
135+
2>/dev/null || true
136+
137+
- name: Label PR as AI assisted
138+
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
139+
env:
140+
GH_TOKEN: ${{ github.token }}
141+
run: |
142+
gh pr edit "${{ github.event.pull_request.number }}" \
143+
--repo "${{ github.repository }}" \
144+
--add-label "AI assisted"
145+
echo "Added 'AI assisted' label to PR #${{ github.event.pull_request.number }}"
146+
147+
- name: Fail on coding-agent Signed-off-by
148+
if: steps.agent_signoff.outputs.agent_signoff == 'true'
149+
env:
150+
AGENT_LINES: ${{ steps.agent_signoff.outputs.agent_lines }}
151+
AGENTS_MD_URL: https://github.com/${{ github.repository }}/blob/${{ github.base_ref }}/AGENTS.md
152+
run: |
153+
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."
154+
echo ""
155+
echo "Offending trailer(s):"
156+
echo "${AGENT_LINES}"
157+
echo ""
158+
echo "The 'Signed-off-by' trailer represents the Developer Certificate of Origin (DCO)"
159+
echo "and must only be attested by a human contributor."
160+
echo "Please amend the affected commit(s) to remove the coding-agent sign-off"
161+
echo "and replace it with an 'Assisted-by' trailer, for example:"
162+
echo ""
163+
echo " Assisted-by: Claude Code:claude-sonnet-4-6"
164+
echo ""
165+
echo "References:"
166+
echo " • AGENTS.md (this repository)"
167+
echo " ${AGENTS_MD_URL}"
168+
echo " • AI Contribution Policy"
169+
echo " https://github.com/nextcloud/.github/blob/master/AI_POLICY.md"
170+
echo " • Contribution Guidelines"
171+
echo " https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md"
172+
exit 1

.github/workflows/autocheckers.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ jobs:
4444
needs: changes
4545
if: needs.changes.outputs.src != 'false'
4646

47-
strategy:
48-
matrix:
49-
php-versions: ['8.2']
50-
5147
name: PHP checkers
5248

5349
steps:
@@ -57,11 +53,11 @@ jobs:
5753
persist-credentials: false
5854
submodules: true
5955

60-
- name: Set up php ${{ matrix.php-versions }}
56+
- name: Set up php
6157
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc #v2.37.1
6258
timeout-minutes: 5
6359
with:
64-
php-version: ${{ matrix.php-versions }}
60+
php-version: '8.3'
6561
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
6662
coverage: none
6763
ini-file: development
@@ -77,10 +73,6 @@ jobs:
7773
needs: changes
7874
if: needs.changes.outputs.src != 'false'
7975

80-
strategy:
81-
matrix:
82-
php-versions: ['8.2']
83-
8476
name: Translation and Files checkers
8577

8678
steps:
@@ -90,11 +82,11 @@ jobs:
9082
persist-credentials: false
9183
submodules: true
9284

93-
- name: Set up php ${{ matrix.php-versions }}
85+
- name: Set up php
9486
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc #v2.37.1
9587
timeout-minutes: 5
9688
with:
97-
php-version: ${{ matrix.php-versions }}
89+
php-version: '8.3'
9890
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
9991
coverage: none
10092
ini-file: development

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737
persist-credentials: false
3838

3939
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
40+
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
4141
with:
4242
languages: ${{ matrix.language }}
4343
build-mode: ${{ matrix.build-mode }}
4444
config-file: ./.github/codeql-config.yml
4545

4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
47+
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
4848
with:
4949
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)