Skip to content

Commit ddb470f

Browse files
committed
Merge remote-tracking branch 'origin/master' into braille-deprecations
2 parents a5097d5 + 9294255 commit ddb470f

110 files changed

Lines changed: 8045 additions & 7714 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/add-new-language.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,27 @@ jobs:
2323

2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v7
2727
with:
2828
ref: beta
2929
fetch-depth: 1
3030
submodules: true
3131

3232
- name: Set up python
33-
uses: actions/setup-python@v5
33+
uses: actions/setup-python@v6
3434
with:
3535
python-version: '3.13'
3636
architecture: 'x86'
3737

3838
- name: setup uv
39-
uses: astral-sh/setup-uv@v6
39+
uses: astral-sh/setup-uv@v7
4040

4141
- name: Download translations from Crowdin
4242
run: uv run source/l10nUtil.py exportTranslations -o . -l ${{ matrix.newLanguage }}
4343
env:
4444
crowdinProjectID: ${{ vars.CROWDIN_PROJECT_ID }}
4545
crowdinAuthToken: ${{ secrets.CROWDIN_AUTH_TOKEN }}
4646

47-
- name: Install pre-commit
48-
run: |
49-
python -m pip install --upgrade pip
50-
pip install pre-commit
51-
pre-commit install
52-
53-
# Job will fail if pre-commit checks fail
5447
- name: Commit language files only
5548
id: commit
5649
shell: bash
@@ -61,6 +54,10 @@ jobs:
6154
git add source/locale/${{ matrix.newLanguage }}
6255
git add user_docs/${{ matrix.newLanguage }}
6356
57+
# Lint the staged translation files. If a hook fails or rewrites a file,
58+
# this step fails, so the job stops here and no pull request is opened.
59+
uv run prek run
60+
6461
# Check if there are any changes to commit
6562
if git diff --staged --quiet; then
6663
echo "No changes to commit"

.github/workflows/assign-milestone-on-close.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Check if milestone is set
3131
id: check-milestone
32-
uses: actions/github-script@v7
32+
uses: actions/github-script@v9
3333
with:
3434
github-token: ${{secrets.GITHUB_TOKEN}}
3535
script: |
@@ -42,7 +42,7 @@ jobs:
4242
4343
- name: Check merged
4444
id: check-done
45-
uses: actions/github-script@v7
45+
uses: actions/github-script@v9
4646
with:
4747
github-token: ${{secrets.GITHUB_TOKEN}}
4848
script: |
@@ -54,7 +54,7 @@ jobs:
5454
5555
- name: Assign default milestone
5656
if: steps.check-milestone.outputs.milestoneNotSet == 'true' && steps.check-done.outputs.isDone == 'true'
57-
uses: actions/github-script@v7
57+
uses: actions/github-script@v9
5858
with:
5959
github-token: ${{secrets.GITHUB_TOKEN}}
6060
script: |

