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

Add support for featured apps

This commit is contained in:
Maniack Crudelis 2019-02-01 15:11:12 +01:00
parent 1c2ebe65f7
commit d1035b6117
2 changed files with 33 additions and 1 deletions

View file

@ -40,6 +40,7 @@ sudo yunohost app fetchlist -n community -u https://yunohost.org/community.json
* Fork and edit the [community list](https://github.com/YunoHost/apps/tree/master/community.json) * Fork and edit the [community list](https://github.com/YunoHost/apps/tree/master/community.json)
* Add your app's ID and git information at the right alphabetical place * Add your app's ID and git information at the right alphabetical place
* Indicate the app's functioning state: `notworking`, `inprogress`, or `working` * Indicate the app's functioning state: `notworking`, `inprogress`, or `working`
* Do not add the level yourself. The CI will do it.
* Send a [Pull Request](https://github.com/YunoHost/apps/pulls/) * Send a [Pull Request](https://github.com/YunoHost/apps/pulls/)
App example addition: App example addition:
@ -69,5 +70,30 @@ Usage:
./add_or_update.py [community.json OR official.json] [github/gitlab url OR app name [github/gitlab url OR app name [github/gitlab url OR app name ...]]] ./add_or_update.py [community.json OR official.json] [github/gitlab url OR app name [github/gitlab url OR app name [github/gitlab url OR app name ...]]]
``` ```
### How to make my app a Featured app
A featured app will be highlighted in the community list as a high quality app.
To become a Featured app, a package have to follow the following rules:
* The app should already be in the community list for 2 months.
* The app should be keep up to date, regarding the upstream source. (If its possible with our current YunoHost version)
* The package itself should be up to date regarding the packaging recommendations and helpers.
* The package should be level 7, at least.
* The repository should have testing and master branches, at least. The list should point to HEAD, so the list stays up to date.
* Any modification should be done to the testing branch, and wait at least for one approval for one member of the Apps group. So that we can ensure that theres nothing in opposition to those criteria. Nor any changes that would harm servers.
If the app is already tag as Featured and one of those criteria isn't respected anymore. After a warning, the tag will be removed until the criteria are again validated.
To make an app a Featured app, technically, you have to add the tag ```"featured": true```.
```json
"wallabag": {
"branch": "master",
"featured": true,
"revision": "c2fc62438ac5c9503e3f4ebfdc425ec03a0ec0c0",
"url": "https://github.com/abeudin/wallabag_ynh.git",
"state": "working"
}
```
#### More information #### More information
See [yunohost.org/packaging_apps](https://yunohost.org/packaging_apps) See [yunohost.org/packaging_apps](https://yunohost.org/packaging_apps)

View file

@ -145,6 +145,7 @@ for app, info in apps_list.items():
app_state = info["state"] app_state = info["state"]
app_level = info.get("level") app_level = info.get("level")
app_maintained = info.get("maintained", True) app_maintained = info.get("maintained", True)
app_featured = info.get("featured", False)
forge_site = app_url.split('/')[2] forge_site = app_url.split('/')[2]
owner = app_url.split('/')[3] owner = app_url.split('/')[3]
@ -167,6 +168,7 @@ for app, info in apps_list.items():
previous_url = already_built_file.get(app, {}).get("git", {}).get("url") previous_url = already_built_file.get(app, {}).get("git", {}).get("url")
previous_level = already_built_file.get(app, {}).get("level") previous_level = already_built_file.get(app, {}).get("level")
previous_maintained = already_built_file.get(app, {}).get("maintained") previous_maintained = already_built_file.get(app, {}).get("maintained")
previous_featured = already_built_file.get(app, {}).get("featured")
if forge_type == "github" and app_rev == "HEAD": if forge_type == "github" and app_rev == "HEAD":
@ -210,6 +212,9 @@ for app, info in apps_list.items():
if previous_maintained != app_maintained: if previous_maintained != app_maintained:
result_dict[app]["maintained"] = app_maintained result_dict[app]["maintained"] = app_maintained
print("... but maintained status changed, updating it from '%s' to '%s'" % (previous_maintained, app_maintained)) print("... but maintained status changed, updating it from '%s' to '%s'" % (previous_maintained, app_maintained))
if previous_featured != app_featured:
result_dict[app]["featured"] = app_featured
print("... but featured status changed, updating it from '%s' to '%s'" % (previous_featured, app_featured))
print "update translations but don't download anything" print "update translations but don't download anything"
result_dict[app]['manifest'] = include_translations_in_manifest(app, result_dict[app]['manifest']) result_dict[app]['manifest'] = include_translations_in_manifest(app, result_dict[app]['manifest'])
@ -318,7 +323,8 @@ for app, info in apps_list.items():
'manifest': include_translations_in_manifest(manifest['id'], manifest), 'manifest': include_translations_in_manifest(manifest['id'], manifest),
'state': info['state'], 'state': info['state'],
'level': info.get('level', '?'), 'level': info.get('level', '?'),
'maintained': app_maintained 'maintained': app_maintained,
'featured': app_featured
} }
except KeyError as e: except KeyError as e:
print("-> Error: invalid app info or manifest, %s" % e) print("-> Error: invalid app info or manifest, %s" % e)