diff --git a/.github/workflows/publish-pr-screenshot.yml b/.github/workflows/publish-pr-screenshot.yml index 5aadf4206f5..0c8a39eea53 100644 --- a/.github/workflows/publish-pr-screenshot.yml +++ b/.github/workflows/publish-pr-screenshot.yml @@ -338,7 +338,7 @@ jobs: # is untrusted, so only accept lines we know HINTS=$(grep -xF -f <(bash code/diagnose.sh --list) out/hints.md || true) if [ -n "$HINTS" ] ; then - [ "$CONCLUSION" = success ] && echo "**Warnings:**" && echo + [ "$CONCLUSION" = success ] && echo "**Suggestions for improving the AppImage:**" && echo echo "$HINTS" | sed 's/^/- /' echo fi @@ -362,7 +362,7 @@ jobs: # Errors or findings: @mention the GitHub account the AppImage comes # from, unless that is who opened the PR (or a bot). The URL is read # from the PR's data/ files at the tested commit, not from the artifact. - if [ "$CONCLUSION" != success ] || grep -qE '^\*\*(Warnings|Names):\*\*' comment.md ; then + if [ "$CONCLUSION" != success ] || grep -qE '^\*\*(Suggestions for improving the AppImage|Names):\*\*' comment.md ; then AUTHOR=$(gh api "repos/$REPO/pulls/$PR" --jq '.user.login' | tr 'A-Z' 'a-z') OWNERS=$(gh api --paginate "repos/$REPO/pulls/$PR/files" \ --jq '.[] | select(.filename | startswith("data/")) | select(.status != "removed") | .filename' \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb5e544f0c5..c5a6356cfb5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -185,8 +185,10 @@ jobs: appname=$(basename "$(dirname "$screenshot")" | tr -cd 'A-Za-z0-9._-') cp "$screenshot" "pr-result/${appname}.png" done - # For the screenshot-ok label: a screenshot, and code/check-screenshot.sh had no remarks - if ls pr-result/*.png >/dev/null 2>&1 && ! grep -qE '^(WARNING|ERROR): The (window|screenshot)' log.txt ; then + # For the screenshot-ok label: a screenshot, and code/check-screenshot.sh had no + # remarks, except that the window is mostly dark (only a suggestion: a dark + # theme by default is not a defect of the test, and the screenshot still shows the application) + if ls pr-result/*.png >/dev/null 2>&1 && ! grep -E '^(WARNING|ERROR): The (window|screenshot)' log.txt | grep -qv '^WARNING: The window is mostly dark' ; then touch pr-result/screenshot-ok fi else diff --git a/AGENTS.md b/AGENTS.md index 6ae17836dd1..0be91f1c7c0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -71,7 +71,7 @@ GitHub Pages (Jekyll) from this repository. - `code/check-names-agree.sh`: a warning when the name of the repository, the AppImage's name and the README's headline (`code/fetch-readme.sh`) disagree within a tolerance (equal, one contains the other, or >= 80 % similar, ignoring - case and punctuation); shown under "Names" and "Warnings" in the test result; + case and punctuation); shown under "Names" and "Suggestions for improving the AppImage" in the test result; it also warns when the file name has a `-` where the README writes blanks (`XI-on-Anything`, README "XI on Anything"): use `_` (`XI_on_Anything`); `code/pick-name.sh` (discovery) does that itself; - runs the application in firejail **without network**, waits 30 s, takes a @@ -90,7 +90,8 @@ GitHub Pages (Jekyll) from this repository. 60 % of a downscaled gray version darker than 35 % gray, mean below 35 %): the test system has no dark-mode preference, so the application defaults to a dark theme, which the README asks not to do (a dark canvas of a video - player or game is fine; warning only, skipped for `terminal` and `tray`); + player or game is fine; warning only, skipped for `terminal` and `tray`; if it + is the only remark about the screenshot, `screenshot-ok` is still set); - warns when the AppImage has no (or broken) update information; - writes `database/` and `apps/`. `links:` in `apps/.md` (shown on the page and in `feed.json`) gets the repository and its releases for @@ -114,7 +115,10 @@ GitHub Pages (Jekyll) from this repository. none applies) and removes `error-*` labels that no longer apply; the green `screenshot-ok` label marks a passed test whose screenshot `code/check-screenshot.sh` found fine - (no warnings). + (no warnings; a mostly dark window alone does not count). + Warnings about the AppImage itself (no update information, ...) are listed + under "Suggestions for improving the AppImage" in the comment; they do not + keep `screenshot-ok` from being set either. When the test failed or reports warnings or name remarks, the comment @mentions the GitHub account the AppImage comes from (`code/upstream-owner.sh` on the first line of the PR's `data/` files,