1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

Merge branch 'master' into master

This commit is contained in:
Danja Vasiliev 2024-08-17 15:32:35 +02:00 committed by GitHub
commit 124a5b163e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 125 additions and 31 deletions

6
.gitignore vendored
View file

@ -16,3 +16,9 @@ __pycache__/
# yunohost specific cache/output dirs
.apps_cache
builds*
# Static assets
tools/app_generator/static
# local debuggings
package_linter/

View file

@ -352,7 +352,7 @@ added_date = 1674232499 # 2023/01/20
antifeatures = [ "deprecated-software" ]
category = "social_media"
deprecated_date = 1695719324 # 2023/09/26
level = 6
level = 0
potential_alternative_to = [ "Mastodon", "Pleroma", "Twitter" ]
state = "working"
url = "https://github.com/YunoHost-Apps/calckey_ynh"
@ -638,6 +638,7 @@ url = "https://github.com/YunoHost-Apps/cultivons_ynh"
[custom_backup]
added_date = 1722705585 # 2024/08/03
category = "system_tools"
level = 0
state = "working"
subtags = [ "backup" ]
url = "https://github.com/YunoHost-Apps/custom_backup_ynh"
@ -810,7 +811,7 @@ url = "https://github.com/YunoHost-Apps/django-fmd_ynh"
[django-for-runners]
added_date = 1674232499 # 2023/01/20
category = "small_utilities"
level = 3
level = 0
state = "working"
url = "https://github.com/YunoHost-Apps/django-for-runners_ynh"
@ -1025,7 +1026,7 @@ url = "https://github.com/YunoHost-Apps/epicyon_ynh"
[ergo]
added_date = 1674232499 # 2023/01/20
category = "communication"
level = 8
level = 6
state = "working"
subtags = [ "chat" ]
url = "https://github.com/YunoHost-Apps/ergo_ynh"
@ -1092,6 +1093,13 @@ level = 8
state = "working"
url = "https://github.com/YunoHost-Apps/facilmap_ynh"
[faircamp]
added_date = 1723843587 # 2024/08/16
category = "publishing"
state = "working"
subtags = [ "static_site_generator", "website" ]
url = "https://github.com/YunoHost-Apps/faircamp_ynh"
[fastapi]
added_date = 1701639252 # 2023/12/03
category = "publishing"
@ -1506,7 +1514,9 @@ url = "https://github.com/YunoHost-Apps/h5ai_ynh"
[halcyon]
added_date = 1674232499 # 2023/01/20
antifeatures = [ "bad-security-reputation", "deprecated-software" ]
category = "social_media"
deprecated_date = 1723889033 # 2024/08/17
level = 6
potential_alternative_to = [ "X" ]
state = "working"
@ -1657,7 +1667,7 @@ url = "https://github.com/YunoHost-Apps/icecoder_ynh"
[iceshrimp]
added_date = 1703341532 # 2023/12/23
category = "social_media"
level = 7
level = 6
potential_alternative_to = [ "Calckey", "Mastodon", "Misskey", "Pleroma", "Threads", "X" ]
state = "working"
url = "https://github.com/YunoHost-Apps/iceshrimp_ynh"
@ -2237,7 +2247,7 @@ url = "https://github.com/YunoHost-Apps/matomo_ynh"
[matrix-appservice-irc]
added_date = 1675621561 # 2023/02/05
category = "communication"
level = 8
level = 6
state = "working"
subtags = [ "chat" ]
url = "https://github.com/YunoHost-Apps/matrix-appservice-irc_ynh"
@ -2309,7 +2319,7 @@ url = "https://github.com/YunoHost-Apps/mautrix_telegram_ynh"
[mautrix_whatsapp]
added_date = 1674232499 # 2023/01/20
category = "communication"
level = 6
level = 8
potential_alternative_to = [ "Whatsapp" ]
state = "working"
subtags = [ "chat" ]
@ -2444,7 +2454,7 @@ url = "https://github.com/YunoHost-Apps/moncycle_ynh"
added_date = 1674232499 # 2023/01/20
branch = "main"
category = "system_tools"
level = 8
level = 6
state = "working"
subtags = [ "db" ]
url = "https://github.com/YunoHost-Apps/mongo-express_ynh"
@ -2541,7 +2551,7 @@ url = "https://github.com/YunoHost-Apps/my-mind_ynh"
[my_capsule]
added_date = 1674232499 # 2023/01/20
category = "publishing"
level = 7
level = 6
state = "working"
url = "https://github.com/YunoHost-Apps/my_capsule_ynh"
@ -2563,7 +2573,7 @@ url = "https://github.com/YunoHost-Apps/my_webdav_ynh"
[mybb]
added_date = 1674232499 # 2023/01/20
category = "communication"
level = 8
level = 6
state = "working"
subtags = [ "forum" ]
url = "https://github.com/YunoHost-Apps/mybb_ynh"
@ -2731,7 +2741,7 @@ url = "https://github.com/YunoHost-Apps/omeka-s_ynh"
[onlyoffice]
added_date = 1674232499 # 2023/01/20
category = "office"
level = 6
level = 8
potential_alternative_to = [ "Google Docs", "Microsoft Excel", "Microsoft Office", "Microsoft PowerPoint", "Microsoft Word" ]
state = "working"
subtags = [ "impress", "spreadsheet", "text" ]
@ -2767,7 +2777,7 @@ url = "https://github.com/YunoHost-Apps/openproject_ynh"
[opensearch]
added_date = 1674232499 # 2023/01/20
category = "dev"
level = 6
level = 8
potential_alternative_to = [ "ElasticSearch" ]
state = "working"
subtags = [ "programming" ]
@ -2891,7 +2901,7 @@ url = "https://github.com/YunoHost-Apps/pairdrop_ynh"
[paperless-ngx]
added_date = 1674232499 # 2023/01/20
category = "synchronization"
level = 6
level = 8
state = "working"
subtags = [ "files" ]
url = "https://github.com/YunoHost-Apps/paperless-ngx_ynh"
@ -2966,7 +2976,7 @@ url = "https://github.com/YunoHost-Apps/petrolette_ynh"
[pgadmin]
added_date = 1674232499 # 2023/01/20
category = "system_tools"
level = 8
level = 6
state = "working"
subtags = [ "db" ]
url = "https://github.com/YunoHost-Apps/pgadmin_ynh"
@ -3529,7 +3539,7 @@ url = "https://github.com/YunoHost-Apps/scrutiny_ynh"
[seafile]
added_date = 1674232499 # 2023/01/20
category = "synchronization"
level = 7
level = 6
potential_alternative_to = [ "Dropbox", "Google Drive", "Mega", "Microsoft OneDrive", "Resilio Sync", "Time Machine" ]
state = "working"
subtags = [ "files" ]
@ -3992,7 +4002,7 @@ url = "https://github.com/YunoHost-Apps/timeoff_ynh"
[tinyfilemanager]
added_date = 1674232499 # 2023/01/20
category = "small_utilities"
level = 8
level = 6
state = "working"
url = "https://github.com/YunoHost-Apps/tinyfilemanager_ynh"
@ -4073,7 +4083,7 @@ url = "https://github.com/YunoHost-Apps/trilium_ynh"
[trustyhash]
added_date = 1674232499 # 2023/01/20
category = "small_utilities"
level = 8
level = 6
state = "working"
url = "https://github.com/YunoHost-Apps/trustyhash_ynh"
@ -4124,7 +4134,7 @@ url = "https://github.com/YunoHost-Apps/tyto_ynh"
[ulogger]
added_date = 1674232499 # 2023/01/20
category = "small_utilities"
level = 8
level = 6
state = "working"
url = "https://github.com/YunoHost-Apps/ulogger_ynh"
@ -4360,7 +4370,7 @@ url = "https://github.com/YunoHost-Apps/xbackbone_ynh"
[xwiki]
added_date = 1702980278 # 2023/12/19
category = "publishing"
level = 7
level = 6
potential_alternative_to = [ "GitBook", "Notion" ]
state = "working"
subtags = [ "wiki" ]

