fix: publiccode.yml validation errors#1071
Conversation
📝 WalkthroughWalkthroughAdds a GitHub Actions workflow to validate Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
Add a GitHub Actions workflow to catch future ones.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@publiccode.yml`:
- Around line 53-54: Fix the two typos in the user-facing bullet list: change
"environnement" to "environment" in the bullet "- Define environnement variables
to be made available in the containers." and remove the duplicate word in the
second bullet by changing "Save and restore your service service
configurations." to "Save and restore your service configurations."
- Line 80: The feature description "Les utilisateurs peuvent définir la quantité
de RAM, de CPU et de GPU qu’ils souhaitent allouer à leurs conteneurs." exceeds
100 characters; replace that string in publiccode.yml with a concise French
variant under 100 characters (e.g., "Les utilisateurs définissent la quantité de
RAM, CPU et GPU allouée aux conteneurs") preserving the original meaning and
keeping total characters ≤100 so the `description/[lang]/features` item passes
publiccode schema validation.
- Around line 57-61: The listed external github-production-user-asset URLs in
publiccode.yml should be replaced with repository-hosted references: add the
five screenshot files into the repo (e.g., img/ or docs/assets/) and update the
entries in publiccode.yml to use repo-relative paths (like img/screenshot1.png)
or raw.githubusercontent.com URLs pointing to the same repository and commit;
locate the URL strings currently on lines containing
"github-production-user-asset-6210df..." in publiccode.yml and replace each with
the new repo-relative path or raw.githubusercontent.com URL after committing the
image files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fd61fca6-1178-4ef7-b7a4-f35f33c34a52
📒 Files selected for processing (2)
.github/workflows/publiccodeyml-check.ymlpubliccode.yml
✅ Files skipped from review due to trivial changes (1)
- .github/workflows/publiccodeyml-check.yml
| - Define environnement variables to be made available in the containers. | ||
| - Save and restore your service service configurations. |
There was a problem hiding this comment.
Fix English feature-list typos.
Line 53 has “environnement” and Line 54 repeats “service” twice; both are user-facing text defects.
✏️ Suggested text fix
- - Define environnement variables to be made available in the containers.
- - Save and restore your service service configurations.
+ - Define environment variables to be made available in the containers.
+ - Save and restore your service configurations.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Define environnement variables to be made available in the containers. | |
| - Save and restore your service service configurations. | |
| - Define environment variables to be made available in the containers. | |
| - Save and restore your service configurations. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@publiccode.yml` around lines 53 - 54, Fix the two typos in the user-facing
bullet list: change "environnement" to "environment" in the bullet "- Define
environnement variables to be made available in the containers." and remove the
duplicate word in the second bullet by changing "Save and restore your service
service configurations." to "Save and restore your service configurations."
| - https://github-production-user-asset-6210df.s3.amazonaws.com/6702424/273940140-f07e91e7-d597-4eca-b9df-2ddf457afb19.png | ||
| - https://github-production-user-asset-6210df.s3.amazonaws.com/6702424/273939460-77eb58e1-6f5d-43c4-8447-90f5c5aad5d2.png | ||
| - https://github-production-user-asset-6210df.s3.amazonaws.com/6702424/273939517-ae32ccab-e295-4079-b06e-c4035e67d7a4.png | ||
| - https://github-production-user-asset-6210df.s3.amazonaws.com/6702424/273939583-e8ec58ad-7dc8-410d-9cd3-5f0996e8f8f8.png | ||
| - https://github-production-user-asset-6210df.s3.amazonaws.com/6702424/273939654-b5256014-2af3-4e39-9ecb-f3f120aa920a.png |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Expected: zero flagged lines.
# Flags screenshot URLs that do not appear to be repo-relative or repo-owned.
awk '
/^[[:space:]]{4}screenshots:[[:space:]]*$/ {in_ss=1; next}
in_ss && /^[[:space:]]{4}(videos|features|documentation):/ {in_ss=0}
in_ss && /^[[:space:]]{6}- /{
url=$0
sub(/^[[:space:]]{6}- /, "", url)
if (url ~ /^https?:\/\// &&
url !~ /github\.com\/InseeFrLab\/onyxia/ &&
url !~ /raw\.githubusercontent\.com\/InseeFrLab\/onyxia/) {
print "Flag external screenshot URL: " url
bad=1
}
}
END { exit bad }
' publiccode.ymlRepository: InseeFrLab/onyxia
Length of output: 1561
🏁 Script executed:
#!/bin/bash
# Get the file size first
wc -l publiccode.yml
# Show lines 50-95 to see both sections mentioned (57-61 and 86-90)
echo "=== Lines 50-95 of publiccode.yml ==="
sed -n '50,95p' publiccode.yml | cat -nRepository: InseeFrLab/onyxia
Length of output: 4891
🏁 Script executed:
#!/bin/bash
# Check if there's any documentation or schema reference in the repo about publiccode.yml
find . -type f -name "*.md" -o -name "*.yml" -o -name "*.yaml" | \
xargs grep -l "publiccode" | head -20Repository: InseeFrLab/onyxia
Length of output: 122
🏁 Script executed:
#!/bin/bash
# Check the publiccodeyml validation workflow
cat .github/workflows/publiccodeyml-check.ymlRepository: InseeFrLab/onyxia
Length of output: 695
🌐 Web query:
publiccode.yml schema screenshot URLs repository-relative paths documentation
💡 Result:
In the publiccode.yml schema, screenshot URLs are specified under the key description/[lang]/screenshots, where [lang] is a language code like 'en' or 'it'. This is an optional array of strings representing paths to screenshot files. These paths are repository-relative, starting from the root of the repository where the publiccode.yml file is located (e.g., "img/sshot1.jpg" or "data/screenshots/configuration.png"). They can also be absolute URLs, but the files must reside in the same repository. Supported formats are PNG and JPG. Suggested sizes: Desktop 1280x800 @1x, Tablet 1024x768 @2x, Mobile 375x667 @2x. Example from official schema: description: en: screenshots: - img/sshot1.jpg - img/sshot2.jpg Official documentation: https://yml.publiccode.tools/schema.core.html#1-1-22-8-key-description-lang-screenshots
Citations:
- 1: https://yml.publiccode.tools/schema.core.html
- 2: Make screenshots accessible publiccodeyml/publiccode.yml#207
- 3: https://github.com/publiccodeyml/publiccode.yml/blob/main/docs/standard/example/publiccode.yml
Move screenshot images to the repository and use repo-relative paths or raw.githubusercontent.com URLs.
Lines 57-61 and 86-90 use externally hosted github-production-user-asset URLs. The publiccode.yml schema expects repository-relative paths (e.g., img/screenshot.png) or absolute URLs where files reside in the same repository. These temporary CDN URLs are brittle for long-term maintenance—they can expire or become inaccessible. With no-network: true in CI validation, broken links won't be caught automatically.
Replace with repo-relative paths (checked into the repository) or raw.githubusercontent.com URLs under InseeFrLab/onyxia.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@publiccode.yml` around lines 57 - 61, The listed external
github-production-user-asset URLs in publiccode.yml should be replaced with
repository-hosted references: add the five screenshot files into the repo (e.g.,
img/ or docs/assets/) and update the entries in publiccode.yml to use
repo-relative paths (like img/screenshot1.png) or raw.githubusercontent.com URLs
pointing to the same repository and commit; locate the URL strings currently on
lines containing "github-production-user-asset-6210df..." in publiccode.yml and
replace each with the new repo-relative path or raw.githubusercontent.com URL
after committing the image files.
| - Sauvegardez et restaurez vos configurations de services. | ||
| - Visualiser les jeux de données | ||
| - UI de lancement d'images docker (Helm charts) | ||
| - Les utilisateurs peuvent définir la quantité de RAM, de CPU et de GPU qu’ils souhaitent allouer à leurs conteneurs. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Expected: no output. Any output indicates a feature item > 100 chars.
awk '
/^[[:space:]]{2}(en|fr):[[:space:]]*$/ {lang=$1; sub(":","",lang)}
/^[[:space:]]{4}features:[[:space:]]*$/ {in_features=1; next}
in_features && /^[[:space:]]{4}(screenshots|videos|documentation):/ {in_features=0}
in_features && /^[[:space:]]{6}- /{
text=$0
sub(/^[[:space:]]{6}- /, "", text)
if (length(text) > 100) {
printf "Feature too long [%s]: %d chars | %s\n", lang, length(text), text
bad=1
}
}
END { exit bad }
' publiccode.ymlRepository: InseeFrLab/onyxia
Length of output: 212
Shorten the French feature item on line 80 to comply with publiccode standard (max 100 characters per feature).
The feature description "Les utilisateurs peuvent définir la quantité de RAM, de CPU et de GPU qu'ils souhaitent allouer à leurs conteneurs." is 120 characters, exceeding the 100-character limit. This violates the publiccode.yml schema constraint for description/[lang]/features items per https://docs.italia.it/italia/developers-italia/publiccodeyml-en/en/master/schema.core.html. Reduce the text to pass validation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@publiccode.yml` at line 80, The feature description "Les utilisateurs peuvent
définir la quantité de RAM, de CPU et de GPU qu’ils souhaitent allouer à leurs
conteneurs." exceeds 100 characters; replace that string in publiccode.yml with
a concise French variant under 100 characters (e.g., "Les utilisateurs
définissent la quantité de RAM, CPU et GPU allouée aux conteneurs") preserving
the original meaning and keeping total characters ≤100 so the
`description/[lang]/features` item passes publiccode schema validation.



Fix validation errors and add a GitHub Actions workflow to catch future ones.
Summary by CodeRabbit