Author SHA1 Message Date
github-actions[bot] 818c20db48 chore: compile action bundle [skip compile]
renovate/stability-days Updates have met minimum release age requirement
2026-09-04 21:29:42 +00:00
Renovate 79a784d251 chore(deps): update dependency @vercel/ncc to ^0.45.0
renovate/stability-days Updates have met minimum release age requirement
Recompile dist/ on Renovate PR / recompile (pull_request) Successful in 5m47s
Test / Run Tests (pull_request) Successful in 6m29s
Test / Run Tests (push) Successful in 6m33s
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Successful in 1m0s
2026-09-04 21:24:24 +00:00
Philipp c08128c0ef feat: automate dist recompilation on Renovate PRs and configure concurrency limit (#120)
Test / Run Tests (push) Successful in 1m59s
### Summary of Changes

1. **Gitea Workflow (.gitea/workflows/recompile-dist.yaml)**:
   - Automates recompilation of dist/index.js on Renovate PRs.
   - Adds loop-prevention check for [skip compile].
2. **Renovate Configuration (
enovate.json)**:
   - Configures branchConcurrentLimit: 2 and prConcurrentLimit: 2.
   - Adds gitIgnoredAuthors for automated bot commits.
   - Adds rebaseWhen: 'behind-base-branch'.
   - Removes postUpgradeTasks.
3. **Test Workflow (.gitea/workflows/test.yaml)**:
   - Added pull_request trigger.
4. **Gitea-Only Setup**:
   - Removed .github/ workflows to keep workflow execution strictly on Gitea.
5. **Preferences (GEMINI.md)**:
   - Documented strict pnpm/pnpx rule.
6. **Tests**:
   - Added afterEach import in __tests__/index.test.js.

Reviewed-on: #120
Reviewed-by: LLMReview <27+autoreview@noreplay.horstenkamp.eu>
2026-09-04 23:20:17 +02:00
8 changed files with 104 additions and 56 deletions
+55
View File
@@ -0,0 +1,55 @@
name: Recompile dist/ on Renovate PR
on:
pull_request:
types: [opened, synchronize]
paths:
- package.json
- pnpm-lock.yaml
- index.js
- monitor.js
permissions:
contents: write
jobs:
recompile:
runs-on: pi
if: |
(github.actor == 'renovate[bot]' || contains(github.head_ref, 'renovate/')) &&
!contains(github.event.head_commit.message, '[skip compile]')
steps:
- name: Checkout PR Branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
cache: pnpm
- name: Clean Install
run: pnpm install --frozen-lockfile --ignore-scripts
shell: bash
- name: Build
run: pnpm run build
shell: bash
- name: Commit dist/
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add dist/
if git diff --staged --quiet; then
echo "No changes to dist/"
else
git commit -m "chore: compile action bundle [skip compile]"
git push origin HEAD:${{ github.head_ref }}
fi
shell: bash
+3 -1
View File
@@ -2,6 +2,7 @@ name: Test
on: on:
push: push:
pull_request:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -10,10 +11,11 @@ jobs:
runs-on: pi runs-on: pi
steps: steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: '24' node-version: '24'
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 cache: pnpm
- run: pnpm install --frozen-lockfile - run: pnpm install --frozen-lockfile
shell: bash shell: bash
- run: pnpm test - run: pnpm test
+6
View File
@@ -7,6 +7,7 @@ This repository is maintained by Gemini.
* **Test-Driven Development (TDD):** Wherever possible, Test-Driven Development principles should be followed. Write tests before writing the code they are intended to validate. * **Test-Driven Development (TDD):** Wherever possible, Test-Driven Development principles should be followed. Write tests before writing the code they are intended to validate.
* **Pre-commit Hooks:** Ensure that `pre-commit` hooks are installed and active before making any commits. This can be done by running `pre-commit install` in your local repository. * **Pre-commit Hooks:** Ensure that `pre-commit` hooks are installed and active before making any commits. This can be done by running `pre-commit install` in your local repository.
* **Note for Gemini:** Git commits trigger pre-commit hooks, which can take several seconds (or minutes) to complete. Checking the command status for git commit is only appropriate every 120s. * **Note for Gemini:** Git commits trigger pre-commit hooks, which can take several seconds (or minutes) to complete. Checking the command status for git commit is only appropriate every 120s.
* **Package Manager Preferences:** Always use `pnpm` and `pnpx`. Never use `npm` or `npx` under any circumstances. All package management operations, script runs, and tool invocations must use `pnpm` / `pnpx`.
## Repository Comparison ## Repository Comparison
@@ -32,3 +33,8 @@ The Gitea workflow does the following:
2. Sets up Node.js and pnpm. 2. Sets up Node.js and pnpm.
3. Installs the dependencies using `pnpm install`. 3. Installs the dependencies using `pnpm install`.
4. Runs the tests using `pnpm test`. 4. Runs the tests using `pnpm test`.
### Automated Recompilation & Permissions
* The automated recompilation workflow (`.gitea/workflows/recompile-dist.yaml`) recompiles `dist/index.js` on Renovate PRs and requires `contents: write` permissions to push back to the branch.
* Ensure that the Gitea repository workflow settings have write permissions enabled (**Settings** ➔ **Actions** ➔ **General** ➔ **Workflow permissions** ➔ **Read and write permissions**).
+1 -1
View File
@@ -1,4 +1,4 @@
import { vi, describe, it, expect, beforeEach } from "vitest"; import { vi, describe, it, expect, beforeEach, afterEach } from "vitest";
// Mock @actions/core for all tests in this file // Mock @actions/core for all tests in this file
vi.mock("@actions/core", () => ({ vi.mock("@actions/core", () => ({
+8 -8
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -3,7 +3,7 @@
"version": "0.2.1", "version": "0.2.1",
"description": "Deploys screeps code to the official game or a private server.", "description": "Deploys screeps code to the official game or a private server.",
"type": "module", "type": "module",
"packageManager": "pnpm@11.21.0", "packageManager": "pnpm@11.25.0",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "node index.js", "start": "node index.js",
@@ -17,8 +17,8 @@
"screeps-api": "^1.7.2" "screeps-api": "^1.7.2"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "^0.44.1", "@vercel/ncc": "^0.45.0",
"@vitest/coverage-v8": "^4.1.10", "@vitest/coverage-v8": "^4.1.11",
"vitest": "^4.1.10" "vitest": "^4.1.11"
} }
} }
+21 -27
View File
@@ -22,13 +22,13 @@ importers:
version: 1.16.1(supports-color@7.2.0) version: 1.16.1(supports-color@7.2.0)
devDependencies: devDependencies:
'@vercel/ncc': '@vercel/ncc':
specifier: ^0.44.1 specifier: ^0.45.0
version: 0.44.1 version: 0.45.0
'@vitest/coverage-v8': '@vitest/coverage-v8':
specifier: ^4.1.10 specifier: ^4.1.11
version: 4.1.11(vitest@4.1.11) version: 4.1.11(vitest@4.1.11)
vitest: vitest:
specifier: ^4.1.10 specifier: ^4.1.11
version: 4.1.11(@vitest/coverage-v8@4.1.11)(vite@8.2.1(yaml@2.9.0)) version: 4.1.11(@vitest/coverage-v8@4.1.11)(vite@8.2.1(yaml@2.9.0))
packages: packages:
@@ -89,8 +89,8 @@ packages:
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
'@jridgewell/sourcemap-codec@1.6.0': '@jridgewell/sourcemap-codec@1.5.5':
resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
'@jridgewell/trace-mapping@0.3.31': '@jridgewell/trace-mapping@0.3.31':
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
@@ -203,8 +203,8 @@ packages:
'@types/estree@1.0.9': '@types/estree@1.0.9':
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
'@vercel/ncc@0.44.1': '@vercel/ncc@0.45.0':
resolution: {integrity: sha512-cUjIE5P2YY1n+Kt9rFIazMMpGoPn1Fic04rOmTkElMkiDP5oszGfERMpo2shVkFKDL7rVppdM2pqJKC59shQWQ==} resolution: {integrity: sha512-8zPi1yO2mHpoKTD+e+Bf0ZT3e+sWHSOyGapm9s7b5R0gxJi3CiFTqmeQiMEyu6ejrz2s09M8JkEoUaTWjBJPQQ==}
hasBin: true hasBin: true
'@vitest/coverage-v8@4.1.11': '@vitest/coverage-v8@4.1.11':
@@ -330,8 +330,8 @@ packages:
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
es-module-lexer@2.3.2: es-module-lexer@2.3.1:
resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} resolution: {integrity: sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==}
es-object-atoms@1.1.2: es-object-atoms@1.1.2:
resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}
@@ -590,10 +590,6 @@ packages:
resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==}
engines: {node: '>=12'} engines: {node: '>=12'}
picomatch@4.0.7:
resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}
engines: {node: '>=12'}
postcss@8.5.26: postcss@8.5.26:
resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==}
engines: {node: ^10 || ^12 || >=14} engines: {node: ^10 || ^12 || >=14}
@@ -638,8 +634,8 @@ packages:
tinybench@2.9.0: tinybench@2.9.0:
resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}
tinyexec@1.3.1: tinyexec@1.3.0:
resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} resolution: {integrity: sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
tinyglobby@0.2.17: tinyglobby@0.2.17:
@@ -846,12 +842,12 @@ snapshots:
'@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/resolve-uri@3.1.2': {}
'@jridgewell/sourcemap-codec@1.6.0': {} '@jridgewell/sourcemap-codec@1.5.5': {}
'@jridgewell/trace-mapping@0.3.31': '@jridgewell/trace-mapping@0.3.31':
dependencies: dependencies:
'@jridgewell/resolve-uri': 3.1.2 '@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.6.0 '@jridgewell/sourcemap-codec': 1.5.5
'@oxc-project/types@0.143.0': {} '@oxc-project/types@0.143.0': {}
@@ -910,7 +906,7 @@ snapshots:
'@types/estree@1.0.9': {} '@types/estree@1.0.9': {}
'@vercel/ncc@0.44.1': {} '@vercel/ncc@0.45.0': {}
'@vitest/coverage-v8@4.1.11(vitest@4.1.11)': '@vitest/coverage-v8@4.1.11(vitest@4.1.11)':
dependencies: dependencies:
@@ -1044,7 +1040,7 @@ snapshots:
es-errors@1.3.0: {} es-errors@1.3.0: {}
es-module-lexer@2.3.2: {} es-module-lexer@2.3.1: {}
es-object-atoms@1.1.2: es-object-atoms@1.1.2:
dependencies: dependencies:
@@ -1210,7 +1206,7 @@ snapshots:
magic-string@0.30.21: magic-string@0.30.21:
dependencies: dependencies:
'@jridgewell/sourcemap-codec': 1.6.0 '@jridgewell/sourcemap-codec': 1.5.5
magicast@0.5.4: magicast@0.5.4:
dependencies: dependencies:
@@ -1266,8 +1262,6 @@ snapshots:
picomatch@4.0.5: {} picomatch@4.0.5: {}
picomatch@4.0.7: {}
postcss@8.5.26: postcss@8.5.26:
dependencies: dependencies:
nanoid: 3.3.18 nanoid: 3.3.18
@@ -1327,7 +1321,7 @@ snapshots:
tinybench@2.9.0: {} tinybench@2.9.0: {}
tinyexec@1.3.1: {} tinyexec@1.3.0: {}
tinyglobby@0.2.17: tinyglobby@0.2.17:
dependencies: dependencies:
@@ -1375,15 +1369,15 @@ snapshots:
'@vitest/snapshot': 4.1.11 '@vitest/snapshot': 4.1.11
'@vitest/spy': 4.1.11 '@vitest/spy': 4.1.11
'@vitest/utils': 4.1.11 '@vitest/utils': 4.1.11
es-module-lexer: 2.3.2 es-module-lexer: 2.3.1
expect-type: 1.4.0 expect-type: 1.4.0
magic-string: 0.30.21 magic-string: 0.30.21
obug: 2.1.4 obug: 2.1.4
pathe: 2.0.3 pathe: 2.0.3
picomatch: 4.0.7 picomatch: 4.0.5
std-env: 4.2.0 std-env: 4.2.0
tinybench: 2.9.0 tinybench: 2.9.0
tinyexec: 1.3.1 tinyexec: 1.3.0
tinyglobby: 0.2.17 tinyglobby: 0.2.17
tinyrainbow: 3.1.1 tinyrainbow: 3.1.1
vite: 8.2.1(yaml@2.9.0) vite: 8.2.1(yaml@2.9.0)
+6 -15
View File
@@ -5,20 +5,11 @@
"config:recommended", "config:recommended",
":automergeLinters" ":automergeLinters"
], ],
"packageRules": [ "rebaseWhen": "behind-base-branch",
{ "branchConcurrentLimit": 2,
"matchManagers": [ "prConcurrentLimit": 2,
"pnpm" "gitIgnoredAuthors": [
], "github-actions[bot]@users.noreply.github.com",
"postUpgradeTasks": { "bot@horstenkamp.eu"
"commands": [
"pnpm install --frozen-lockfile",
"pnpm run build"
],
"fileFilters": [
"dist/index.js"
]
}
}
] ]
} }