Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Setup Node.JS
description: Setup Node.JS

inputs:
package_manager:
description: 'The package manager to use'
default: 'npm'
required: true

Comment on lines +4 to +9
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This composite action defines an input package_manager, but it’s not referenced in any step. Either wire it into the action (e.g., to choose npm/pnpm/yarn setup) or remove the unused input to avoid confusing callers.

Suggested change
inputs:
package_manager:
description: 'The package manager to use'
default: 'npm'
required: true

Copilot uses AI. Check for mistakes.
runs:
using: "composite"
steps:
- name: Setup node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version-file: '.node-version'
56 changes: 56 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Crowdin Action

on:
push:
branches: [ main ]

jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.JS
uses: ./.github/actions/setup-node

- name: Cache npm dependencies
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

- name: Install dependencies
run: |
npm config set cache ~/.npm
npm ci

- name: Generate crowdin file
id: extract_files
run: npm run generate_file

- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
auto_approve_imported: true
download_translations: false
create_pull_request: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

- name: Trigger download workflow
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
Comment on lines +49 to +52
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow requires secrets.PAT_TOKEN for the gh workflow run ... step, but the PR description only mentions CROWDIN_PROJECT_ID and CROWDIN_PERSONAL_TOKEN. Either document PAT_TOKEN in the PR description or switch to GITHUB_TOKEN / a GitHub App token if cross-repo workflow dispatch requires it.

Copilot uses AI. Check for mistakes.
gh workflow run getTranslations.yml \
--repo pagopa/devportal-docs-translations \
--ref main \
-f files='${{ steps.extract_files.outputs.found_files }}'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.idea
.env
node_modules
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.18.0
265 changes: 265 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "devportal-docs",
"version": "1.0.0",
"description": "This repository contains all some spaces synched from GitBook",
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package description text looks ungrammatical: "This repository contains all some spaces synched from GitBook". Consider rephrasing (e.g., "contains some spaces synced from GitBook") to avoid confusion in npm metadata.

Suggested change
"description": "This repository contains all some spaces synched from GitBook",
"description": "This repository contains some spaces synced from GitBook",

Copilot uses AI. Check for mistakes.
"main": "index.js",
"directories": {
"doc": "docs"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"generate_file": "npx ts-node src/updateCrowdin.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/pagopa/devportal-docs.git"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/node": "^25.2.3",
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@types/node is pinned to v25.x while the repo’s runtime Node version is 22.18.0 (see .node-version). Using mismatched Node typings can introduce incorrect type definitions and TS compilation/runtime assumptions. Consider aligning @types/node major to the Node runtime major (22.x) unless you intentionally target Node 25 APIs.

Suggested change
"@types/node": "^25.2.3",
"@types/node": "^22.0.0",

Copilot uses AI. Check for mistakes.
"ts-node": "^10.9.2",
"typescript": "^5.9.3"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/pagopa/devportal-docs/issues"
},
"homepage": "https://github.com/pagopa/devportal-docs#readme",
"dependencies": {
"js-yaml": "^4.1.1"
}
}
Loading