.github/workflows/autofix.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# A part of NonVisual Desktop Access (NVDA)
2+
# Copyright (C) 2026 NV Access Limited, Leonard de Ruijter
3+
# This file may be used under the terms of the GNU General Public License, version 2 or later, as modified by the NVDA license.
4+
# For full terms and any additional permissions, see the NVDA license file: https://github.com/nvaccess/nvda/blob/master/copying.txt
5+
6+
name: Autofix or fail
7+
8+
on:
9+
push:
10+
# Never auto-fix the protected branches; PRs to them use pull_request below.
11+
branches-ignore:
12+
- master
13+
- beta
14+
- rc
15+
pull_request:
16+
branches:
17+
- master
18+
- beta
19+
- rc
20+
- 'try-**'
21+
workflow_dispatch:
22+
permissions:
23+
contents: write
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
autofix:
31+
name: Auto-fix and lint gate
32+
# On the base repo the pull_request run is the gate; skip its push run on non-Fork pushes to
33+
# avoid a duplicate. Fork pushes still run for autofix.
34+
if: github.event_name != 'push' || github.repository != 'nvaccess/nvda'
35+
runs-on: windows-2025-vs2026
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v7
39+
with:
40+
submodules: true
41+
- name: Set up python
42+
uses: actions/setup-python@v6
43+
with:
44+
# Keep in sync with defaultPythonVersion in testAndPublish.yml.
45+
python-version: '3.13.13'
46+
- name: Install the latest version of uv
47+
uses: astral-sh/setup-uv@v7
48+
with:
49+
activate-environment: "false"
50+
# Autofix role: run the fixer hooks (the "autofix" group) and push the fixes.
51+
- name: Apply prek auto-fixes
52+
if: github.event_name == 'push'
53+
shell: bash
54+
env:
55+
REF_NAME: ${{ github.ref_name }}
56+
run: |
57+
# Fixers exit non-zero when they change files. Some fixers' output feeds
58+
# another fixer, so a single pass may not reach a stable tree.
59+
# Re-run on the fixed tree until prek exits clean or we hit the cap.
60+
for attempt in 1 2 3; do
61+
if uvx prek run --group autofix --all-files; then
62+
break
63+
fi
64+
done
65+
if ! git diff --quiet; then
66+
git config user.name "github-actions"
67+
git config user.email "github-actions@github.com"
68+
git add -A
69+
git commit -m "Auto-fix: apply prek fixes"
70+
# Push via an explicit refspec so this works even if checkout left us
71+
# in a detached HEAD state.
72+
git push origin HEAD:"$REF_NAME"
73+
fi
74+
# Gate role: the merge-required blocking check (non-zero exit fails the job).
75+
# The 6 skipped hooks are the heavy/env-bound ones with dedicated jobs in
76+
# testAndPublish.yml.
77+
- name: Lint gate
78+
uses: j178/prek-action@v2
79+
with:
80+
extra-args: >-
81+
--all-files
82+
--skip checkPo
83+
--skip scons-source
84+
--skip checkPot
85+
--skip unitTest
86+
--skip licenseCheck
87+
--skip pyright

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838
build-mode: none
3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v7
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
45+
uses: github/codeql-action/init@v4
4646
with:
4747
languages: ${{ matrix.language }}
4848
build-mode: ${{ matrix.build-mode }}
@@ -70,6 +70,6 @@ jobs:
7070
exit 1
7171
7272
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/analyze@v3
73+
uses: github/codeql-action/analyze@v4
7474
with:
7575
category: "/language:${{matrix.language}}"

.github/workflows/fetch-crowdin-translations.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
GH_REPO: ${{ github.repository }}
3636

3737
- name: Checkout repository
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v7
3939
with:
4040
ref: beta
4141
fetch-depth: 1
@@ -48,7 +48,7 @@ jobs:
4848
architecture: 'x64'
4949

5050
- name: setup uv
51-
uses: astral-sh/setup-uv@v6
51+
uses: astral-sh/setup-uv@v7
5252

5353
- name: Download translations from Crowdin
5454
run: uv run source/l10nUtil.py exportTranslations -o .
@@ -83,7 +83,7 @@ jobs:
8383

8484
- name: Notify translators of errors
8585
if: steps.commit.outputs.has_failures == 'true'
86-
uses: dawidd6/action-send-mail@v4
86+
uses: dawidd6/action-send-mail@v18
8787
with:
8888
server_address: ${{ secrets.EMAIL_SERVER_ADDRESS }}
8989
server_port: ${{ secrets.EMAIL_SERVER_PORT || 465 }}

.github/workflows/monitor-localisation-file-changes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
GH_REPO: ${{ github.repository }}
2828

2929
- name: Checkout repository
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v7
3131
with:
3232
fetch-depth: 0
3333