BIN
logos/faircamp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -132,14 +132,14 @@
</a>
</td>
<td class="border-l-2 border-gray-100 text-center">
<a class="{% if infos["public_level"] == infos["ci_results"]["main"]["level"] or infos["ci_results"]["main"]["timestamp"] | days_ago > 30 %}opacity-50{% endif %}" href="https://ci-apps.yunohost.org/ci/apps/{{ app }}/">
<a class="{% if infos["public_level"] == infos["ci_results"]["main"]["level"] or (infos["ci_results"]["main"]["timestamp"] or -9999) | days_ago > 30 %}opacity-50{% endif %}" href="https://ci-apps.yunohost.org/ci/apps/{{ app }}/">
{% if infos["public_level"] == infos["ci_results"]["main"]["level"] %}
=
{% else %}
{{ infos["ci_results"]["main"]["level"] }}
{% endif %}
{% if infos["ci_results"]["main"]["timestamp"] | days_ago > 30 %}
<i class="fa fa-hourglass-o" title="{{ _("Outdated test (%(days)s days ago)", days=infos["ci_results"]["main"]["timestamp"] | days_ago) }}"></i>
{% if (infos["ci_results"]["main"]["timestamp"] or -9999) | days_ago > 30 %}
<i class="fa fa-hourglass-o" title="{{ _("Outdated test (%(days)s days ago)", days=(infos["ci_results"]["main"]["timestamp"] or -9999) | days_ago) }}"></i>
{% endif %}
{% if infos["public_level"] == "?" %}
{% elif infos["ci_results"]["main"]["level"] < infos["public_level"] and infos["ci_results"]["main"]["level"] == 0 %}

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-03-31 19:33+0200\n"
"PO-Revision-Date: 2024-08-04 15:41+0000\n"
"PO-Revision-Date: 2024-08-07 06:55+0000\n"
"Last-Translator: Ivan Davydov <lotigara@lotigara.ru>\n"
"Language-Team: Russian <https://translate.yunohost.org/projects/yunohost/"
"readme-generator/ru/>\n"
@ -151,7 +151,7 @@ msgid ""
"install) to learn how to install it."
msgstr ""
"Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost"
".org/install), чтобы узнать, как установить её."
".org/install), чтобы узнать, как установить его."
#: templates/README.md.j2:33
msgid "Overview"
@ -188,7 +188,7 @@ msgstr "Документация и ресурсы"
#: templates/README.md.j2:68
msgid "Official app website:"
msgstr "Официадьный веб-сайт приложения:"
msgstr "Официальный веб-сайт приложения:"
#: templates/README.md.j2:70
msgid "Official user documentation:"