@@ -45,7 +45,7 @@ jobs:
4545
echo "DOUBLE_SPACED_DIFF<<EOF"$'\n'"$DOUBLE_SPACED_DIFF"$'\n'EOF >> $GITHUB_OUTPUT
4646
4747
- name: Send email
48-
uses: dawidd6/action-send-mail@v4
48+
uses: dawidd6/action-send-mail@v18
4949
with:
5050
server_address: ${{ secrets.EMAIL_SERVER_ADDRESS }}
5151
server_port: ${{ secrets.EMAIL_SERVER_PORT || 465 }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# A part of NonVisual Desktop Access (NVDA)
2+
# Copyright (C) 2026 NV Access Limited, Leonard de Ruijter
3+
# This file may be used under the terms of the GNU General Public License, version 2 or later, as modified by the NVDA license.
4+
# For full terms and any additional permissions, see the NVDA license file: https://github.com/nvaccess/nvda/blob/master/copying.txt
5+
6+
name: Prek auto-update
7+
8+
on:
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
prekAutoUpdate:
17+
name: Prek auto-update
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v7
22+
# Install prek as a standalone binary
23+
- name: Install prek
24+
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/latest/download/prek-installer.sh | sh
25+
# --cooldown-days skips releases younger than 3 days, avoiding pinning to
26+
# a freshly published (and potentially yanked/broken) hook revision.
27+
- name: Run prek auto-update
28+
run: prek auto-update --cooldown-days 7
29+
- name: Create pull request
30+
shell: bash
31+
env:
32+
GITHUB_TOKEN: ${{ github.token }}
33+
run: |
34+
if git diff --quiet; then
35+
echo "No hook updates available."
36+
exit 0
37+
fi
38+
git config --local user.name "github-actions"
39+
git config --local user.email "github-actions@github.com"
40+
git checkout -b prek-autoupdate
41+
git commit -am "Prek auto-update"
42+
# Force push so a re-run replaces a stale auto-update branch.
43+
git push --force --set-upstream origin prek-autoupdate
44+
# Reuse the existing PR if one is already open from a previous run.
45+
gh pr create --base master --head prek-autoupdate \
46+
--title "Prek auto-update" \
47+
--body "Automated update of prek hook revisions." \
48+
|| echo "A pull request for prek-autoupdate already exists."

.github/workflows/regenerate_english_userDocs_translation_source.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ jobs:
2828
GH_REPO: ${{ github.repository }}
2929

3030
- name: Checkout repository
31-
uses: actions/checkout@v5
31+
uses: actions/checkout@v7
3232
with:
3333
fetch-depth: 0
3434
token: ${{ secrets.NVACCESSAUTO_PUSH_PAT }}
3535

3636
- name: Set up python
37-
uses: actions/setup-python@v5
37+
uses: actions/setup-python@v6
3838
with:
3939
python-version: '3.13'
4040
architecture: 'x86'

.github/workflows/testAndPublish.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
APIBackCompat: ${{ steps.releaseInfo.outputs.NVDA_API_COMPAT_TO }}
8080
steps:
8181
- name: Checkout NVDA
82-
uses: actions/checkout@v6
82+
uses: actions/checkout@v7
8383
with:
8484
submodules: recursive
8585
- name: Install Python
@@ -180,7 +180,7 @@ jobs:
180180
contents: read
181181
steps:
182182
- name: Checkout repository
183-
uses: actions/checkout@v6
183+
uses: actions/checkout@v7
184184
with:
185185
# Include gettext
186186
submodules: true
@@ -191,14 +191,14 @@ jobs:
191191
architecture: ${{ env.defaultArch }}
192192
- name: Install the latest version of uv
193193
uses: astral-sh/setup-uv@v7
194-
- name: Run pre-commit
194+
- name: Run prek
195195
run: |
196196
# Ensure uv environment is up to date.
197-
# If the uv environment is outdated, running pre-commit will trigger uv to generate a uv.lock file,
198-
# which causes checkPo to fail without clear errors because pre-commit fails when files are changed during its run.
199-
uv run pre-commit run uv-lock --all-files
200-
# Run pre-commit on the translations
201-
uv run pre-commit run checkPo --all-files
197+
# If the uv environment is outdated, running prek will trigger uv to generate a uv.lock file,
198+
# which causes checkPo to fail without clear errors because prek fails when files are changed during its run.
199+
uv run prek run uv-lock --all-files
200+
# Run prek on the translations
201+
uv run prek run checkPo --all-files
202202
- name: Add job summary
203203
if: ${{ failure() }}
204204
shell: bash
@@ -796,7 +796,7 @@ jobs:
796796
contents: read
797797
steps:
798798
- name: Checkout NVDA
799-
uses: actions/checkout@v6
799+
uses: actions/checkout@v7
800800
with:
801801
submodules: false
802802

0 commit comments

Comments
 (0)