View file

@ -0,0 +1,9 @@
jinja2
sanic==21.12.2
GitPython
pyyaml
toml
websockets==10.0
babel
langcodes
language_data

View file

@ -1,11 +1,13 @@
#!/usr/bin/env python3
import sys
import tomlkit
import hashlib
import argparse
import hmac
from functools import cache
import tempfile
import aiohttp
import logging
from pathlib import Path
@ -62,9 +64,31 @@ async def github_post(request: Request) -> HTTPResponse:
if event == "push":
return on_push(request)
if event == "issue_comment":
infos = request.json
valid_pr_comment = (
infos["action"] == "created"
and infos["issue"]["state"] == "open"
and "pull_request" in infos["issue"]
)
pr_infos = await get_pr_infos(request)
if valid_pr_comment:
return on_pr_comment(request, pr_infos)
else:
return response.empty()
return response.json({"error": f"Unknown event '{event}'"}, 422)
async def get_pr_infos(request: Request) -> dict:
pr_infos_url = request.json["issue"]["pull_request"]["url"]
async with aiohttp.ClientSession() as session:
async with session.get(pr_infos_url) as resp:
pr_infos = await resp.json()
return pr_infos
def check_webhook_signatures(request: Request) -> Optional[HTTPResponse]:
logging.warning("Unsafe webhook!")
header_signature = request.headers.get("X-Hub-Signature")
@ -121,6 +145,50 @@ def on_push(request: Request) -> HTTPResponse:
return response.text("ok")
def on_pr_comment(request: Request, pr_infos: dict) -> HTTPResponse:
body = request.json["comment"]["body"].strip()[:100].lower()
# Check the comment contains proper keyword trigger
BUMP_REV_COMMANDS = ["!bump", "!new_revision", "!newrevision"]
if any(trigger.lower() in body for trigger in BUMP_REV_COMMANDS):
bump_revision(request, pr_infos)
return response.text("ok")
return response.empty()
def bump_revision(request: Request, pr_infos: dict) -> HTTPResponse:
data = request.json
repository = data["repository"]["full_name"]
branch = pr_infos["head"]["ref"]
logging.info(f"Will bump revision on {repository} branch {branch}...")
with tempfile.TemporaryDirectory() as folder_str:
folder = Path(folder_str)
repo = Repo.clone_from(
f"https://{github_login()}:{github_token()}@github.com/{repository}",
to_path=folder,
)
repo.git.checkout(branch)
manifest_file = folder / "manifest.toml"
manifest = tomlkit.load(manifest_file.open("r", encoding="utf-8"))
version, revision = manifest["version"].split("~ynh")
revision = str(int(revision) + 1)
manifest["version"] = "~ynh".join([version, revision])
tomlkit.dump(manifest, manifest_file.open("w", encoding="utf-8"))
repo.git.add("manifest.toml")
repo.index.commit(
"Bump package revision",
author=Actor("yunohost-bot", "yunohost@yunohost.org"),
)
logging.debug(f"Pushing {repository}")
repo.remote().push(quiet=False, all=True)
return response.text("ok")
def generate_and_commit_readmes(repo: Repo) -> bool:
assert repo.working_tree_dir is not None
generate_READMEs(Path(repo.working_tree_dir))

View file

@ -611,13 +611,6 @@ upstream = "https://github.com/exoplatform/"
website = "https://www.exoplatform.com"
added_date = 1698609533 # 2023/10/29
[faircamp]
name = "Faircamp"
description = "Static site generator for audio artists and producers"
upstream = "https://codeberg.org/simonrepp/faircamp"
website = "https://simonrepp.com/faircamp/"
added_date = 1703728571 # 2023/12/28
[farside]
name = "Farside"
description = "A redirecting service for FOSS alternative frontends"
@ -710,6 +703,14 @@ upstream = "https://github.com/gatsbyjs/gatsby"
website = "https://www.gatsbyjs.com/"
added_date = 1695656621 # 2023/09/25
[geeftlist]
name = "Geeftlist"
description = "Collaborative gift list management"
upstream = "https://codeberg.org/nanawel/geeftlist"
website = "https://www.geeftlist.com/"
added_date = 1723896182 # 2024/08/17
[geneweb]
name = "Geneweb"
description = "Genealogy in a web interface"